Add update function to reload addons after hook renaming
This commit is contained in:
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user