aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-01-30 22:49:24 +0000
committerz0rglub <z0rglub@piwigo.org>2004-01-30 22:49:24 +0000
commit1121543ad99f86990ca5334829bacfbc675ca5c0 (patch)
tree6b0a96ddaccb6d4ef45860918e41b703725f5975 /admin
parent6119c01fbb89224024e4ea12b2bc58352eab30ac (diff)
if a category has no last_date, the corresponding date_last in user_category
table is also NULL git-svn-id: http://piwigo.org/svn/branches/release-1_3@334 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/include/functions.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index b4c12619a..ce7fa076f 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -666,12 +666,13 @@ function update_user_category( $categories )
$query.= ')';
$query.= ';';
$row = mysql_fetch_array( mysql_query( $query ) );
- $last_date = $row['last_date'];
// insert a new line in database
if ( $value_num++ > 0 ) $values.= ', ';
else $values.= ' ';
- $values.= '('.$user_id.",".$category['id'].",'".$last_date."'";
+ $values.= '('.$user_id.",".$category['id'];
+ if ( isset( $row['last_date'] ) ) $values.= ",'".$row['last_date']."'";
+ else $values.= ',NULL';
$values.= ','.$user_nb_subcats.')';
}
update_uppercats( $category['id'] );