mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
issue #1309 compatibility PHP 8
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,8 @@ jQuery(document).ready(function(){
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
|
||||
<h2>{'User comments'|@translate} {$TABSHEET_TITLE}</h2>
|
||||
<h2>{'User comments'|@translate}{if isset($TABSHEET_TITLE)} {$TABSHEET_TITLE}{/if}
|
||||
</h2>
|
||||
|
||||
<div class="commentFilter">
|
||||
<a href="{$F_ACTION}&filter=all" class="{if $filter == 'all'}commentFilterSelected{/if}">{'All'|@translate}</a> ({$nb_total})
|
||||
|
||||
@@ -71,7 +71,11 @@ usersCache.selectize(jQuery('select.UserSearch'));
|
||||
</div>
|
||||
<div class="groupHeader">
|
||||
<div class="groupIcon">
|
||||
<div class="icon-users-1 {$grp_color}"></div>
|
||||
<div class="icon-users-1
|
||||
{if isset($grp_color)}
|
||||
{$grp_color}
|
||||
{/if}">
|
||||
</div>
|
||||
<div class="groupMessage icon-ok"></div>
|
||||
<div class="groupError icon-cancel"></div>
|
||||
</div>
|
||||
|
||||
@@ -102,10 +102,10 @@ $(window).bind("load", function() {
|
||||
{assign var='version' value=$theme.VERSION}
|
||||
{/if}
|
||||
|
||||
<div class="themeBox{if $theme.IS_DEFAULT} themeDefault{/if}">
|
||||
<div class="themeBox{if isset($theme.IS_DEFAULT) and $theme.IS_DEFAULT} themeDefault{/if}">
|
||||
<div class="themeShot"><a href="{$theme.SCREENSHOT}" class="preview-box" title="{$theme.NAME}"><img src="{$theme.SCREENSHOT}" alt=""></a></div>
|
||||
<div class="themeName" title="{$theme.NAME}">
|
||||
{$theme.NAME} {if $theme.IS_DEFAULT}<i class="icon-star" title="{'default'|@translate}"></i>{/if} {if $theme.IS_MOBILE}<i class="icon-mobile" title="{'Mobile'|translate}"></i>{/if}
|
||||
{$theme.NAME} {if isset($theme.IS_DEFAULT) and $theme.IS_DEFAULT}<i class="icon-star" title="{'default'|@translate}"></i>{/if} {if $theme.IS_MOBILE}<i class="icon-mobile" title="{'Mobile'|translate}"></i>{/if}
|
||||
<a class="icon-ellipsis-v showInfo"></a>
|
||||
</div>
|
||||
<div class="showInfo-dropdown dropdown">
|
||||
@@ -125,7 +125,7 @@ $(window).bind("load", function() {
|
||||
<span class="dropdown-option icon-trash delete-plugin-button"title="{$theme.DELETE_TOOLTIP}">{'Delete'|@translate}</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{if $theme.DEACTIVABLE}
|
||||
{if isset($theme.DEACTIVABLE) and $theme.DEACTIVABLE}
|
||||
<a href="{$deactivate_baseurl}{$theme.ID}" class="showInfo-dropdown-action tiptip icon-cancel-circled" title="{'Forbid this theme to users'|@translate}">{'Deactivate'|@translate}</a>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -136,7 +136,7 @@ $(window).bind("load", function() {
|
||||
{else}
|
||||
<div class="pluginUnavailableAction icon-cog tiptip" title="{'N/A'|translate}">{'Configuration'|@translate}</div>
|
||||
{/if}
|
||||
{if not $theme.IS_DEFAULT}
|
||||
{if isset($theme.IS_DEFAULT) and not $theme.IS_DEFAULT}
|
||||
<a href="{$set_default_baseurl}{$theme.ID}" class="tiptip icon-star" title="{'Set as default theme for unregistered and new users'|@translate}">{'Set as default'|@translate}</a>
|
||||
{else}
|
||||
<span class="tiptip icon-star" title="{'This is already the default theme'|@translate}">{'Set as default'|@translate}</span>
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
?>
|
||||
@@ -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']) )
|
||||
{
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user