From cd05b76c1fe00862b42bf509c3f24c88a584e3db Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 20 Aug 2014 09:41:01 -0700 Subject: [PATCH 1/2] web: remove old DB calls on home and server status pages --- html/user/sample_index.php | 2 -- html/user/server_status.php | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/html/user/sample_index.php b/html/user/sample_index.php index 1823428dd8..2bbe0402ac 100644 --- a/html/user/sample_index.php +++ b/html/user/sample_index.php @@ -22,7 +22,6 @@ // my developing your own stylesheet // and customizing the header/footer functions in html/project/project.inc -require_once("../inc/db.inc"); require_once("../inc/util.inc"); require_once("../inc/news.inc"); require_once("../inc/cache.inc"); @@ -182,7 +181,6 @@ if ($stopped) { Please try again later. "; } else { - db_init(); show_nav(); } diff --git a/html/user/server_status.php b/html/user/server_status.php index 96723c5880..4c58d2cc14 100644 --- a/html/user/server_status.php +++ b/html/user/server_status.php @@ -317,8 +317,7 @@ if ($xml) { "; } -$retval = db_init_aux(); -if ($retval) { +if (BoincDB::get_aux(true) == null) { echo tra("The database server is not accessible"); } else { if (!$xml) { @@ -369,7 +368,6 @@ if ($retval) { $gap = unserialize(get_cached_data(STATUS_PAGE_TTL, "transitioner_backlog")); if ($gap === false) { $min = BoincDB::get()->lookup_fields("workunit", "stdClass", "MIN(transition_time) as min", "TRUE"); - //$gap = BoincDB::get()->min("workunit", "transition_time"); $gap = time()-$gap/3600; $gap = (time() - $min->min)/3600; if (($gap < 0) || ($min->min == 0)) { $gap = 0; From b9156c17c20234c3cd7867259a9d7d770cb89860 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Thu, 21 Aug 2014 05:48:17 -0700 Subject: [PATCH 2/2] Mac installer: don't require restart after a clean install on OS 10.9 Mavericks or later. --- mac_installer/Installer.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mac_installer/Installer.cpp b/mac_installer/Installer.cpp index 5d72f6f600..9d5477b1e8 100644 --- a/mac_installer/Installer.cpp +++ b/mac_installer/Installer.cpp @@ -109,9 +109,12 @@ int main(int argc, char *argv[]) // Expand the installer package system("rm -dfR /tmp/BOINC.pkg"); system("rm -dfR /tmp/expanded_BOINC.pkg"); - sprintf(temp, "pkgutil --expand \"%s\" /tmp/expanded_BOINC.pkg", pkgPath); - err = system(temp); - + + if (compareOSVersionTo(10, 9) < 0) { + sprintf(temp, "pkgutil --expand \"%s\" /tmp/expanded_BOINC.pkg", pkgPath); + err = system(temp); + } + if (err == noErr) { GetPreferredLanguages(); } @@ -201,6 +204,10 @@ Boolean IsRestartNeeded() uid_t boinc_master_uid = 0, boinc_project_uid = 0; char loginName[256]; + if (compareOSVersionTo(10, 9) >= 0) { + return false; + } + grp = getgrnam(boinc_master_group_name); if (grp == NULL) return true; // Group boinc_master does not exist