Browse Source

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

pull/588/head
friendica 9 years ago
parent
commit
20eb767b7e
  1. 16
      boot.php
  2. 2
      index.php
  3. 16
      util/messages.po

16
boot.php

@ -12,7 +12,7 @@ require_once('library/Mobile_Detect/Mobile_Detect.php');
require_once('include/features.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.1.1589' );
define ( 'FRIENDICA_VERSION', '3.1.1592' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
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');
}
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
// base url for use in cmdline programs which don't have

2
index.php

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

16
util/messages.po

@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: 3.1.1589\n"
"Project-Id-Version: 3.1.1592\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -4351,7 +4351,7 @@ msgstr ""
msgid "%1$s is following %2$s's %3$s"
msgstr ""
#: ../../mod/share.php:43
#: ../../mod/share.php:44
msgid "link"
msgstr ""
@ -8978,22 +8978,22 @@ msgstr ""
msgid "Happy Birthday %s"
msgstr ""
#: ../../include/bbcode.php:210 ../../include/bbcode.php:505
#: ../../include/bbcode.php:210 ../../include/bbcode.php:515
msgid "Image/photo"
msgstr ""
#: ../../include/bbcode.php:262
#: ../../include/bbcode.php:272
#, php-format
msgid ""
"<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 ""
#: ../../include/bbcode.php:470 ../../include/bbcode.php:490
#: ../../include/bbcode.php:480 ../../include/bbcode.php:500
msgid "$1 wrote:"
msgstr ""
#: ../../include/bbcode.php:510 ../../include/bbcode.php:511
#: ../../include/bbcode.php:520 ../../include/bbcode.php:521
msgid "Encrypted content"
msgstr ""

Loading…
Cancel
Save