aboutsummaryrefslogtreecommitdiffstats
path: root/admin/configuration.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2003-09-17 20:40:15 +0000
committerz0rglub <z0rglub@piwigo.org>2003-09-17 20:40:15 +0000
commit7c16e8f34367970518fc4d272bfcddb9bd2e46d7 (patch)
tree4147b09698be1eaa32077708e378fb04a9b1768a /admin/configuration.php
parent4ea1d5ced3dd51180df2a42b31a2929fa3cb80a8 (diff)
If we delete a picture which is logically linked to a category, the
informations about this category are not updated (number of pictures and date of last picture) -> use of update_category( 'all' ) git-svn-id: http://piwigo.org/svn/trunk@130 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/configuration.php')
-rw-r--r--admin/configuration.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index b1516bfbb..1714a78bc 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -68,7 +68,14 @@ if ( isset( $_POST['submit'] ) )
while ( $row = mysql_fetch_array( $result ) )
{
$site = 'delete_site_'.$row['id'];
- if ( $_POST[$site] == 1 ) delete_site( $row['id'] );
+ if ( $_POST[$site] == 1 )
+ {
+ delete_site( $row['id'] );
+ // if any picture of this site were linked to another categories, we
+ // have to update the informations of those categories. To make it
+ // simple, we just update all the categories
+ update_category( 'all' );
+ }
}
// thumbnail prefix must not contain accentuated characters
$old_prefix = $_POST['prefix_thumbnail'];