From 020d991cb1c4684877d2eadf87d42c334fc28a31 Mon Sep 17 00:00:00 2001 From: z0rglub Date: Sat, 17 Jan 2004 18:13:12 +0000 Subject: 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 --- admin/configuration.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'admin/configuration.php') 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 ); -- cgit v1.2.3