summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorKate Arzamastseva <pshns@ukr.net>2011-06-24 00:41:47 +0300
committerKate Arzamastseva <pshns@ukr.net>2011-06-24 00:41:47 +0300
commit70c3cc9a17d47d8986cba0805d943c1a68af1740 (patch)
tree7be6592a4494ea0dff13f544c9f3412dd9502364 /inc/template.php
parent88a71175e3de9e3ad8b20ca9eb710aaf773cb788 (diff)
downloadrpg-70c3cc9a17d47d8986cba0805d943c1a68af1740.tar.gz
rpg-70c3cc9a17d47d8986cba0805d943c1a68af1740.tar.bz2
media action buttons
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/inc/template.php b/inc/template.php
index 051679fb9..4226c0e52 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -1142,6 +1142,7 @@ function tpl_fileList(){
$opened_tab = $_REQUEST['tab_files'];
if (!$opened_tab) $opened_tab = 'files';
+ if ($_REQUEST['mediado'] == 'update') $opened_tab = 'upload';
media_tabs_files($opened_tab);
if ($opened_tab == 'files') media_tab_files($NS,$AUTH,$JUMPTO);
@@ -1161,11 +1162,9 @@ function tpl_fileList(){
function tpl_fileDetails(){
global $AUTH;
global $NS;
- global $IMG;
if ($_REQUEST['image']) $image = cleanID($_REQUEST['image']);
- if (!isset($IMG) && !isset($image)) return '';
- if (isset($NS) && getNS($image) != $NS) return '';
+ if (!isset($image) || isset($NS) && getNS($image) != $NS) return '';
$opened_tab = $_REQUEST['tab_details'];
if (!$opened_tab) $opened_tab = 'view';
@@ -1173,10 +1172,7 @@ function tpl_fileDetails(){
media_tabs_details($opened_tab);
if ($opened_tab == 'view') media_tab_view($image, $NS, $AUTH);
- if ($opened_tab == 'edit') {
- if ($IMG) media_tab_edit($IMG, $NS, $AUTH);
- else if ($image) media_tab_edit($image, $NS, $AUTH);
- }
+ if ($opened_tab == 'edit') media_tab_edit($image, $NS, $AUTH);
if ($opened_tab == 'history') media_tab_history($image,$NS,$AUTH);
}