aboutsummaryrefslogtreecommitdiffstats
path: root/admin/site_manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/site_manager.php')
-rw-r--r--admin/site_manager.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/admin/site_manager.php b/admin/site_manager.php
index 4730b3c77..2d75feaec 100644
--- a/admin/site_manager.php
+++ b/admin/site_manager.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org |
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
// +-----------------------------------------------------------------------+
@@ -31,6 +31,12 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
// +-----------------------------------------------------------------------+
// | Check Access and exit when user status is not ok |
// +-----------------------------------------------------------------------+
+
+if (!$conf['enable_synchronization'])
+{
+ die('synchronization is disabled');
+}
+
check_status(ACCESS_ADMINISTRATOR);
if (!empty($_POST) or isset($_GET['action']))
@@ -69,15 +75,13 @@ SELECT COUNT(id) AS count
$row = pwg_db_fetch_assoc(pwg_query($query));
if ($row['count'] > 0)
{
- array_push($page['errors'],
- l10n('This site already exists').' ['.$url.']');
+ $page['errors'][] = l10n('This site already exists').' ['.$url.']';
}
if (count($page['errors']) == 0)
{
if ( ! file_exists($url) )
{
- array_push($page['errors'],
- l10n('Directory does not exist').' ['.$url.']');
+ $page['errors'][] = l10n('Directory does not exist').' ['.$url.']';
}
}
@@ -90,8 +94,7 @@ INSERT INTO '.SITES_TABLE.'
(\''.$url.'\')
;';
pwg_query($query);
- array_push($page['infos'],
- $url.' '.l10n('created'));
+ $page['infos'][] = $url.' '.l10n('created');
}
}
@@ -115,8 +118,7 @@ SELECT galleries_url
case 'delete' :
{
delete_site($page['site']);
- array_push($page['infos'],
- $galleries_url.' '.l10n('deleted'));
+ $page['infos'][] = $galleries_url.' '.l10n('deleted');
break;
}
}