mirror of https://github.com/BOINC/boinc.git
- user web: BoincDb::get() checks if web activity is stopped,
and shows an error page (or XML error) if so. svn path=/trunk/boinc/; revision=14098
This commit is contained in:
parent
a38eb29ea0
commit
71de03e6de
|
@ -10513,3 +10513,11 @@ Charlie 6 Nov 2007
|
|||
buildWxMac.sh
|
||||
boinc.xcodeproj/
|
||||
project.pbxproj
|
||||
|
||||
David 6 Nov 2007
|
||||
- user web: BoincDb::get() checks if web activity is stopped,
|
||||
and shows an error page (or XML error) if so.
|
||||
|
||||
html/inc/
|
||||
boinc_db.inc
|
||||
util.inc
|
||||
|
|
|
@ -7,6 +7,20 @@ class BoincDb extends DbConn {
|
|||
static $instance;
|
||||
|
||||
static function get($readonly = false) {
|
||||
global $generating_xml;
|
||||
if (web_stopped()) {
|
||||
if ($generating_xml) {
|
||||
xml_error(-183);
|
||||
} else {
|
||||
page_head("Page not available");
|
||||
echo "This page requires database access.
|
||||
Our database server is temporarily shut down for maintenance.
|
||||
Please try again later.
|
||||
";
|
||||
page_tail();
|
||||
}
|
||||
exit();
|
||||
}
|
||||
if (!isset($instance)) {
|
||||
$config = get_config();
|
||||
$user = parse_config($config, '<db_user>');
|
||||
|
|
|
@ -142,9 +142,8 @@ function page_tail_main($show_date=false) {
|
|||
page_tail_aux(false, $show_date);
|
||||
}
|
||||
|
||||
/**
|
||||
* See the comments for page_head()
|
||||
*/
|
||||
// See the comments for page_head()
|
||||
//
|
||||
if (!function_exists("page_tail")){
|
||||
function page_tail($show_date=false, $prefix="") {
|
||||
page_tail_aux(true, $show_date, $prefix);
|
||||
|
|
Loading…
Reference in New Issue