From b1851ce02cc3f01324cd0d94fe4ff6841995ae21 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 6 Jul 2010 23:31:26 +0000 Subject: [PATCH] - user web: PHP 5.3 compatibility fix, from Nicolas. Fixes #787 svn path=/trunk/boinc/; revision=21878 --- checkin_notes | 5 +++++ html/inc/translation.inc | 2 +- sched/sched_version.cpp | 8 +++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index d41ef65f45..9bb65738eb 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4949,3 +4949,8 @@ David 6 Jul 2010 client/ work_fetch.cpp +David 6 Jul 2010 + - user web: PHP 5.3 compatibility fix, from Nicolas. Fixes #787 + + html/inc/ + translation.inc diff --git a/html/inc/translation.inc b/html/inc/translation.inc index cacc6cbb73..6a74cbb953 100644 --- a/html/inc/translation.inc +++ b/html/inc/translation.inc @@ -159,7 +159,7 @@ function getPOLineContent($line, $file){ $start = strpos($line, '"')+1; $stop = strrpos($line, '"'); $x = substr($line, $start, $stop-$start); - $n = ereg("[^\\]\"", $x); + $n = preg_match("/[^\\\\]\"/", $x); if ($n) { echo "ERROR - MISMATCHED QUOTES IN $file: $line\n"; return ""; diff --git a/sched/sched_version.cpp b/sched/sched_version.cpp index 87d93d7230..bd492dfcdd 100644 --- a/sched/sched_version.cpp +++ b/sched/sched_version.cpp @@ -120,7 +120,9 @@ inline int scaled_max_jobs_per_day(DB_HOST_APP_VERSION& hav, HOST_USAGE& hu) { } if (config.debug_quota) { log_messages.printf(MSG_NORMAL, - "[quota] scaled max jobs per day: %d\n", n + "[quota] [AV#%d] scaled max jobs per day: %d\n", + hav.app_version_id, + n ); } return n; @@ -133,8 +135,8 @@ inline bool daily_quota_exceeded(int gavid, HOST_USAGE& hu) { if (havp->n_jobs_today >= q) { if (config.debug_quota) { log_messages.printf(MSG_NORMAL, - "[quota] daily quota exceeded: %d >= %d\n", - havp->n_jobs_today, q + "[quota] [AV#%d] daily quota exceeded: %d >= %d\n", + gavid, havp->n_jobs_today, q ); } havp->daily_quota_exceeded = true;