aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-09-25 18:31:55 +0000
committerplegall <plg@piwigo.org>2005-09-25 18:31:55 +0000
commit8f058fcc9bcff868a29be0e8077eb7fed1b37f6f (patch)
tree89ac5a2622a388417f1d1f514b0531c86091af5b
parent4c949342ec4f6a7479396385af592cf8630ff79f (diff)
- bug fixed: HTML error on nested UL in categories menu.
- bug 161 fixed: guest_id not taken into account for history table insert. - bug 164 fixed: category inserted in history table becomes too long if HTML tags are kept. git-svn-id: http://piwigo.org/svn/trunk@876 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--doc/ChangeLog14
-rw-r--r--include/functions.inc.php7
-rw-r--r--include/functions_html.inc.php18
-rw-r--r--language/en_UK.iso-8859-1/admin.lang.php1
-rw-r--r--language/fr_FR.iso-8859-1/admin.lang.php1
-rw-r--r--template/yoga/menubar.css10
6 files changed, 38 insertions, 13 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index a42e336a7..5a013857d 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,7 +1,19 @@
-2005-09-21 Pierrick LE GALL
+2005-09-24 Pierrick LE GALL
+
+ * bug fixed: HTML error on nested UL in categories menu.
+
+ * bug 161 fixed: guest_id not taken into account for history table
+ insert.
+
+ * bug 164 fixed: category inserted in history table becomes too
+ long if HTML tags are kept.
+
+2005-09-24 Pierrick LE GALL
* bug 162 fixed: division by zero when trying to view "all" items
in admin/element_set_(global|unit)
+
+ * bug 156 fixed: error when selection is empty was not catched.
2005-09-21 Pierrick LE GALL
diff --git a/include/functions.inc.php b/include/functions.inc.php
index ae5f46415..0c4e462e9 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -354,15 +354,18 @@ function pwg_log( $file, $category, $picture = '' )
if ($conf['log'])
{
+ $login = ($user['id'] == $conf['guest_id'])
+ ? 'guest' : addslashes($user['username']);
+
$query = '
INSERT INTO '.HISTORY_TABLE.'
(date,login,IP,file,category,picture)
VALUES
(NOW(),
- \''.(($user['id'] == 2) ? 'guest' : addslashes($user['username'])).'\',
+ \''.$login.'\',
\''.$_SERVER['REMOTE_ADDR'].'\',
\''.addslashes($file).'\',
- \''.addslashes($category).'\',
+ \''.addslashes(strip_tags($category)).'\',
\''.addslashes($picture).'\')
;';
pwg_query($query);
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index ae5d5ef47..b49533db4 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -339,21 +339,26 @@ function get_html_menu_category($categories)
global $page, $lang;
$ref_level = 0;
- $menu = '
- <ul class="menu">';
+ $menu = '';
foreach ($categories as $category)
{
- $level = substr_count($category['global_rank'], '.');
+ $level = substr_count($category['global_rank'], '.') + 1;
if ($level > $ref_level)
{
$menu.= '
- <ul class="menu">';
+ <ul>';
+ }
+ else if ($level == $ref_level)
+ {
+ $menu.= '
+ </li>';
}
else if ($level < $ref_level)
{
// we may have to close more than one level at the same time...
$menu.= str_repeat("\n</ul>",($ref_level-$level));
+ $menu.= "\n</li>";
}
$ref_level = $level;
@@ -382,12 +387,9 @@ function get_html_menu_category($categories)
$menu.= '</span>';
$menu.= get_icon($category['date_last']);
}
-
- $menu.= '
- </li>';
}
- $menu.= '
+ $menu.= '</li>
</ul>';
return $menu;
diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php
index df7c0e5f1..acfed6d0e 100644
--- a/language/en_UK.iso-8859-1/admin.lang.php
+++ b/language/en_UK.iso-8859-1/admin.lang.php
@@ -115,6 +115,7 @@ $lang['Representation of categories'] = 'Representation of categories';
$lang['Representative'] = 'Representative';
$lang['Represents'] = 'Represents';
$lang['Save order'] = 'Save order';
+$lang['Select at least one picture'] = 'Select at least one picture';
$lang['Select at least one user'] = 'Select at least one user';
$lang['Show info'] = 'Show info';
$lang['Show number of comments'] = 'Show number of comments';
diff --git a/language/fr_FR.iso-8859-1/admin.lang.php b/language/fr_FR.iso-8859-1/admin.lang.php
index 0644414df..71197ab5c 100644
--- a/language/fr_FR.iso-8859-1/admin.lang.php
+++ b/language/fr_FR.iso-8859-1/admin.lang.php
@@ -115,6 +115,7 @@ $lang['Representation of categories'] = 'Représentation des catégories';
$lang['Representative'] = 'Représentant';
$lang['Represents'] = 'Représente';
$lang['Save order'] = 'Sauvegarder l\'ordre';
+$lang['Select at least one picture'] = 'Sélectionner au moins une image';
$lang['Select at least one user'] = 'Séléctionner au moins un utilisateur';
$lang['Show info'] = 'Montrer les informations';
$lang['Show number of comments'] = 'Montrer le nombre de commentaires';
diff --git a/template/yoga/menubar.css b/template/yoga/menubar.css
index 9f2b9c2a3..f5a7c80a3 100644
--- a/template/yoga/menubar.css
+++ b/template/yoga/menubar.css
@@ -49,9 +49,15 @@ BODY#theAdminPage #menubar {
font-size: 100%;
margin-top: 0;
}
-#menubar LI.selected {
- font-weight: bold;
+
+#menubar LI.selected A {
+ font-weight: bold;
+}
+
+#menubar LI.selected LI A {
+ font-weight: normal;
}
+
#menubar HR {
display: block;
margin: 10px auto;