From 77aa54a32b1a3fd43cb6615bf5bba9360e21647c Mon Sep 17 00:00:00 2001
From: rub
Date: Tue, 14 Mar 2006 21:31:31 +0000
Subject: [PATCH] Step 2 improvement issue 0000127: o Allow to chage high
property on user list o Set initial value for the 2 default users
+ Correction of permissions.png in user list
git-svn-id: http://piwigo.org/svn/trunk@1079 68402e56-0260-453c-a942-63ccdbb3a9ee
---
admin/user_list.php | 19 ++++++++------
include/functions_user.inc.php | 3 ++-
install.php | 9 ++++---
language/en_UK.iso-8859-1/admin.lang.php | 6 ++++-
language/en_UK.iso-8859-1/help/user_list.html | 2 ++
language/fr_FR.iso-8859-1/admin.lang.php | 6 ++++-
language/fr_FR.iso-8859-1/help/user_list.html | 2 ++
template/yoga/admin/user_list.tpl | 25 ++++++++++++++++++-
8 files changed, 56 insertions(+), 16 deletions(-)
diff --git a/admin/user_list.php b/admin/user_list.php
index 57259ca88..6bbb5eaa1 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -96,7 +96,8 @@ function get_filtered_user_list()
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.status,
+ ui.enabled_high
FROM '.USERS_TABLE.' AS u
INNER JOIN '.USER_INFOS_TABLE.' AS ui
ON u.'.$conf['user_fields']['id'].' = ui.user_id
@@ -272,10 +273,10 @@ if (isset($_POST['delete']) and count($collection) > 0)
);
foreach ($page['filtered_users'] as $filter_key => $filter_user)
{
- if (in_array($filter_user['id'], $collection))
- {
- unset($page['filtered_users'][$filter_key]);
- }
+ if (in_array($filter_user['id'], $collection))
+ {
+ unset($page['filtered_users'][$filter_key]);
+ }
}
}
else
@@ -336,9 +337,9 @@ DELETE FROM '.USER_GROUP_TABLE.'
$formfields =
array('nb_image_line', 'nb_line_page', 'template', 'language',
'recent_period', 'maxwidth', 'expand', 'show_nb_comments',
- 'maxheight', 'status');
+ 'maxheight', 'status', 'enabled_high');
- $true_false_fields = array('expand', 'show_nb_comments');
+ $true_false_fields = array('expand', 'show_nb_comments', 'enabled_high');
foreach ($formfields as $formfield)
{
@@ -451,6 +452,7 @@ $template->assign_vars(
'L_EMAIL' => $lang['mail_address'],
'L_ORDER_BY' => $lang['order_by'],
'L_ACTIONS' => $lang['actions'],
+ 'L_PROPERTIES' => $lang['properties'],
'L_PERMISSIONS' => $lang['permissions'],
'L_USERS_LIST' => $lang['title_liste_users'],
'L_LANGUAGE' => $lang['language'],
@@ -801,7 +803,8 @@ foreach ($page['filtered_users'] as $num => $local_user)
'USERNAME' => $local_user['username'],
'STATUS' => $lang['user_status_'.$local_user['status']],
'EMAIL' => isset($local_user['email']) ? $local_user['email'] : '',
- 'GROUPS' => $groups_string
+ 'GROUPS' => $groups_string,
+ 'PROPERTIES' => (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true')) ? $lang['is_high_enabled'] : $lang['is_high_disabled']
)
);
}
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 9e4a83b94..ea2cfbfbe 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -451,7 +451,8 @@ function create_user_infos($user_id)
'show_nb_comments' => boolean_to_string($conf['show_nb_comments']),
'maxwidth' => $conf['default_maxwidth'],
'maxheight' => $conf['default_maxheight'],
- 'registration_date' => $dbnow
+ 'registration_date' => $dbnow,
+ 'enabled_high' => $conf['newuser_default_enabled_high']
);
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
diff --git a/install.php b/install.php
index 11c68f60f..cafe5288b 100644
--- a/install.php
+++ b/install.php
@@ -185,6 +185,7 @@ if (@file_exists($config_file))
$prefixeTable = $table_prefix;
include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
+@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
include(PHPWG_ROOT_PATH . 'include/constants.php');
include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
include(PHPWG_ROOT_PATH . 'include/template.php');
@@ -309,9 +310,9 @@ INSERT INTO '.USERS_TABLE.'
$query = '
INSERT INTO '.USER_INFOS_TABLE.'
- (user_id,status,language)
+ (user_id,status,language,enabled_high)
VALUES
- (1, \'webmaster\', \''.$language.'\')
+ (1, \'webmaster\', \''.$language.'\',\''.$conf['newuser_default_enabled_high'].'\')
;';
mysql_query($query);
@@ -333,9 +334,9 @@ INSERT INTO '.USERS_TABLE.'
$query = '
INSERT INTO '.USER_INFOS_TABLE.'
- (user_id,status,language)
+ (user_id,status,language,enabled_high)
VALUES
- (2, \'guest\', \''.$language.'\')
+ (2, \'guest\', \''.$language.'\',\'false\')
;';
mysql_query($query);
diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php
index 0fe6d6606..2597b7a3a 100644
--- a/language/en_UK.iso-8859-1/admin.lang.php
+++ b/language/en_UK.iso-8859-1/admin.lang.php
@@ -161,7 +161,11 @@ $lang['You are running on development sources, no check possible.'] = 'You are r
$lang['You are running the latest version of PhpWebGallery.'] = 'You are running the latest version of PhpWebGallery.';
$lang['You cannot move a category in its own sub category'] = 'You cannot move a category in its own sub category';
$lang['You need to confirm deletion'] = 'You need to confirm deletion';
-$lang['actions'] = 'actions';
+$lang['actions'] = 'Actions';
+$lang['properties'] = 'Properties';
+$lang['is_high_enabled'] = 'High definition';
+$lang['is_high_disabled'] = '';
+$lang['enabled_high'] = 'High definition enabled';
$lang['add keywords'] = 'add keywords';
$lang['associate to category'] = 'associate to category';
$lang['associate to group'] = 'associate to group';
diff --git a/language/en_UK.iso-8859-1/help/user_list.html b/language/en_UK.iso-8859-1/help/user_list.html
index 4bc00081b..fb1874546 100644
--- a/language/en_UK.iso-8859-1/help/user_list.html
+++ b/language/en_UK.iso-8859-1/help/user_list.html
@@ -25,6 +25,8 @@ or descending order.
associate or dissociate from groups
modify display properties
+
+
modify additional properties
diff --git a/language/fr_FR.iso-8859-1/admin.lang.php b/language/fr_FR.iso-8859-1/admin.lang.php
index 900d412df..013f5829d 100644
--- a/language/fr_FR.iso-8859-1/admin.lang.php
+++ b/language/fr_FR.iso-8859-1/admin.lang.php
@@ -161,7 +161,11 @@ $lang['You are running on development sources, no check possible.'] = 'Vous trav
$lang['You are running the latest version of PhpWebGallery.'] = 'Vous utilisez la dernière version de PhpWebGallery.';
$lang['You cannot move a category in its own sub category'] = 'Vous ne pouvez pas déplacer une catégorie dans sa propre sous-catégorie';
$lang['You need to confirm deletion'] = 'Vous devez confirmer la suppression';
-$lang['actions'] = 'actions';
+$lang['actions'] = 'Actions';
+$lang['properties'] = 'Propriétés';
+$lang['is_high_enabled'] = 'Haute définition';
+$lang['is_high_disabled'] = '';
+$lang['enabled_high'] = 'Haute définition actif';
$lang['add keywords'] = 'ajouter des mots-clef';
$lang['associate to category'] = 'associer à la catégorie';
$lang['associate to group'] = 'associer au groupe';
diff --git a/language/fr_FR.iso-8859-1/help/user_list.html b/language/fr_FR.iso-8859-1/help/user_list.html
index bb247775d..1ce294ca2 100644
--- a/language/fr_FR.iso-8859-1/help/user_list.html
+++ b/language/fr_FR.iso-8859-1/help/user_list.html
@@ -27,6 +27,8 @@ simultan
modifier les propriétés d'affichage
+
modifier les propriétés annexes
+
La cible est la liste des utilisateurs sélectionnés (par défaut) ou bien
diff --git a/template/yoga/admin/user_list.tpl b/template/yoga/admin/user_list.tpl
index deb85b638..d4a45aa63 100644
--- a/template/yoga/admin/user_list.tpl
+++ b/template/yoga/admin/user_list.tpl
@@ -80,6 +80,7 @@