Merge pull request #4318 from MrPetovan/bug/4314-fix-addon-reload
Fix addon reload
This commit is contained in:
commit
a53fc3c7ed
3 changed files with 14 additions and 4 deletions
2
boot.php
2
boot.php
|
@ -41,7 +41,7 @@ define('FRIENDICA_PLATFORM', 'Friendica');
|
|||
define('FRIENDICA_CODENAME', 'Asparagus');
|
||||
define('FRIENDICA_VERSION', '3.6-dev');
|
||||
define('DFRN_PROTOCOL_VERSION', '2.23');
|
||||
define('DB_UPDATE_VERSION', 1246);
|
||||
define('DB_UPDATE_VERSION', 1247);
|
||||
define('NEW_UPDATE_ROUTINE_VERSION', 1170);
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
*/
|
||||
namespace Friendica\Core;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
|
||||
use dba;
|
||||
|
||||
require_once 'include/dba.php';
|
||||
|
@ -83,7 +82,7 @@ class Addon
|
|||
if (strlen($addons)) {
|
||||
$r = dba::select('addon', [], ['installed' => 1]);
|
||||
if (DBM::is_result($r)) {
|
||||
$installed = $r;
|
||||
$installed = dba::inArray($r);
|
||||
} else {
|
||||
$installed = [];
|
||||
}
|
||||
|
|
11
update.php
11
update.php
|
@ -7,6 +7,8 @@ use Friendica\Core\Worker;
|
|||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\User;
|
||||
|
||||
require_once 'include/dba.php';
|
||||
|
||||
/**
|
||||
*
|
||||
* update.php - automatic system update
|
||||
|
@ -173,3 +175,12 @@ function update_1245() {
|
|||
|
||||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
function update_1247() {
|
||||
// Removing hooks with the old name
|
||||
dba::e("DELETE FROM `hook`
|
||||
WHERE `hook` LIKE 'plugin_%'");
|
||||
|
||||
// Make sure we install the new renamed ones
|
||||
Addon::reload();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue