Fix wrong variable name in include/plugin.php.
This commit is contained in:
parent
f2d7c4091a
commit
90a62405ca
@ -213,8 +213,8 @@ function reload_plugins() {
|
|||||||
try {
|
try {
|
||||||
$func();
|
$func();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
handleerrors_plugin($plugin,"","UNLOAD FAILED (uninstalling) : ".$e->getMessage(),true);
|
handleerrors_plugin($pl, '', 'UNLOAD FAILED (uninstalling) : ' . $e->getMessage(),true);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(function_exists($pl . '_load')) {
|
if(function_exists($pl . '_load')) {
|
||||||
@ -222,8 +222,8 @@ function reload_plugins() {
|
|||||||
try {
|
try {
|
||||||
$func();
|
$func();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
handleerrors_plugin($plugin,"","LOAD FAILED (uninstalling): ".$e->getMessage(),true);
|
handleerrors_plugin($pl, '', '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",
|
||||||
@ -461,16 +461,16 @@ function call_hooks($name, &$data = null) {
|
|||||||
|
|
||||||
if ($name != 'permit_hook') { // avoid looping
|
if ($name != 'permit_hook') { // avoid looping
|
||||||
$checkhook = [
|
$checkhook = [
|
||||||
'name'=>$name,
|
'name'=>$name,
|
||||||
'hook'=>$hook,
|
'hook'=>$hook,
|
||||||
'data'=>$data,
|
'data'=>$data,
|
||||||
// Note: Since PHP uses COPY-ON-WRITE
|
// Note: Since PHP uses COPY-ON-WRITE
|
||||||
// for variables, there is no cost to
|
// for variables, there is no cost to
|
||||||
// passing the $data structure (unless
|
// passing the $data structure (unless
|
||||||
// the permit_hook processors change the
|
// the permit_hook processors change the
|
||||||
// information it contains.
|
// information it contains.
|
||||||
'permit'=>true
|
'permit'=>true
|
||||||
];
|
];
|
||||||
call_hooks('permit_hook',$checkhook);
|
call_hooks('permit_hook',$checkhook);
|
||||||
if (!$checkhook['permit']) {
|
if (!$checkhook['permit']) {
|
||||||
continue;
|
continue;
|
||||||
@ -1058,30 +1058,30 @@ function get_intltext_template($s, $root = '') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_markup_template($s, $root = '') {
|
function get_markup_template($s, $root = '') {
|
||||||
$testroot = ($root=='') ? $testroot = "ROOT" : $root;
|
$testroot = ($root=='') ? $testroot = "ROOT" : $root;
|
||||||
|
|
||||||
$t = App::template_engine();
|
$t = App::template_engine();
|
||||||
|
|
||||||
if (isset(\App::$override_markup_templates[$testroot][$s]["content"])) {
|
if (isset(\App::$override_markup_templates[$testroot][$s]["content"])) {
|
||||||
return \App::$override_markup_templates[$testroot][$s]["content"];
|
return \App::$override_markup_templates[$testroot][$s]["content"];
|
||||||
} else {
|
} else {
|
||||||
if (isset(\App::$override_markup_templates[$testroot][$s]["root"]) &&
|
if (isset(\App::$override_markup_templates[$testroot][$s]["root"]) &&
|
||||||
isset(\App::$override_markup_templates[$testroot][$s]["file"])) {
|
isset(\App::$override_markup_templates[$testroot][$s]["file"])) {
|
||||||
$root = \App::$override_markup_templates[$testroot][$s]["root"];
|
$root = \App::$override_markup_templates[$testroot][$s]["root"];
|
||||||
$s = \App::$override_markup_templates[$testroot][$s]["file"];
|
$s = \App::$override_markup_templates[$testroot][$s]["file"];
|
||||||
$template = $t->get_markup_template($s, $root);
|
$template = $t->get_markup_template($s, $root);
|
||||||
} elseif (\App::$override_templateroot) {
|
} elseif (\App::$override_templateroot) {
|
||||||
$newroot = \App::$override_templateroot;
|
$newroot = \App::$override_templateroot;
|
||||||
if ($newroot != '' && substr($newroot,-1) != '/' ) {
|
if ($newroot != '' && substr($newroot,-1) != '/' ) {
|
||||||
$newroot .= '/';
|
$newroot .= '/';
|
||||||
}
|
}
|
||||||
$newroot .= $root;
|
$newroot .= $root;
|
||||||
$template = $t->get_markup_template($s, $newroot);
|
$template = $t->get_markup_template($s, $newroot);
|
||||||
} else {
|
} else {
|
||||||
$template = $t->get_markup_template($s, $root);
|
$template = $t->get_markup_template($s, $root);
|
||||||
}
|
}
|
||||||
return $template;
|
return $template;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user