aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-01-17 18:13:12 +0000
committerz0rglub <z0rglub@piwigo.org>2004-01-17 18:13:12 +0000
commit020d991cb1c4684877d2eadf87d42c334fc28a31 (patch)
tree70d8315864d612218afd6839baae7548461b645d
parenta2626afceee9ca1c82dcf0e4f6de8f7f0205b0be (diff)
synchronize user calculated data if a (some) site is deleted
git-svn-id: http://piwigo.org/svn/branches/release-1_3@283 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/configuration.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index 69c0fb4fb..c84ace657 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -60,6 +60,7 @@ if ( isset( $_POST['submit'] ) )
mysql_query( $query );
}
// deletion of site as asked
+ $site_deleted = false;
$query = 'SELECT id';
$query.= ' FROM '.PREFIX_TABLE.'sites';
$query.= " WHERE galleries_url <> './galleries/';";
@@ -70,12 +71,17 @@ if ( isset( $_POST['submit'] ) )
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' );
+ $site_deleted = true;
}
}
+ // 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
+ if ( $site_deleted )
+ {
+ update_category( 'all' );
+ synchronize_all_users();
+ }
// thumbnail prefix must not contain accentuated characters
$old_prefix = $_POST['prefix_thumbnail'];
$prefix = strtr( $_POST['prefix_thumbnail'], $Caracs );