mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
add MultiView controller on admin page (replaces the "switch theme" button)
git-svn-id: http://piwigo.org/svn/trunk@29168 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -101,6 +101,31 @@ class MultiView
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current url minus MultiView params
|
||||
*
|
||||
* @param bool $with_amp - adds ? or & at the end of the url
|
||||
* @return string
|
||||
*/
|
||||
public function get_clean_admin_url($with_amp=false)
|
||||
{
|
||||
$url = PHPWG_ROOT_PATH.'admin.php';
|
||||
|
||||
$get = $_GET;
|
||||
unset($get['page'], $get['section'], $get['tag']);
|
||||
if (count($get) == 0 and !empty($_SERVER['QUERY_STRING']))
|
||||
{
|
||||
$url.= '?' . str_replace('&', '&', $_SERVER['QUERY_STRING']);
|
||||
}
|
||||
|
||||
if ($with_amp)
|
||||
{
|
||||
$url.= strpos($url, '?')!==false ? '&' : '?';
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered on "user_init", change current view depending of URL params.
|
||||
@@ -277,8 +302,11 @@ class MultiView
|
||||
$query = '
|
||||
SELECT
|
||||
'.$conf['user_fields']['id'].' AS id,
|
||||
'.$conf['user_fields']['username'].' AS username
|
||||
FROM '.USERS_TABLE.'
|
||||
'.$conf['user_fields']['username'].' AS username,
|
||||
status
|
||||
FROM '.USERS_TABLE.' AS u
|
||||
INNER JOIN '.USER_INFOS_TABLE.' AS i
|
||||
ON '.$conf['user_fields']['id'].' = user_id
|
||||
ORDER BY CONVERT('.$conf['user_fields']['username'].', CHAR)
|
||||
;';
|
||||
$out['users'] = array_from_query($query);
|
||||
|
||||
Reference in New Issue
Block a user