mirror of
https://github.com/friendica/friendica
synced 2025-04-30 23:44:23 +02:00
Move Config::get() to DI::config()->get()
This commit is contained in:
parent
5d294e8be8
commit
6c36fd9e01
126 changed files with 581 additions and 596 deletions
|
@ -57,24 +57,24 @@ class PostUpdate
|
|||
private static function update1194()
|
||||
{
|
||||
// Was the script completed?
|
||||
if (Config::get("system", "post_update_version") >= 1194) {
|
||||
if (DI::config()->get("system", "post_update_version") >= 1194) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Logger::log("Start", Logger::DEBUG);
|
||||
|
||||
$end_id = Config::get("system", "post_update_1194_end");
|
||||
$end_id = DI::config()->get("system", "post_update_1194_end");
|
||||
if (!$end_id) {
|
||||
$r = q("SELECT `id` FROM `item` WHERE `uid` != 0 ORDER BY `id` DESC LIMIT 1");
|
||||
if ($r) {
|
||||
Config::set("system", "post_update_1194_end", $r[0]["id"]);
|
||||
$end_id = Config::get("system", "post_update_1194_end");
|
||||
$end_id = DI::config()->get("system", "post_update_1194_end");
|
||||
}
|
||||
}
|
||||
|
||||
Logger::log("End ID: ".$end_id, Logger::DEBUG);
|
||||
|
||||
$start_id = Config::get("system", "post_update_1194_start");
|
||||
$start_id = DI::config()->get("system", "post_update_1194_start");
|
||||
|
||||
$query1 = "SELECT `item`.`id` FROM `item` ";
|
||||
|
||||
|
@ -95,7 +95,7 @@ class PostUpdate
|
|||
return true;
|
||||
} else {
|
||||
Config::set("system", "post_update_1194_start", $r[0]["id"]);
|
||||
$start_id = Config::get("system", "post_update_1194_start");
|
||||
$start_id = DI::config()->get("system", "post_update_1194_start");
|
||||
}
|
||||
|
||||
Logger::log("Start ID: ".$start_id, Logger::DEBUG);
|
||||
|
@ -128,7 +128,7 @@ class PostUpdate
|
|||
private static function update1206()
|
||||
{
|
||||
// Was the script completed?
|
||||
if (Config::get("system", "post_update_version") >= 1206) {
|
||||
if (DI::config()->get("system", "post_update_version") >= 1206) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -162,11 +162,11 @@ class PostUpdate
|
|||
private static function update1279()
|
||||
{
|
||||
// Was the script completed?
|
||||
if (Config::get("system", "post_update_version") >= 1279) {
|
||||
if (DI::config()->get("system", "post_update_version") >= 1279) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$id = Config::get("system", "post_update_version_1279_id", 0);
|
||||
$id = DI::config()->get("system", "post_update_version_1279_id", 0);
|
||||
|
||||
Logger::log("Start from item " . $id, Logger::DEBUG);
|
||||
|
||||
|
@ -313,11 +313,11 @@ class PostUpdate
|
|||
private static function update1281()
|
||||
{
|
||||
// Was the script completed?
|
||||
if (Config::get("system", "post_update_version") >= 1281) {
|
||||
if (DI::config()->get("system", "post_update_version") >= 1281) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$id = Config::get("system", "post_update_version_1281_id", 0);
|
||||
$id = DI::config()->get("system", "post_update_version_1281_id", 0);
|
||||
|
||||
Logger::log("Start from item " . $id, Logger::DEBUG);
|
||||
|
||||
|
@ -397,7 +397,7 @@ class PostUpdate
|
|||
private static function update1297()
|
||||
{
|
||||
// Was the script completed?
|
||||
if (Config::get('system', 'post_update_version') >= 1297) {
|
||||
if (DI::config()->get('system', 'post_update_version') >= 1297) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -432,7 +432,7 @@ class PostUpdate
|
|||
private static function update1322()
|
||||
{
|
||||
// Was the script completed?
|
||||
if (Config::get('system', 'post_update_version') >= 1322) {
|
||||
if (DI::config()->get('system', 'post_update_version') >= 1322) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -467,11 +467,11 @@ class PostUpdate
|
|||
private static function update1329()
|
||||
{
|
||||
// Was the script completed?
|
||||
if (Config::get('system', 'post_update_version') >= 1329) {
|
||||
if (DI::config()->get('system', 'post_update_version') >= 1329) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$id = Config::get('system', 'post_update_version_1329_id', 0);
|
||||
$id = DI::config()->get('system', 'post_update_version_1329_id', 0);
|
||||
|
||||
Logger::info('Start', ['item' => $id]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue