this may conflict
This commit is contained in:
parent
9701516228
commit
9dc5a3bfc9
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
namespace Zotlabs\Update;
|
namespace Zotlabs\Update;
|
||||||
|
|
||||||
class _1215 {
|
class _1216 {
|
||||||
|
|
||||||
function run() {
|
function run() {
|
||||||
|
|
||||||
$r = q("UPDATE xchan set xchan_name = 'unknown' where xchan_name like '%<%' ");
|
$r = dbq("UPDATE xchan set xchan_name = 'unknown' where xchan_name like '%<%' ");
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
return UPDATE_SUCCESS;
|
return UPDATE_SUCCESS;
|
||||||
|
@ -14,17 +14,17 @@
|
|||||||
* @param bool $uninstall uninstall plugin
|
* @param bool $uninstall uninstall plugin
|
||||||
*/
|
*/
|
||||||
function handleerrors_plugin($plugin,$notice,$log,$uninstall=false){
|
function handleerrors_plugin($plugin,$notice,$log,$uninstall=false){
|
||||||
logger("Addons: [" . $plugin . "] Error: ".$log, LOGGER_ERROR);
|
logger("Addons: [" . $plugin . "] Error: ".$log, LOGGER_ERROR);
|
||||||
if ($notice != '') {
|
if ($notice != '') {
|
||||||
notice("[" . $plugin . "] Error: ".$notice, LOGGER_ERROR);
|
notice("[" . $plugin . "] Error: ".$notice, LOGGER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($uninstall) {
|
if ($uninstall) {
|
||||||
$idx = array_search($plugin, \App::$plugins);
|
$idx = array_search($plugin, \App::$plugins);
|
||||||
unset(\App::$plugins[$idx]);
|
unset(\App::$plugins[$idx]);
|
||||||
uninstall_plugin($plugin);
|
uninstall_plugin($plugin);
|
||||||
set_config("system","addon", implode(", ",\App::$plugins));
|
set_config("system","addon", implode(", ",\App::$plugins));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -206,19 +206,19 @@ function reload_plugins() {
|
|||||||
if(function_exists($pl . '_unload')) {
|
if(function_exists($pl . '_unload')) {
|
||||||
$func = $pl . '_unload';
|
$func = $pl . '_unload';
|
||||||
try {
|
try {
|
||||||
$func();
|
$func();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
handleerrors_plugin($plugin,"","UNLOAD FAILED (uninstalling) : ".$e->getMessage(),true);
|
handleerrors_plugin($plugin,"","UNLOAD FAILED (uninstalling) : ".$e->getMessage(),true);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(function_exists($pl . '_load')) {
|
if(function_exists($pl . '_load')) {
|
||||||
$func = $pl . '_load';
|
$func = $pl . '_load';
|
||||||
try {
|
try {
|
||||||
$func();
|
$func();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
handleerrors_plugin($plugin,"","LOAD FAILED (uninstalling): ".$e->getMessage(),true);
|
handleerrors_plugin($plugin,"","LOAD FAILED (uninstalling): ".$e->getMessage(),true);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
q("UPDATE addon SET tstamp = %d WHERE id = %d",
|
q("UPDATE addon SET tstamp = %d WHERE id = %d",
|
||||||
@ -431,6 +431,7 @@ function insert_hook($hook, $fn, $version = 0, $priority = 0) {
|
|||||||
*/
|
*/
|
||||||
function call_hooks($name, &$data = null) {
|
function call_hooks($name, &$data = null) {
|
||||||
$a = 0;
|
$a = 0;
|
||||||
|
|
||||||
if((is_array(App::$hooks)) && (array_key_exists($name, App::$hooks))) {
|
if((is_array(App::$hooks)) && (array_key_exists($name, App::$hooks))) {
|
||||||
foreach(App::$hooks[$name] as $hook) {
|
foreach(App::$hooks[$name] as $hook) {
|
||||||
$origfn = $hook[1];
|
$origfn = $hook[1];
|
||||||
|
Reference in New Issue
Block a user