From 6ec4a3589e327ded693ab0c741828fc5ec66b840 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 21 Feb 2016 19:44:38 +0100 Subject: Send notifications when changing ownership Add a new option that makes it possible to subscribe to package ownership changes (adoption/disownment). Fixes FS#15412. Signed-off-by: Lukas Fleischer --- web/lib/acctfuncs.inc.php | 7 +++++-- web/lib/pkgbasefuncs.inc.php | 8 +++++++- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'web/lib') diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index b39420f..be0981f 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -58,13 +58,14 @@ function html_format_pgp_fingerprint($fingerprint) { * @param string $J The inactivity status of the displayed user * @param string $CN Whether to notify of new comments * @param string $UN Whether to notify of package updates + * @param string $ON Whether to notify of ownership changes * @param string $UID The user ID of the displayed user * @param string $N The username as present in the database * * @return void */ function display_account_form($A,$U="",$T="",$S="",$E="",$H="",$P="",$C="",$R="", - $L="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$UID=0,$N="") { + $L="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$ON="",$UID=0,$N="") { global $SUPPORTED_LANGS; include("account_edit_form.php"); @@ -92,13 +93,14 @@ function display_account_form($A,$U="",$T="",$S="",$E="",$H="",$P="",$C="",$R="" * @param string $J The inactivity status of the user * @param string $CN Whether to notify of new comments * @param string $UN Whether to notify of package updates + * @param string $ON Whether to notify of ownership changes * @param string $UID The user ID of the modified account * @param string $N The username as present in the database * * @return array Boolean indicating success and message to be printed */ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C="", - $R="",$L="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$UID=0,$N="") { + $R="",$L="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$ON="",$UID=0,$N="") { global $SUPPORTED_LANGS; $error = ''; @@ -347,6 +349,7 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C="" $q.= ", InactivityTS = " . $inactivity_ts; $q.= ", CommentNotify = " . ($CN ? "1" : "0"); $q.= ", UpdateNotify = " . ($UN ? "1" : "0"); + $q.= ", OwnershipNotify = " . ($ON ? "1" : "0"); $q.= " WHERE ID = ".intval($UID); $result = $dbh->exec($q); diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php index 1691bff..5d10cce 100644 --- a/web/lib/pkgbasefuncs.inc.php +++ b/web/lib/pkgbasefuncs.inc.php @@ -661,6 +661,9 @@ function pkgbase_adopt ($base_ids, $action=true, $via) { $q.= "SET MaintainerUID = $uid "; $q.= "WHERE ID IN (" . implode(",", $base_ids) . ") "; $dbh->exec($q); + + /* Add the new maintainer to the notification list. */ + pkgbase_notify($base_ids); } else { /* Update the co-maintainer list when disowning a package. */ if (has_credential(CRED_PKGBASE_DISOWN)) { @@ -692,8 +695,11 @@ function pkgbase_adopt ($base_ids, $action=true, $via) { } } + foreach ($base_ids as $base_id) { + notify(array($action ? 'adopt' : 'disown', $base_id, $uid)); + } + if ($action) { - pkgbase_notify($base_ids); return array(true, __("The selected packages have been adopted.")); } else { return array(true, __("The selected packages have been disowned.")); -- cgit v1.2.3-54-g00ecf From b757246e33a8cfcb5b8973d659a0b513d3b767d7 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 2 Jun 2016 08:37:43 +0200 Subject: pkgbasefuncs.inc.php: Remove debug statement Remove a leftover var_dump() invocation that was introduced in commit 5fb7a74 (Replace categories with keywords, 2015-06-13). Signed-off-by: Lukas Fleischer --- web/lib/pkgbasefuncs.inc.php | 1 - 1 file changed, 1 deletion(-) (limited to 'web/lib') diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php index 5d10cce..b082784 100644 --- a/web/lib/pkgbasefuncs.inc.php +++ b/web/lib/pkgbasefuncs.inc.php @@ -1062,7 +1062,6 @@ function pkgbase_set_keywords($base_id, $keywords) { $i = 0; foreach ($keywords as $keyword) { $q = sprintf("INSERT INTO PackageKeywords (PackageBaseID, Keyword) VALUES (%d, %s)", $base_id, $dbh->quote($keyword)); - var_dump($q); $dbh->exec($q); $i++; -- cgit v1.2.3-54-g00ecf From e3670ef1888a3f030452b229e8d48b83bb83b240 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 2 Jun 2016 08:51:29 +0200 Subject: Add a homepage field to accounts Allow users to add a link to their homepage to their profile. Implements FS#22774. Signed-off-by: Lukas Fleischer --- schema/aur-schema.sql | 1 + upgrading/4.3.0.txt | 6 +++++ web/html/account.php | 53 +++++++++++++++++++++++++++----------- web/lib/acctfuncs.inc.php | 12 ++++++--- web/template/account_details.php | 4 +++ web/template/account_edit_form.php | 5 ++++ 6 files changed, 62 insertions(+), 19 deletions(-) (limited to 'web/lib') diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index ea19d46..7edf94c 100644 --- a/schema/aur-schema.sql +++ b/schema/aur-schema.sql @@ -32,6 +32,7 @@ CREATE TABLE Users ( ResetKey CHAR(32) NOT NULL DEFAULT '', RealName VARCHAR(64) NOT NULL DEFAULT '', LangPreference VARCHAR(5) NOT NULL DEFAULT 'en', + Homepage TEXT NULL DEFAULT NULL, IRCNick VARCHAR(32) NOT NULL DEFAULT '', PGPKey VARCHAR(40) NULL DEFAULT NULL, LastLogin BIGINT UNSIGNED NOT NULL DEFAULT 0, diff --git a/upgrading/4.3.0.txt b/upgrading/4.3.0.txt index f7f3e08..6c1753d 100644 --- a/upgrading/4.3.0.txt +++ b/upgrading/4.3.0.txt @@ -15,3 +15,9 @@ ALTER TABLE Users MODIFY LastLoginIPAddress VARCHAR(45) NULL DEFAULT NULL; ---- ALTER TABLE OfficialProviders ADD COLUMN Repo VARCHAR(64) NOT NULL; ---- + +4. Add a column to store users' homepages: + +---- +ALTER TABLE Users ADD COLUMN Homepage TEXT NULL DEFAULT NULL; +---- diff --git a/web/html/account.php b/web/html/account.php index 9007ace..8d92b2c 100644 --- a/web/html/account.php +++ b/web/html/account.php @@ -78,12 +78,25 @@ if (isset($_COOKIE["AURSID"])) { } else { /* Verify user has permission to edit the account */ if (can_edit_account($row)) { - display_account_form("UpdateAccount", $row["Username"], - $row["AccountTypeID"], $row["Suspended"], $row["Email"], - $row["HideEmail"], "", "", $row["RealName"], - $row["LangPreference"], $row["IRCNick"], $row["PGPKey"], $PK, - $row["InactivityTS"] ? 1 : 0, $row["CommentNotify"], - $row["UpdateNotify"], $row["ID"], $row["Username"]); + display_account_form("UpdateAccount", + $row["Username"], + $row["AccountTypeID"], + $row["Suspended"], + $row["Email"], + $row["HideEmail"], + "", + "", + $row["RealName"], + $row["LangPreference"], + $row["Homepage"], + $row["IRCNick"], + $row["PGPKey"], + $PK, + $row["InactivityTS"] ? 1 : 0, + $row["CommentNotify"], + $row["UpdateNotify"], + $row["ID"], + $row["Username"]); } else { print __("You do not have permission to edit this account."); } @@ -116,15 +129,25 @@ if (isset($_COOKIE["AURSID"])) { print $update_account_message; if (!$success) { - display_account_form("UpdateAccount", in_request("U"), - in_request("T"), in_request("S"), - in_request("E"), in_request("H"), - in_request("P"), in_request("C"), - in_request("R"), in_request("L"), - in_request("I"), in_request("K"), - in_request("PK"), in_request("J"), - in_request("CN"), in_request("UN"), - in_request("ID"), $row["Username"]); + display_account_form("UpdateAccount", + in_request("U"), + in_request("T"), + in_request("S"), + in_request("E"), + in_request("H"), + in_request("P"), + in_request("C"), + in_request("R"), + in_request("L"), + in_request("HP"), + in_request("I"), + in_request("K"), + in_request("PK"), + in_request("J"), + in_request("CN"), + in_request("UN"), + in_request("ID"), + $row["Username"]); } } else { diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index 0eb021e..172b962 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -52,6 +52,7 @@ function html_format_pgp_fingerprint($fingerprint) { * @param string $C The confirmed password value of the displayed user * @param string $R The real name of the displayed user * @param string $L The language preference of the displayed user + * @param string $HP The homepage of the displayed user * @param string $I The IRC nickname of the displayed user * @param string $K The PGP key fingerprint of the displayed user * @param string $PK The list of SSH public keys @@ -65,7 +66,7 @@ function html_format_pgp_fingerprint($fingerprint) { * @return void */ function display_account_form($A,$U="",$T="",$S="",$E="",$H="",$P="",$C="",$R="", - $L="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$ON="",$UID=0,$N="") { + $L="",$HP="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$ON="",$UID=0,$N="") { global $SUPPORTED_LANGS; include("account_edit_form.php"); @@ -87,6 +88,7 @@ function display_account_form($A,$U="",$T="",$S="",$E="",$H="",$P="",$C="",$R="" * @param string $C The confirmed password for the user * @param string $R The real name of the user * @param string $L The language preference of the user + * @param string $HP The homepage of the displayed user * @param string $I The IRC nickname of the user * @param string $K The PGP fingerprint of the user * @param string $PK The list of public SSH keys @@ -100,7 +102,7 @@ function display_account_form($A,$U="",$T="",$S="",$E="",$H="",$P="",$C="",$R="" * @return array Boolean indicating success and message to be printed */ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C="", - $R="",$L="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$ON="",$UID=0,$N="") { + $R="",$L="",$HP="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$ON="",$UID=0,$N="") { global $SUPPORTED_LANGS; $error = ''; @@ -276,13 +278,14 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C="" $salt = $dbh->quote($salt); $R = $dbh->quote($R); $L = $dbh->quote($L); + $HP = $dbh->quote($HP); $I = $dbh->quote($I); $K = $dbh->quote(str_replace(" ", "", $K)); $q = "INSERT INTO Users (AccountTypeID, Suspended, "; $q.= "InactivityTS, Username, Email, Passwd, Salt, "; - $q.= "RealName, LangPreference, IRCNick, PGPKey) "; + $q.= "RealName, LangPreference, Homepage, IRCNick, PGPKey) "; $q.= "VALUES (1, 0, 0, $U, $E, $P, $salt, $R, $L, "; - $q.= "$I, $K)"; + $q.= "$HP, $I, $K)"; $result = $dbh->exec($q); if (!$result) { $message = __("Error trying to create account, %s%s%s.", @@ -344,6 +347,7 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C="" } $q.= ", RealName = " . $dbh->quote($R); $q.= ", LangPreference = " . $dbh->quote($L); + $q.= ", Homepage = " . $dbh->quote($HP); $q.= ", IRCNick = " . $dbh->quote($I); $q.= ", PGPKey = " . $dbh->quote(str_replace(" ", "", $K)); $q.= ", InactivityTS = " . $inactivity_ts; diff --git a/web/template/account_details.php b/web/template/account_details.php index 59a6a63..0ac85a5 100644 --- a/web/template/account_details.php +++ b/web/template/account_details.php @@ -41,6 +41,10 @@ + + + + diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php index b4f0192..6c2b8fb 100644 --- a/web/template/account_edit_form.php +++ b/web/template/account_edit_form.php @@ -98,6 +98,11 @@

