diff --git a/admin/themes/default/js/cat_move.js b/admin/themes/default/js/cat_move.js index 709adb517..0abd41687 100644 --- a/admin/themes/default/js/cat_move.js +++ b/admin/themes/default/js/cat_move.js @@ -63,10 +63,14 @@ $(document).ready(() => { cont.find(".icon-folder-open, .icon-sitemap").addClass(colors[colorId]); } - var url_split = window.location.href.split("&"); + var url_split = window.location.href.split("#"); var catToOpen = url_split[url_split.length-1].split("-")[1]; - if(catToOpen) { + function isNumeric(num){ + return !isNaN(num) + } + + if(catToOpen && isNumeric(catToOpen)) { goToNode($('.tree').tree('getNodeById', catToOpen), $('.tree').tree('getNodeById', catToOpen)); } diff --git a/admin/themes/default/template/comments.tpl b/admin/themes/default/template/comments.tpl index 6e0c351c2..9e21d7872 100644 --- a/admin/themes/default/template/comments.tpl +++ b/admin/themes/default/template/comments.tpl @@ -43,7 +43,8 @@ jQuery(document).ready(function(){ }); {/literal}{/footer_script} -

{'User comments'|@translate} {$TABSHEET_TITLE}

+

{'User comments'|@translate}{if isset($TABSHEET_TITLE)} {$TABSHEET_TITLE}{/if} +

{'All'|@translate} ({$nb_total}) diff --git a/admin/themes/default/template/group_list.tpl b/admin/themes/default/template/group_list.tpl index 82781575c..8f75fe7e0 100644 --- a/admin/themes/default/template/group_list.tpl +++ b/admin/themes/default/template/group_list.tpl @@ -71,7 +71,11 @@ usersCache.selectize(jQuery('select.UserSearch'));
-
+
+
diff --git a/admin/themes/default/template/themes_installed.tpl b/admin/themes/default/template/themes_installed.tpl index afca3f721..ba1ecb375 100644 --- a/admin/themes/default/template/themes_installed.tpl +++ b/admin/themes/default/template/themes_installed.tpl @@ -102,10 +102,10 @@ $(window).bind("load", function() { {assign var='version' value=$theme.VERSION} {/if} -
+
- {$theme.NAME} {if $theme.IS_DEFAULT}{/if} {if $theme.IS_MOBILE}{/if} + {$theme.NAME} {if isset($theme.IS_DEFAULT) and $theme.IS_DEFAULT}{/if} {if $theme.IS_MOBILE}{/if}
@@ -136,7 +136,7 @@ $(window).bind("load", function() { {else}
{'Configuration'|@translate}
{/if} - {if not $theme.IS_DEFAULT} + {if isset($theme.IS_DEFAULT) and not $theme.IS_DEFAULT} {'Set as default'|@translate} {else} {'Set as default'|@translate} diff --git a/admin/themes_installed.php b/admin/themes_installed.php index 7d92f5b82..2b6d3c173 100644 --- a/admin/themes_installed.php +++ b/admin/themes_installed.php @@ -146,7 +146,7 @@ function cmp($a, $b) if($a['STATE'] == $b['STATE']) return strcasecmp($a['NAME'], $b['NAME']); else - return $s[$a['STATE']] >= $s[$b['STATE']]; + return $s[$a['STATE']] <=> $s[$b['STATE']]; } usort($tpl_themes, 'cmp'); diff --git a/admin/user_activity.php b/admin/user_activity.php index cd70e4f12..948eefc1e 100644 --- a/admin/user_activity.php +++ b/admin/user_activity.php @@ -34,6 +34,12 @@ $template->assign('ADMIN_PAGE_TITLE', l10n('User Activity logs')); // +-----------------------------------------------------------------------+ // | sending html code | // +-----------------------------------------------------------------------+ +$template->assign(array( + 'PWG_TOKEN' => get_pwg_token(), + 'INHERIT' => $conf['inheritance_by_default'], + 'CACHE_KEYS' => get_admin_client_cache_keys(array('users')), + )); + $template->assign_var_from_handle('ADMIN_CONTENT', 'user_activity'); ?> \ No newline at end of file diff --git a/include/ws_core.inc.php b/include/ws_core.inc.php index 845cd2a1b..cc3827394 100644 --- a/include/ws_core.inc.php +++ b/include/ws_core.inc.php @@ -584,7 +584,14 @@ Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseF } $result = trigger_change('ws_invoke_allowed', true, $methodName, $params); - if ( strtolower( @get_class($result) )!='pwgerror') + + $is_error = false; + if (is_object($result) and strtolower( get_class($result) ) == 'pwgerror') + { + $is_error = true; + } + + if (!$is_error) { if ( !empty($method['include']) ) { diff --git a/include/ws_protocols/json_encoder.php b/include/ws_protocols/json_encoder.php index 641572537..b4b265d3b 100644 --- a/include/ws_protocols/json_encoder.php +++ b/include/ws_protocols/json_encoder.php @@ -10,8 +10,7 @@ class PwgJsonEncoder extends PwgResponseEncoder { function encodeResponse($response) { - $respClass = strtolower( @get_class($response) ); - if ($respClass=='pwgerror') + if (is_object($response) and strtolower(get_class($response)) == 'pwgerror') { return json_encode( array(