aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-07-29 17:59:40 -0700
committerzotlabs <mike@macgirvin.com>2018-07-29 17:59:40 -0700
commit9dc5a3bfc9152f04b9e39d61e90310d660029108 (patch)
tree35f3201b823b0e736b68394a37d544acbe55016b
parent97015162282989913d6b54c373af3b73b8043bad (diff)
downloadvolse-hubzilla-9dc5a3bfc9152f04b9e39d61e90310d660029108.tar.gz
volse-hubzilla-9dc5a3bfc9152f04b9e39d61e90310d660029108.tar.bz2
volse-hubzilla-9dc5a3bfc9152f04b9e39d61e90310d660029108.zip
this may conflict
-rw-r--r--Zotlabs/Update/_1216.php4
-rwxr-xr-xinclude/plugin.php29
2 files changed, 17 insertions, 16 deletions
diff --git a/Zotlabs/Update/_1216.php b/Zotlabs/Update/_1216.php
index 843567633..69f2be15a 100644
--- a/Zotlabs/Update/_1216.php
+++ b/Zotlabs/Update/_1216.php
@@ -2,11 +2,11 @@
namespace Zotlabs\Update;
-class _1215 {
+class _1216 {
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) {
return UPDATE_SUCCESS;
diff --git a/include/plugin.php b/include/plugin.php
index 734c20d79..13652c620 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -14,17 +14,17 @@
* @param bool $uninstall uninstall plugin
*/
function handleerrors_plugin($plugin,$notice,$log,$uninstall=false){
- logger("Addons: [" . $plugin . "] Error: ".$log, LOGGER_ERROR);
- if ($notice != '') {
- notice("[" . $plugin . "] Error: ".$notice, LOGGER_ERROR);
- }
+ logger("Addons: [" . $plugin . "] Error: ".$log, LOGGER_ERROR);
+ if ($notice != '') {
+ notice("[" . $plugin . "] Error: ".$notice, LOGGER_ERROR);
+ }
- if ($uninstall) {
- $idx = array_search($plugin, \App::$plugins);
- unset(\App::$plugins[$idx]);
- uninstall_plugin($plugin);
- set_config("system","addon", implode(", ",\App::$plugins));
- }
+ if ($uninstall) {
+ $idx = array_search($plugin, \App::$plugins);
+ unset(\App::$plugins[$idx]);
+ uninstall_plugin($plugin);
+ set_config("system","addon", implode(", ",\App::$plugins));
+ }
}
/**
@@ -206,19 +206,19 @@ function reload_plugins() {
if(function_exists($pl . '_unload')) {
$func = $pl . '_unload';
try {
- $func();
+ $func();
} catch (Exception $e) {
handleerrors_plugin($plugin,"","UNLOAD FAILED (uninstalling) : ".$e->getMessage(),true);
- continue;
+ continue;
}
}
if(function_exists($pl . '_load')) {
$func = $pl . '_load';
try {
- $func();
+ $func();
} catch (Exception $e) {
handleerrors_plugin($plugin,"","LOAD FAILED (uninstalling): ".$e->getMessage(),true);
- continue;
+ continue;
}
}
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) {
$a = 0;
+
if((is_array(App::$hooks)) && (array_key_exists($name, App::$hooks))) {
foreach(App::$hooks[$name] as $hook) {
$origfn = $hook[1];