aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2010-12-14 13:47:24 +0000
committerpatdenice <patdenice@piwigo.org>2010-12-14 13:47:24 +0000
commit731f8888a45d4b48e94bff05187e0e2ca40d4ef5 (patch)
tree1fc44a3a59beafe636b74127498d0ed62decdc76 /include
parentbf1aa6fcf1f6d9038a0723e4f0213e416ec5ee62 (diff)
feature 2060: Remove adviser mode.
First commit: only php files. git-svn-id: http://piwigo.org/svn/trunk@8126 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/common.inc.php5
-rw-r--r--include/functions_user.inc.php17
-rw-r--r--include/template.class.php3
-rw-r--r--include/ws_functions.inc.php22
4 files changed, 16 insertions, 31 deletions
diff --git a/include/common.inc.php b/include/common.inc.php
index 71aa78c44..061c7246a 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -207,11 +207,6 @@ if ($conf['check_upgrade_feed'])
}
}
-if (is_adviser())
-{
- $header_msgs[] = l10n('Adviser mode enabled');
-}
-
if (count($header_msgs) > 0)
{
$template->assign('header_msgs', $header_msgs);
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 090c2e701..1bd3fe03a 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -1319,14 +1319,12 @@ function check_status($access_type, $user_status = '')
}
/*
- * Return if current user is an adviser
- * @return bool
+ * Adviser status is depreciated from piwigo 2.2
+ * @return false
*/
function is_adviser()
{
- global $user;
-
- return ($user['adviser'] == 'true');
+ return false;
}
/*
@@ -1384,14 +1382,7 @@ function get_email_address_as_display_text($email_address)
}
else
{
- if (defined('IN_ADMIN') and is_adviser())
- {
- return 'adviser.mode@'.$_SERVER['SERVER_NAME'];
- }
- else
- {
- return $email_address;
- }
+ return $email_address;
}
}
diff --git a/include/template.class.php b/include/template.class.php
index 4ec79a9d2..4f33a3569 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -353,8 +353,7 @@ class Template {
}
$this->smarty->assign( 'ROOT_URL', get_root_url() );
- $this->smarty->assign( 'TAG_INPUT_ENABLED',
- ((is_adviser()) ? 'disabled="disabled" onclick="return false;"' : ''));
+ $this->smarty->assign( 'TAG_INPUT_ENABLED', '');
$save_compile_id = $this->smarty->compile_id;
$this->load_external_filters($handle);
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index 24d8e25ae..c46ae6e26 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -892,7 +892,7 @@ SELECT * FROM '.IMAGES_TABLE.'
function ws_images_setPrivacyLevel($params, &$service)
{
- if (!is_admin() || is_adviser() )
+ if (!is_admin())
{
return new PwgError(401, 'Access denied');
}
@@ -935,7 +935,7 @@ function ws_images_add_chunk($params, &$service)
// type {thumb, file, high}
// position
- if (!is_admin() || is_adviser() )
+ if (!is_admin())
{
return new PwgError(401, 'Access denied');
}
@@ -1139,7 +1139,7 @@ function ws_images_addFile($params, &$service)
// sum
global $conf;
- if (!is_admin() || is_adviser() )
+ if (!is_admin())
{
return new PwgError(401, 'Access denied');
}
@@ -1208,7 +1208,7 @@ SELECT
function ws_images_add($params, &$service)
{
global $conf;
- if (!is_admin() || is_adviser() )
+ if (!is_admin())
{
return new PwgError(401, 'Access denied');
}
@@ -1584,7 +1584,7 @@ LIMIT '.(int)$params['per_page'].' OFFSET '.(int)($params['per_page']*$params['p
function ws_categories_add($params, &$service)
{
- if (!is_admin() or is_adviser())
+ if (!is_admin())
{
return new PwgError(401, 'Access denied');
}
@@ -1608,7 +1608,7 @@ function ws_categories_add($params, &$service)
function ws_tags_add($params, &$service)
{
- if (!is_admin() or is_adviser())
+ if (!is_admin())
{
return new PwgError(401, 'Access denied');
}
@@ -1629,7 +1629,7 @@ function ws_images_exist($params, &$service)
{
global $conf;
- if (!is_admin() or is_adviser())
+ if (!is_admin())
{
return new PwgError(401, 'Access denied');
}
@@ -1705,7 +1705,7 @@ SELECT
function ws_images_checkFiles($params, &$service)
{
- if (!is_admin() or is_adviser())
+ if (!is_admin())
{
return new PwgError(401, 'Access denied');
}
@@ -1790,7 +1790,7 @@ function file_path_for_type($file_path, $type='thumb')
function ws_images_setInfo($params, &$service)
{
global $conf;
- if (!is_admin() || is_adviser() )
+ if (!is_admin())
{
return new PwgError(401, 'Access denied');
}
@@ -2073,7 +2073,7 @@ SELECT
function ws_categories_setInfo($params, &$service)
{
global $conf;
- if (!is_admin() || is_adviser() )
+ if (!is_admin())
{
return new PwgError(401, 'Access denied');
}
@@ -2147,7 +2147,7 @@ function ws_images_checkUpload($params, &$service)
{
global $conf;
- if (!is_admin() or is_adviser())
+ if (!is_admin())
{
return new PwgError(401, 'Access denied');
}