feature 2060: Remove adviser from db structure.

Remove adviser from user_list page and some db queries.

git-svn-id: http://piwigo.org/svn/trunk@8131 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
patdenice
2010-12-14 14:36:20 +00:00
parent 21fe811c3b
commit e97974a42e
13 changed files with 7 additions and 51 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ $navigation.= '</a>';
// +-----------------------------------------------------------------------+
// | virtual categories management |
// +-----------------------------------------------------------------------+
// request to delete a virtual category / not for an adviser
// request to delete a virtual category
if (isset($_GET['delete']) and is_numeric($_GET['delete']))
{
delete_categories(array($_GET['delete']));
+1 -1
View File
@@ -29,7 +29,7 @@ INPUT.radio, INPUT.checkbox {
/**
* Header message like upgrade or adviser mode
* Header message like upgrade
*/
.header_msgs {
text-align:center;
@@ -28,10 +28,8 @@
</tr>
{/foreach}
</table>
{if !is_adviser()}
<p>
<input class="submit" type="submit" value="{'Submit'|@translate}" name="submit">
</p>
{/if}
</form>
{/if}
@@ -120,19 +120,6 @@
</select>
</td>
</tr>
{if isset($adviser)}
<tr>
<td>{'Adviser'|@translate}</td>
<td>
<label><input type="radio" name="adviser" value="leave" checked="checked"> {'leave'|@translate}</label>
/ {'set to'|@translate}
<label><input type="radio" name="adviser" value="true">{'Yes'|@translate}</label>
<label><input type="radio" name="adviser" value="false">{'No'|@translate}</label>
</td>
</tr>
{/if}
</table>
</fieldset>
+1 -21
View File
@@ -86,7 +86,6 @@ SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
u.'.$conf['user_fields']['username'].' AS username,
u.'.$conf['user_fields']['email'].' AS email,
ui.status,
ui.adviser,
ui.enabled_high,
ui.level
FROM '.USERS_TABLE.' AS u
@@ -392,11 +391,6 @@ DELETE FROM '.USER_GROUP_TABLE.'
$true_false_fields = array('expand', 'show_nb_comments',
'show_nb_hits', 'enabled_high');
if ($conf['allow_adviser'])
{
array_push($formfields, 'adviser');
array_push($true_false_fields, 'adviser');
}
foreach ($formfields as $formfield)
{
@@ -458,12 +452,6 @@ DELETE FROM '.USER_GROUP_TABLE.'
$data['status'] = 'guest';
}
}
// could not be adivser
if (isset($data['adviser']))
{
$data['adviser'] = 'false';
}
}
array_push($datas, $data);
@@ -523,12 +511,6 @@ $template->assign(
'F_FILTER_ACTION' => get_root_url().'admin.php'
));
// Hide radio-button if not allow to assign adviser
if ($conf['allow_adviser'])
{
$template->assign('adviser', true);
}
// Display or Hide double password type
$template->assign('Double_Password', $conf['double_password_type_in_admin'] );
@@ -707,9 +689,7 @@ foreach ($visible_user_list as $local_user)
? '<br>['.l10n('guest').']' : '')
.($local_user['id'] == $conf['default_user_id']
? '<br>['.l10n('default values').']' : ''),
'STATUS' => l10n('user_status_'.
$local_user['status']).(($local_user['adviser'] == 'true')
? '<br>['.l10n('Adviser').']' : ''),
'STATUS' => l10n('user_status_'.$local_user['status']),
'EMAIL' => get_email_address_as_display_text($local_user['email']),
'GROUPS' => $groups_string,
'PROPERTIES' => implode( ', ', $properties),