phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] admin/inc class.uiapplications.inc.php


From: Dave Hall
Subject: [Phpgroupware-cvs] admin/inc class.uiapplications.inc.php
Date: Mon, 20 Feb 2006 13:21:37 +0000

CVSROOT:        /cvsroot/phpgroupware
Module name:    admin
Branch:         
Changes by:     Dave Hall <address@hidden>      06/02/20 13:21:37

Modified files:
        inc            : class.uiapplications.inc.php 

Log message:
        fix globals and redirected links

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/admin/inc/class.uiapplications.inc.php.diff?tr1=1.12&tr2=1.13&r1=text&r2=text

Patches:
Index: admin/inc/class.uiapplications.inc.php
diff -u admin/inc/class.uiapplications.inc.php:1.12 
admin/inc/class.uiapplications.inc.php:1.13
--- admin/inc/class.uiapplications.inc.php:1.12 Tue Feb 14 08:48:21 2006
+++ admin/inc/class.uiapplications.inc.php      Mon Feb 20 13:21:37 2006
@@ -9,7 +9,7 @@
   *  option) any later version.                                              *
   \**************************************************************************/
 
-  /* $Id: class.uiapplications.inc.php,v 1.12 2006/02/14 08:48:21 skwashd Exp 
$ */
+  /* $Id: class.uiapplications.inc.php,v 1.13 2006/02/20 13:21:37 skwashd Exp 
$ */
 
        class uiapplications
        {
@@ -38,9 +38,9 @@
                        
$GLOBALS['phpgw']->template->set_block('applications','list','list');
                        
$GLOBALS['phpgw']->template->set_block('applications','row','row');
 
-                       $start = $GLOBALS['HTTP_POST_VARS']['start'];
-                       $sort  = $GLOBALS['HTTP_GET_VARS']['sort'];
-                       $order = $GLOBALS['HTTP_GET_VARS']['order'];
+                       $start = $_POST['start'];
+                       $sort  = $_GET['sort'];
+                       $order = $_GET['order'];
                        $offset = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
 
                        $apps = $this->bo->get_list();
@@ -160,14 +160,14 @@
                        
$GLOBALS['phpgw']->template->set_block('application','form','form');
                        
$GLOBALS['phpgw']->template->set_block('application','row','row');
 
-                       if ($GLOBALS['HTTP_POST_VARS']['submit'])
+                       if ( isset($_POST['submit']) && $_POST['submit'] )
                        {
                                $totalerrors = 0;
 
-                               $app_order    = 
$GLOBALS['HTTP_POST_VARS']['app_order'] ? 
$GLOBALS['HTTP_POST_VARS']['app_order'] : 0;
-                               $n_app_name   = 
chop($GLOBALS['HTTP_POST_VARS']['n_app_name']);
-                               $n_app_title  = 
chop($GLOBALS['HTTP_POST_VARS']['n_app_title']);
-                               $n_app_status = 
$GLOBALS['HTTP_POST_VARS']['n_app_status'];
+                               $app_order    = isset($_POST['app_order']) ? 
(int) $_POST['app_order'] : 0;
+                               $n_app_name   = chop($_POST['n_app_name']);
+                               $n_app_title  = chop($_POST['n_app_title']);
+                               $n_app_status = $_POST['n_app_status'];
 
                                if ($this->bo->exists($n_app_name))
                                {
@@ -190,8 +190,8 @@
                                                'app_order'    => $app_order
                                        ));
 
-                                       Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list'));
                                        
$GLOBALS['phpgw_info']['flags']['nodisplay'] = True;
+                                       
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' => 
'admin.uiapplications.get_list') );
                                        exit;
                                }
                                else
@@ -237,20 +237,20 @@
 
                function edit()
                {
-                       $app_name = $GLOBALS['HTTP_GET_VARS']['app_name'];
+                       $app_name = $_GET['app_name'];
 
                        
$GLOBALS['phpgw']->template->set_file(array('application' => 
'application_form.tpl'));
                        
$GLOBALS['phpgw']->template->set_block('application','form','form');
                        
$GLOBALS['phpgw']->template->set_block('application','row','row');
 
-                       if ($GLOBALS['HTTP_POST_VARS']['submit'])
+                       if ( isset($_POST['submit']) && $_POST['submit'] )
                        {
                                $totalerrors = 0;
 
-                               $old_app_name = 
$GLOBALS['HTTP_POST_VARS']['old_app_name'];
-                               $app_order    = 
$GLOBALS['HTTP_POST_VARS']['app_order'] ? 
$GLOBALS['HTTP_POST_VARS']['app_order'] : 0;
-                               $n_app_name   = 
chop($GLOBALS['HTTP_POST_VARS']['n_app_name']);
-                               $n_app_status = 
$GLOBALS['HTTP_POST_VARS']['n_app_status'];
+                               $old_app_name = $_POST['old_app_name'];
+                               $app_order    = isset($_POST['app_order']) ? 
(int) $_POST['app_order'] : 0;
+                               $n_app_name   = chop($_POST['n_app_name']);
+                               $n_app_status = $_POST['n_app_status'];
 
                                if (! $n_app_name)
                                {
@@ -274,8 +274,8 @@
                                                'old_app_name' => $old_app_name
                                        ));
 
-                                       Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list'));
                                        
$GLOBALS['phpgw_info']['flags']['nodisplay'] = True;
+                                       
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' => 
'admin.uiapplications.get_list') );
                                        exit;
                                }
                        }
@@ -315,19 +315,19 @@
 
                function delete()
                {
-                       $app_name = $GLOBALS['HTTP_GET_VARS']['app_name'];
+                       $app_name = $_GET['app_name'];
 
                        if (!$app_name)
                        {
-                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list'));
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'admin.uiapplications.get_list') );
                        }
 
                        $GLOBALS['phpgw']->template->set_file(array('body' => 
'delete_common.tpl'));
 
-                       if ($GLOBALS['HTTP_GET_VARS']['confirm'])
+                       if ( isset($_GET['confirm']) && $_GET['confirm'] )
                        {
                                $this->bo->delete($app_name);
-                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list'));
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'admin.uiapplications.get_list') );
                                $GLOBALS['phpgw_info']['flags']['nodisplay'] = 
True;
                                exit;
                        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]