PHP functions used as modifier must be registered as modifier explicitly as of Smarty 4.3 - fixed.
This commit is contained in:
parent
1c6b423e48
commit
185a27d35d
@ -97,8 +97,17 @@ function main() {
|
|||||||
utils_redirect($url);
|
utils_redirect($url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// register all Smarty modifier functions used by the admin templates
|
||||||
$smarty->registerPlugin('modifier', 'action_link', 'admin_filter_action');
|
$smarty->registerPlugin('modifier', 'action_link', 'admin_filter_action');
|
||||||
$smarty->registerPlugin('modifier', 'cmd_link', 'admin_filter_command');
|
$smarty->registerPlugin('modifier', 'cmd_link', 'admin_filter_command');
|
||||||
|
$smarty->registerPlugin('modifier', 'date', 'date');
|
||||||
|
$smarty->registerPlugin('modifier', 'entry_idtotime', 'entry_idtotime');
|
||||||
|
$smarty->registerPlugin('modifier', 'in_array', 'in_array');
|
||||||
|
$smarty->registerPlugin('modifier', 'htmlspecialchars', 'htmlspecialchars');
|
||||||
|
$smarty->registerPlugin('modifier', 'plugin_getinfo', 'plugin_getinfo');
|
||||||
|
$smarty->registerPlugin('modifier', 'sprintf', 'sprintf');
|
||||||
|
$smarty->registerPlugin('modifier', 'wp_specialchars', 'wp_specialchars');
|
||||||
|
$smarty->registerPlugin('modifier', 'wptexturize', 'wptexturize');
|
||||||
}
|
}
|
||||||
|
|
||||||
// smarty tag
|
// smarty tag
|
||||||
|
@ -104,6 +104,9 @@ function do_print_categories_list(&$lines, &$indentstack, &$result, $params) {
|
|||||||
array_push($result, $ild);
|
array_push($result, $ild);
|
||||||
|
|
||||||
$cat_entry = $params ['selected'];
|
$cat_entry = $params ['selected'];
|
||||||
|
if (!is_array($cat_entry)) {
|
||||||
|
$cat_entry = array();
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($params ['type']) && ($params ['type'] == 'form' || $params ['type'] == 'check')) {
|
if (isset($params ['type']) && ($params ['type'] == 'form' || $params ['type'] == 'check')) {
|
||||||
$string = '<label><input name="' . $catname . 'cats[' . $vid . ']" ';
|
$string = '<label><input name="' . $catname . 'cats[' . $vid . ']" ';
|
||||||
|
@ -332,6 +332,9 @@ class plugin_commentcenter {
|
|||||||
* @return integer: The behavoir
|
* @return integer: The behavoir
|
||||||
*/
|
*/
|
||||||
function behavoirFromPolicies($entry, $cats = array()) {
|
function behavoirFromPolicies($entry, $cats = array()) {
|
||||||
|
if (!is_array($cats)) {
|
||||||
|
$cats = array();
|
||||||
|
}
|
||||||
$date = date_from_id($entry);
|
$date = date_from_id($entry);
|
||||||
// check if $date is in expected format
|
// check if $date is in expected format
|
||||||
if (!array_key_exists('time', $date)) {
|
if (!array_key_exists('time', $date)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user