don't run two processes for every web access (noticed that dbupdate is always started as a background task under normal operation).

This commit is contained in:
friendica 2013-01-18 17:37:45 -08:00
parent 3742d0d5ba
commit 20eb767b7e
3 changed files with 24 additions and 10 deletions

View file

@ -12,7 +12,7 @@ require_once('library/Mobile_Detect/Mobile_Detect.php');
require_once('include/features.php'); require_once('include/features.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.1.1589' ); define ( 'FRIENDICA_VERSION', '3.1.1592' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1158 ); define ( 'DB_UPDATE_VERSION', 1158 );
@ -803,6 +803,20 @@ function is_ajax() {
return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'); return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
} }
function check_db() {
$build = get_config('system','build');
if(! x($build)) {
set_config('system','build',DB_UPDATE_VERSION);
$buid = DB_UPDATE_VERSION;
}
if($build != DB_UPDATE_VERSION)
proc_run('php', 'include/dbupdate.php');
}
// Primarily involved with database upgrade, but also sets the // Primarily involved with database upgrade, but also sets the
// base url for use in cmdline programs which don't have // base url for use in cmdline programs which don't have

View file

@ -141,7 +141,7 @@ if($install)
elseif($maintenance) elseif($maintenance)
$a->module = 'maintenance'; $a->module = 'maintenance';
else { else {
proc_run('php', 'include/dbupdate.php'); check_db();
check_plugins($a); check_plugins($a);
} }

View file

@ -6,9 +6,9 @@
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 3.1.1589\n" "Project-Id-Version: 3.1.1592\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-01-15 10:00-0800\n" "POT-Creation-Date: 2013-01-18 10:00-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -4351,7 +4351,7 @@ msgstr ""
msgid "%1$s is following %2$s's %3$s" msgid "%1$s is following %2$s's %3$s"
msgstr "" msgstr ""
#: ../../mod/share.php:43 #: ../../mod/share.php:44
msgid "link" msgid "link"
msgstr "" msgstr ""
@ -8978,22 +8978,22 @@ msgstr ""
msgid "Happy Birthday %s" msgid "Happy Birthday %s"
msgstr "" msgstr ""
#: ../../include/bbcode.php:210 ../../include/bbcode.php:505 #: ../../include/bbcode.php:210 ../../include/bbcode.php:515
msgid "Image/photo" msgid "Image/photo"
msgstr "" msgstr ""
#: ../../include/bbcode.php:262 #: ../../include/bbcode.php:272
#, php-format #, php-format
msgid "" msgid ""
"<span><a href=\"%s\" target=\"external-link\">%s</a> wrote the following <a " "<span><a href=\"%s\" target=\"external-link\">%s</a> wrote the following <a "
"href=\"%s\" target=\"external-link\">post</a>:</span>" "href=\"%s\" target=\"external-link\">post</a>"
msgstr "" msgstr ""
#: ../../include/bbcode.php:470 ../../include/bbcode.php:490 #: ../../include/bbcode.php:480 ../../include/bbcode.php:500
msgid "$1 wrote:" msgid "$1 wrote:"
msgstr "" msgstr ""
#: ../../include/bbcode.php:510 ../../include/bbcode.php:511 #: ../../include/bbcode.php:520 ../../include/bbcode.php:521
msgid "Encrypted content" msgid "Encrypted content"
msgstr "" msgstr ""