aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2006-04-26 21:07:01 +0000
committerplegall <plg@piwigo.org>2006-04-26 21:07:01 +0000
commit8b493b7ae7d9fcb2839f17c319ab6ecebd2c9b19 (patch)
tree30b4c9a10d091abc97943d4195be782fa1115caf /admin
parente44b7975eb3c27417977c03588124a478ea9f22a (diff)
bug 228 fixed: use boolean value instead of strings for configuration
parameteres newcat_default_*. git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1277 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/include/functions.php10
-rw-r--r--admin/site_update.php9
2 files changed, 10 insertions, 9 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index f9435b1f1..a7402080e 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -1569,7 +1569,7 @@ SELECT MAX(rank)
$insert = array(
'name' => $category_name,
'rank' => ++$current_rank,
- 'commentable' => $conf['newcat_default_commentable'],
+ 'commentable' => boolean_to_string($conf['newcat_default_commentable']),
'uploadable' => 'false',
);
@@ -1594,7 +1594,7 @@ SELECT id, uppercats, global_rank, visible, status
}
else
{
- $insert{'visible'} = $conf['newcat_default_visible'];
+ $insert{'visible'} = boolean_to_string($conf['newcat_default_visible']);
}
// at creation, must a category be public or private ? Warning : if the
@@ -1606,13 +1606,13 @@ SELECT id, uppercats, global_rank, visible, status
}
else
{
- $insert{'status'} = $conf['newcat_default_status'];
+ $insert{'status'} = boolean_to_string($conf['newcat_default_status']);
}
}
else
{
- $insert{'visible'} = $conf['newcat_default_visible'];
- $insert{'status'} = $conf['newcat_default_status'];
+ $insert{'visible'} = boolean_to_string($conf['newcat_default_visible']);
+ $insert{'status'} = boolean_to_string($conf['newcat_default_status']);
$insert{'global_rank'} = $insert{'rank'};
}
diff --git a/admin/site_update.php b/admin/site_update.php
index 547e72c36..ac4c22c24 100644
--- a/admin/site_update.php
+++ b/admin/site_update.php
@@ -247,12 +247,13 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_id
'dir' => $dir,
'name' => str_replace('_', ' ', $dir),
'site_id' => $site_id,
- 'commentable' => $conf['newcat_default_commentable'],
+ 'commentable' =>
+ boolean_to_string($conf['newcat_default_commentable']),
'uploadable' => $site_is_remote
? false
- : $conf['newcat_default_uploadable'],
- 'status' => $conf{'newcat_default_status'},
- 'visible' => $conf{'newcat_default_visible'},
+ : boolean_to_string($conf['newcat_default_uploadable']),
+ 'status' => boolean_to_string($conf{'newcat_default_status'}),
+ 'visible' => boolean_to_string($conf{'newcat_default_visible'}),
);
if (isset($db_fulldirs[dirname($fulldir)]))