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);
|
||||
}
|
||||
|
||||
// register all Smarty modifier functions used by the admin templates
|
||||
$smarty->registerPlugin('modifier', 'action_link', 'admin_filter_action');
|
||||
$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
|
||||
|
@ -104,6 +104,9 @@ function do_print_categories_list(&$lines, &$indentstack, &$result, $params) {
|
||||
array_push($result, $ild);
|
||||
|
||||
$cat_entry = $params ['selected'];
|
||||
if (!is_array($cat_entry)) {
|
||||
$cat_entry = array();
|
||||
}
|
||||
|
||||
if (isset($params ['type']) && ($params ['type'] == 'form' || $params ['type'] == 'check')) {
|
||||
$string = '<label><input name="' . $catname . 'cats[' . $vid . ']" ';
|
||||
@ -138,7 +141,7 @@ function do_print_categories_list(&$lines, &$indentstack, &$result, $params) {
|
||||
} elseif (isset($params ['type']) && $params ['type'] == 'linked') {
|
||||
$after = '</a>';
|
||||
if (isset($params ['count']) && $params ['count']) {
|
||||
$index = & $fpdb->get_index($vid);
|
||||
$index = &$fpdb->get_index($vid);
|
||||
$count = ($index) ? $index->length() : 0;
|
||||
$after = " ($count) " . $after;
|
||||
}
|
||||
|
@ -332,6 +332,9 @@ class plugin_commentcenter {
|
||||
* @return integer: The behavoir
|
||||
*/
|
||||
function behavoirFromPolicies($entry, $cats = array()) {
|
||||
if (!is_array($cats)) {
|
||||
$cats = array();
|
||||
}
|
||||
$date = date_from_id($entry);
|
||||
// check if $date is in expected format
|
||||
if (!array_key_exists('time', $date)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user