+

+ + +

+

-- cgit v1.2.3-54-g00ecf From fbf3e5405781f0f7ded67e99ab83bebc0737499d Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 28 Apr 2016 19:28:23 +0200 Subject: Add hard limit for the length of dependency lists Introduce a configuration option max_depends which can be used to specify a maximum number of (reverse) dependencies to display on the package details pages. Fixes FS#49059. Signed-off-by: Lukas Fleischer --- conf/config.proto | 1 + web/lib/pkgfuncs.inc.php | 10 ++++++---- web/template/pkg_details.php | 5 +++-- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'web/lib') diff --git a/conf/config.proto b/conf/config.proto index 560c705..64af774 100644 --- a/conf/config.proto +++ b/conf/config.proto @@ -21,6 +21,7 @@ aur_location = https://aur.archlinux.org git_clone_uri_anon = https://aur.archlinux.org/%s.git git_clone_uri_priv = ssh://aur@aur.archlinux.org/%s.git max_rpc_results = 5000 +max_depends = 1000 aur_request_ml = aur-requests@archlinux.org request_idle_time = 1209600 auto_orphan_age = 15552000 diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index eaea318..4b0fdba 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -230,10 +230,11 @@ function pkg_providers($name) { * Get package dependencies for a specific package * * @param int $pkgid The package to get dependencies for + * @param int $limit An upper bound for the number of packages to retrieve * * @return array All package dependencies for the package */ -function pkg_dependencies($pkgid) { +function pkg_dependencies($pkgid, $limit) { $deps = array(); $pkgid = intval($pkgid); if ($pkgid > 0) { @@ -243,7 +244,7 @@ function pkg_dependencies($pkgid) { $q.= "OR SUBSTRING(pd.DepName FROM 1 FOR POSITION(': ' IN pd.DepName) - 1) = p.Name "; $q.= "LEFT JOIN DependencyTypes dt ON dt.ID = pd.DepTypeID "; $q.= "WHERE pd.PackageID = ". $pkgid . " "; - $q.= "ORDER BY pd.DepName"; + $q.= "ORDER BY pd.DepName LIMIT " . intval($limit); $result = $dbh->query($q); if (!$result) { return array(); @@ -505,10 +506,11 @@ function pkg_source_link($url, $arch) { * * @param string $name The package name for the dependency search * @param array $provides A list of virtual provisions of the package + * @param int $limit An upper bound for the number of packages to retrieve * * @return array All packages that depend on the specified package name */ -function pkg_required($name="", $provides) { +function pkg_required($name="", $provides, $limit) { $deps = array(); if ($name != "") { $dbh = DB::connect(); @@ -523,7 +525,7 @@ function pkg_required($name="", $provides) { $q.= "LEFT JOIN DependencyTypes dt ON dt.ID = pd.DepTypeID "; $q.= "WHERE pd.DepName IN (" . $name_list . ") "; $q.= "OR SUBSTRING(pd.DepName FROM 1 FOR POSITION(': ' IN pd.DepName) - 1) IN (" . $name_list . ") "; - $q.= "ORDER BY p.Name"; + $q.= "ORDER BY p.Name LIMIT " . intval($limit); $result = $dbh->query($q); if (!$result) {return array();} while ($row = $result->fetch(PDO::FETCH_NUM)) { diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 8b038b9..b9c66d4 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -5,6 +5,7 @@ $log_uri = sprintf(config_get('options', 'log_uri'), urlencode($row['BaseName']) $snapshot_uri = sprintf(config_get('options', 'snapshot_uri'), urlencode($row['BaseName'])); $git_clone_uri_anon = sprintf(config_get('options', 'git_clone_uri_anon'), htmlspecialchars($row['BaseName'])); $git_clone_uri_priv = sprintf(config_get('options', 'git_clone_uri_priv'), htmlspecialchars($row['BaseName'])); +$max_depends = config_get_int('options', 'max_depends'); $uid = uid_from_sid($SID); @@ -40,7 +41,7 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("Y-m-d", intval($ $lics = pkg_licenses($row["ID"]); $grps = pkg_groups($row["ID"]); -$deps = pkg_dependencies($row["ID"]); +$deps = pkg_dependencies($row["ID"], $max_depends); usort($deps, function($x, $y) { if ($x[1] != $y[1]) { @@ -82,7 +83,7 @@ foreach ($rels as $rel) { } } -$requiredby = pkg_required($row["Name"], $rels_p); +$requiredby = pkg_required($row["Name"], $rels_p, $max_depends); # $sources[0] = 'src'; $sources = pkg_sources($row["ID"]); -- cgit v1.2.3-54-g00ecf From 60cdad28eebf45ac2822155cea27277e1f7de455 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 30 Jun 2016 15:57:53 +0200 Subject: Distinguish auto-accepted requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before commit 9746a65 (Port notification routines to Python, 2015-06-27), notification emails for automatically closed requests explicitly stated that the action was taken "automatically by the Arch User Repository package request system". When porting the notification routines to Python, this feature was overlooked and emails sent by the new script always reported that the requester triggered the acceptance or rejection of a request. This patch reimplements the old behavior such that notifications no longer look as if the requester had accepted the request himself. Reported-by: Johannes Löthberg Signed-off-by: Lukas Fleischer --- scripts/notify.py | 19 +++++++++++++------ web/lib/pkgreqfuncs.inc.php | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) (limited to 'web/lib') diff --git a/scripts/notify.py b/scripts/notify.py index 5e5f377..6ea25d1 100755 --- a/scripts/notify.py +++ b/scripts/notify.py @@ -41,7 +41,10 @@ def send_notification(to, subject, body, refs, headers={}): wrapped = '' for line in body.splitlines(): wrapped += textwrap.fill(line, break_long_words=False) + '\n' - body = wrapped + '\n' + refs + if refs: + body = wrapped + '\n' + refs + else: + body = wrapped for recipient in to: msg = email.mime.text.MIMEText(body, 'plain', 'utf-8') @@ -377,20 +380,24 @@ def request_open(cur, uid, reqid, reqtype, pkgbase_id, merge_into=None): def request_close(cur, uid, reqid, reason): - user = username_from_id(cur, uid) to = [aur_request_ml] cc = get_request_recipients(cur, reqid) text = get_request_closure_comment(cur, reqid) - user_uri = aur_location + '/account/' + user + '/' - subject = '[PRQ#%d] Request %s' % (int(reqid), reason.title()) - body = 'Request #%d has been %s by %s [1]' % (int(reqid), reason, user) + if int(uid): + user = username_from_id(cur, uid) + user_uri = aur_location + '/account/' + user + '/' + body = 'Request #%d has been %s by %s [1]' % (int(reqid), reason, user) + refs = '[1] ' + user_uri + else: + body = 'Request #%d has been %s automatically by the Arch User ' \ + 'Repository package request system' % (int(reqid), reason) + refs = None if text.strip() == '': body += '.' else: body += ':\n\n' + text - refs = '[1] ' + user_uri thread_id = '' headers = headers_reply(thread_id) headers.update(headers_cc(cc)) diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php index cf56663..8ceac8d 100644 --- a/web/lib/pkgreqfuncs.inc.php +++ b/web/lib/pkgreqfuncs.inc.php @@ -221,7 +221,7 @@ function pkgreq_close($id, $reason, $comments, $auto_close=false) { $dbh = DB::connect(); $id = intval($id); - $uid = uid_from_sid($_COOKIE["AURSID"]); + $uid = $auto_close ? 0 : uid_from_sid($_COOKIE["AURSID"]); if (!$auto_close && !has_credential(CRED_PKGREQ_CLOSE)) { return array(false, __("Only TUs and developers can close requests.")); -- cgit v1.2.3-54-g00ecf From f3b65e59f7365ca4e8e9b8752d69ba08e94c4234 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 14 Aug 2016 08:00:06 +0200 Subject: Release 4.3.0 Signed-off-by: Lukas Fleischer --- web/lib/version.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/lib') diff --git a/web/lib/version.inc.php b/web/lib/version.inc.php index 9c0a5e6..7918a7f 100644 --- a/web/lib/version.inc.php +++ b/web/lib/version.inc.php @@ -1,3 +1,3 @@ Date: Sat, 15 Oct 2016 19:46:51 +0200 Subject: Release 4.4.0 Signed-off-by: Lukas Fleischer --- web/lib/version.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/lib') diff --git a/web/lib/version.inc.php b/web/lib/version.inc.php index 7918a7f..25d365a 100644 --- a/web/lib/version.inc.php +++ b/web/lib/version.inc.php @@ -1,3 +1,3 @@ Date: Mon, 17 Oct 2016 15:01:45 +0200 Subject: Move configuration to /etc/aurweb/config Since d4fe77a (Reorganize Git interface scripts, 2016-10-08), the key components of the aurweb SSH interface are installed system-wide. Update the default configuration path to point to a central location. Signed-off-by: Lukas Fleischer --- .gitignore | 1 - INSTALL | 4 ++-- aurweb/config.py | 3 +-- upgrading/4.4.1.txt | 3 +++ web/lib/confparser.inc.php | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 upgrading/4.4.1.txt (limited to 'web/lib') diff --git a/.gitignore b/.gitignore index 2cb5bdc..f0e462d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -conf/config dummy-data.sql* po/*.mo po/*.po~ diff --git a/INSTALL b/INSTALL index 395915a..95cac4c 100644 --- a/INSTALL +++ b/INSTALL @@ -30,8 +30,8 @@ Setup on Arch Linux } } -3) Copy conf/config.proto to conf/config and adjust the configuration (pay - attention to disable_http_login, enable_maintenance and aur_location). +3) Copy conf/config.proto to /etc/aurweb/config and adjust the configuration + (pay attention to disable_http_login, enable_maintenance and aur_location). 4) Create a new MySQL database and a user and import the AUR SQL schema: diff --git a/aurweb/config.py b/aurweb/config.py index aac188b..a52d942 100644 --- a/aurweb/config.py +++ b/aurweb/config.py @@ -12,8 +12,7 @@ def _get_parser(): if 'AUR_CONFIG' in os.environ: path = os.environ.get('AUR_CONFIG') else: - relpath = "/../conf/config" - path = os.path.dirname(os.path.realpath(__file__)) + relpath + path = "/etc/aurweb/config" _parser.read(path) return _parser diff --git a/upgrading/4.4.1.txt b/upgrading/4.4.1.txt new file mode 100644 index 0000000..b06696e --- /dev/null +++ b/upgrading/4.4.1.txt @@ -0,0 +1,3 @@ +1. The default configuration file search path now points to /etc/aurweb/config. + Make sure you copy your aurweb configuration to the new location before + upgrading. diff --git a/web/lib/confparser.inc.php b/web/lib/confparser.inc.php index 6368b86..789300e 100644 --- a/web/lib/confparser.inc.php +++ b/web/lib/confparser.inc.php @@ -4,7 +4,7 @@ function config_load() { global $AUR_CONFIG; if (!isset($AUR_CONFIG)) { - $AUR_CONFIG = parse_ini_file("../../conf/config", true, INI_SCANNER_RAW); + $AUR_CONFIG = parse_ini_file("/etc/aurweb/config", true, INI_SCANNER_RAW); } } -- cgit v1.2.3-54-g00ecf From c3f464f50fb35ffb7825b90437bd912051a994ee Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 17 Oct 2016 15:32:06 +0200 Subject: Release 4.4.1 Signed-off-by: Lukas Fleischer --- web/lib/version.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/lib') diff --git a/web/lib/version.inc.php b/web/lib/version.inc.php index 25d365a..dcf5666 100644 --- a/web/lib/version.inc.php +++ b/web/lib/version.inc.php @@ -1,3 +1,3 @@