aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-04-23 23:50:39 +0000
committerrvelices <rv-github@modusoptimus.com>2007-04-23 23:50:39 +0000
commite2b8bab019c88b8324b87f90fe331c9c141bcf2a (patch)
tree65f6c3940729b720fdcc99c7f329111e79b5d39c
parent013d0ec34202d0c6dd96ddcd82fe913f6a3cd223 (diff)
merge revision 1974 from branch-1_7 to trunk
git-svn-id: http://piwigo.org/svn/trunk@1975 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/permalinks.php11
-rw-r--r--template/yoga/admin/permalinks.tpl6
2 files changed, 9 insertions, 8 deletions
diff --git a/admin/permalinks.php b/admin/permalinks.php
index f82f88fd7..cbbbbc4e5 100644
--- a/admin/permalinks.php
+++ b/admin/permalinks.php
@@ -26,7 +26,8 @@
function parse_sort_variables(
$sortable_by, $default_field,
$get_param, $get_rejects,
- $template_var )
+ $template_var,
+ $anchor = '' )
{
global $template;
@@ -66,7 +67,7 @@ function parse_sort_variables(
if ( isset($template_var) )
{
$template->assign_var( $template_var.strtoupper($field),
- '<a href="'.$url.'" title="'.l10n('Sort order').'">'.$disp.'</a>'
+ '<a href="'.$url.$anchor.'" title="'.l10n('Sort order').'">'.$disp.'</a>'
);
}
}
@@ -78,7 +79,7 @@ if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
include_once(PHPWG_ROOT_PATH.'admin/include/functions_permalinks.php');
$selected_cat = array();
-if ( isset($_POST['set_permalink']) and $_POST['cat_id']>0 )
+if ( isset($_POST['set_permalink']) and $_POST['cat_id']>0 and !is_adviser() )
{
$permalink = $_POST['permalink'];
if ( empty($permalink) )
@@ -87,7 +88,7 @@ if ( isset($_POST['set_permalink']) and $_POST['cat_id']>0 )
set_cat_permalink($_POST['cat_id'], $permalink, isset($_POST['save']) );
$selected_cat = array( $_POST['cat_id'] );
}
-elseif ( isset($_GET['delete_permanent']) )
+elseif ( isset($_GET['delete_permanent']) and !is_adviser() )
{
$query = '
DELETE FROM '.OLD_PERMALINKS_TABLE.'
@@ -153,7 +154,7 @@ $sort_by = parse_sort_variables(
array('cat_id','permalink','date_deleted','last_hit','hit'), null,
'dpsf',
array('delete_permanent'),
- 'SORT_OLD_' );
+ 'SORT_OLD_', '#old_permalinks' );
$url_del_base = get_root_url().'admin.php?page=permalinks';
$query = 'SELECT * FROM '.OLD_PERMALINKS_TABLE;
diff --git a/template/yoga/admin/permalinks.tpl b/template/yoga/admin/permalinks.tpl
index 3388cc40b..9acd5815a 100644
--- a/template/yoga/admin/permalinks.tpl
+++ b/template/yoga/admin/permalinks.tpl
@@ -25,7 +25,7 @@
</label>
<p>
- <input type="submit" class="submit" name="set_permalink" value="{lang:submit}"/>
+ <input type="submit" class="submit" name="set_permalink" value="{lang:submit}" {TAG_INPUT_ENABLED}/>
</p>
</fieldset>
</form>
@@ -46,7 +46,7 @@
<!-- END permalink -->
</table>
-<h3>{lang:Permalink history}</h3>
+<h3>{lang:Permalink history} <a name="old_permalinks"></a></h3>
<table class="table2">
<tr class="throw">
<td>Id {SORT_OLD_CAT_ID}</td>
@@ -65,7 +65,7 @@
<td>{deleted_permalink.date_deleted}</td>
<td>{deleted_permalink.last_hit}</td>
<td>{deleted_permalink.hit}</td>
- <td><a href="{deleted_permalink.U_DELETE}"><img src="{pwg_root}{themeconf:icon_dir}/delete.png" alt="Delete"></a></td>
+ <td><a href="{deleted_permalink.U_DELETE}" {TAG_INPUT_ENABLED}><img src="{pwg_root}{themeconf:icon_dir}/delete.png" alt="Delete"></a></td>
</tr>
<!-- END deleted_permalink -->
</table>