aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin.php21
-rw-r--r--admin/cat_list.php8
-rw-r--r--admin/configuration.php13
-rw-r--r--admin/remote_site.php2
-rw-r--r--admin/update.php3
5 files changed, 21 insertions, 26 deletions
diff --git a/admin.php b/admin.php
index 192648256..9dd06ba8e 100644
--- a/admin.php
+++ b/admin.php
@@ -132,6 +132,12 @@ switch ( $_GET['page'] )
$page_valide = true;
break;
}
+ case 'cat_options' :
+ {
+ $title = $lang['title_cat_options'];
+ $page_valide = true;
+ break;
+ }
default:
$title = $lang['title_default']; break;
}
@@ -159,6 +165,7 @@ if ( mysql_num_rows( $result ) > 0 )
}
$link_start = PHPWG_ROOT_PATH.'admin.php?page=';
+$conf_link = $link_start.'configuration&section=';
//----------------------------------------------------- template initialization
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filenames( array('admin'=>'admin.tpl') );
@@ -192,13 +199,14 @@ $template->assign_vars(array(
'L_GROUPS'=>$lang['groups'],
'L_AUTH'=>$lang['permissions'],
'L_UPDATE'=>$lang['update'],
+ 'L_CAT_OPTIONS'=>$lang['cat_options_menu'],
- 'U_CONFIG_GENERAL'=>add_session_id($link_start.'configuration&section=general' ),
- 'U_CONFIG_COMMENTS'=>add_session_id($link_start.'configuration&section=comments' ),
- 'U_CONFIG_DISPLAY'=>add_session_id($link_start.'configuration&section=default' ),
- 'U_CONFIG_UPLOAD'=>add_session_id($link_start.'configuration&section=upload' ),
- 'U_CONFIG_SESSION'=>add_session_id($link_start.'configuration&section=session' ),
- 'U_CONFIG_METADATA'=>add_session_id($link_start.'configuration&section=metadata' ),
+ 'U_CONFIG_GENERAL'=>add_session_id($conf_link.'general' ),
+ 'U_CONFIG_COMMENTS'=>add_session_id($conf_link.'comments' ),
+ 'U_CONFIG_DISPLAY'=>add_session_id($conf_link.'default' ),
+ 'U_CONFIG_UPLOAD'=>add_session_id($conf_link.'upload' ),
+ 'U_CONFIG_SESSION'=>add_session_id($conf_link.'session' ),
+ 'U_CONFIG_METADATA'=>add_session_id($conf_link.'metadata' ),
'U_SITES'=>add_session_id($link_start.'remote_site'),
'U_PHPINFO'=>add_session_id($link_start.'admin_phpinfo' ),
'U_USERS'=>add_session_id($link_start.'user_search' ),
@@ -211,6 +219,7 @@ $template->assign_vars(array(
'U_THUMBNAILS'=>add_session_id($link_start.'thumbnail' ),
'U_HISTORY'=>add_session_id($link_start.'stats' ),
'U_FAQ'=>add_session_id($link_start.'help' ),
+ 'U_CAT_OPTIONS'=>add_session_id($link_start.'cat_options'),
'U_RETURN'=>add_session_id(PHPWG_ROOT_PATH.'category.php')
));
diff --git a/admin/cat_list.php b/admin/cat_list.php
index ca3953f78..c57840481 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -40,7 +40,7 @@ $navigation = $lang['gallery_index'];
// +-----------------------------------------------------------------------+
// | virtual categories management |
// +-----------------------------------------------------------------------+
-// request to add a virtual category
+// request to delete a virtual category
if (isset($_GET['delete']) and is_numeric($_GET['delete']))
{
$to_delete_categories = array();
@@ -48,7 +48,7 @@ if (isset($_GET['delete']) and is_numeric($_GET['delete']))
delete_categories($to_delete_categories);
array_push($infos, $lang['cat_list_virtual_category_deleted']);
}
-// request to delete a virtual category
+// request to add a virtual category
else if (isset($_POST['submit']))
{
// is the given category name only containing blank spaces ?
@@ -75,9 +75,9 @@ SELECT uppercats
// we have then to add the virtual category
$query = '
INSERT INTO '.CATEGORIES_TABLE.'
- (name,id_uppercat,rank)
+ (name,id_uppercat,rank,site_id)
VALUES
- (\''.$_POST['virtual_name'].'\','.$parent_id.','.$_POST['rank'].')
+ (\''.$_POST['virtual_name'].'\','.$parent_id.','.$_POST['rank'].',NULL)
;';
pwg_query($query);
diff --git a/admin/configuration.php b/admin/configuration.php
index bec557c5b..417d6416f 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -199,8 +199,6 @@ switch ($page['section'])
}
case 'comments' :
{
- $show_yes = ($conf['show_comments']=='true')?'checked="checked"':'';
- $show_no = ($conf['show_comments']=='false')?'checked="checked"':'';
$all_yes = ($conf['comments_forall']=='true')?'checked="checked"':'';
$all_no = ($conf['comments_forall']=='false')?'checked="checked"':'';
$validate_yes = ($conf['comments_validation']=='true')?'checked="checked"':'';
@@ -210,8 +208,6 @@ switch ($page['section'])
'comments',
array(
'L_CONF_TITLE'=>$lang['conf_comments_title'],
- 'L_CONF_SHOW_COMMENTS'=>$lang['conf_show_comments'],
- 'L_CONF_SHOW_COMMENTS_INFO'=>$lang['conf_show_comments_info'],
'L_CONF_COMMENTS_ALL'=>$lang['conf_comments_forall'],
'L_CONF_COMMENTS_ALL_INFO'=>$lang['conf_comments_forall_info'],
'L_CONF_NB_COMMENTS_PAGE'=>$lang['conf_nb_comment_page'],
@@ -220,8 +216,6 @@ switch ($page['section'])
'L_CONF_VALIDATE_INFO'=>$lang['conf_comments_validation_info'],
'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
- 'SHOW_COMMENTS_YES'=>$show_yes,
- 'SHOW_COMMENTS_NO'=>$show_no,
'COMMENTS_ALL_YES'=>$all_yes,
'COMMENTS_ALL_NO'=>$all_no,
'VALIDATE_YES'=>$validate_yes,
@@ -270,15 +264,10 @@ switch ($page['section'])
}
case 'upload' :
{
- $upload_yes = ($conf['upload_available']=='true')?'checked="checked"':'';
- $upload_no = ($conf['upload_available']=='false')?'checked="checked"':'';
-
$template->assign_block_vars(
'upload',
array(
'L_CONF_TITLE'=>$lang['conf_upload_title'],
- 'L_CONF_UPLOAD'=>$lang['conf_authorize_upload'],
- 'L_CONF_UPLOAD_INFO'=>$lang['conf_authorize_upload_info'],
'L_CONF_MAXSIZE'=>$lang['conf_upload_maxfilesize'],
'L_CONF_MAXSIZE_INFO'=>$lang['conf_upload_maxfilesize_info'],
'L_CONF_MAXWIDTH'=>$lang['conf_upload_maxwidth'],
@@ -295,8 +284,6 @@ switch ($page['section'])
'UPLOAD_MAXHEIGHT'=>$conf['upload_maxheight'],
'TN_UPLOAD_MAXWIDTH'=>$conf['upload_maxwidth_thumbnail'],
'TN_UPLOAD_MAXHEIGHT'=>$conf['upload_maxheight_thumbnail'],
- 'UPLOAD_YES'=>$upload_yes,
- 'UPLOAD_NO'=>$upload_no
));
break;
}
diff --git a/admin/remote_site.php b/admin/remote_site.php
index b1c913914..5aaf1a08f 100644
--- a/admin/remote_site.php
+++ b/admin/remote_site.php
@@ -485,8 +485,6 @@ INSERT INTO '.IMAGE_CATEGORY_TABLE.'
// +-----------------------------------------------------------------------+
$template->set_filenames(array('remote_site'=>'admin/remote_site.tpl'));
-$action = PHPWG_ROOT_PATH.'admin.php?page=remote_site';
-
$template->assign_vars(
array(
'L_SUBMIT'=>$lang['submit'],
diff --git a/admin/update.php b/admin/update.php
index a01926c18..fc920ebb6 100644
--- a/admin/update.php
+++ b/admin/update.php
@@ -603,7 +603,8 @@ SELECT id
display_select_categories($structure,
' ',
array(),
- 'introduction.category_option');
+ 'introduction.category_option',
+ array());
}
// +-----------------------------------------------------------------------+
// | synchronize files |