phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc class.nextmatchs.inc.php


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgwapi/inc class.nextmatchs.inc.php
Date: Tue, 29 Aug 2006 12:42:38 +0000

CVSROOT:        /cvsroot/phpgwapi
Module name:    phpgwapi
Changes by:     Dave Hall <skwashd>     06/08/29 12:42:38

Modified files:
        inc            : class.nextmatchs.inc.php 

Log message:
        E_NOTICEs and other cleanups

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.nextmatchs.inc.php?cvsroot=phpgwapi&r1=1.73&r2=1.74

Patches:
Index: class.nextmatchs.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.nextmatchs.inc.php,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -b -r1.73 -r1.74
--- class.nextmatchs.inc.php    26 Apr 2005 09:43:07 -0000      1.73
+++ class.nextmatchs.inc.php    29 Aug 2006 12:42:37 -0000      1.74
@@ -7,7 +7,7 @@
        * @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package phpgwapi
        * @subpackage gui
-       * @version $Id: class.nextmatchs.inc.php,v 1.73 2005/04/26 09:43:07 
powerstat Exp $
+       * @version $Id: class.nextmatchs.inc.php,v 1.74 2006/08/29 12:42:37 
skwashd Exp $
        */
 
 
@@ -206,7 +206,7 @@
                        $extravars = $this->split_extras($extravars,$extra);
                        
                        $var = array(
-                               'form_action'   => 
($this->action?$this->page($extra):$GLOBALS['phpgw']->link($sn, $extra)),
+                               'form_action'   => $this->action ? 
$this->page($extra) : $GLOBALS['phpgw']->link($sn, $extra),
                                'lang_category' => lang('Category'),
                                'lang_all'      => lang('All'),
                                'lang_select'   => lang('Select'),
@@ -219,7 +219,6 @@
                                'sort_value'    => $sort,
                                'query_value'   => 
urlencode(stripslashes($GLOBALS['query'])),
                                'table_width'   => $twidth,
-                               'th_bg'         => 
$GLOBALS['phpgw_info']['theme']['th_bg'],
                                'left'          => 
$this->left($sn,$start,$total,$extra),
                                'search'        => 
($showsearch?$this->search($search_obj):''),
                                'filter'        => 
($filter_obj?$this->filter($filter_obj,$yours):''),
@@ -231,19 +230,18 @@
                        return $this->template->fp('out','nextmatchs');
                }
 
-               function split_extras($extravars,$extradata)
+               function split_extras($extravars, $extradata)
                {
                        if($extradata)
                        {
                                if(is_string($extradata))
                                {
                                        $extraparams = explode('&',$extradata);
-                                       $c_extraparams = count($extraparams) + 
1;
-                                       for($i=0;$i<$c_extraparams;$i++)
+                                       foreach ( $extraparams as $extraparam )
                                        {
-                                               if($extraparams[$i])
+                                               if ( $extraparam )
                                                {
-                                                       list($var,$value) = 
explode('=',$extraparams[$i]);
+                                                       list($var, $value) = 
explode('=', $extraparam);
                                                        if($var != 'menuaction')
                                                        {
                                                                
$extravars[$var] = $value;
@@ -257,16 +255,10 @@
                                }
                                elseif(is_array($extradata))
                                {
-                                       while(list($var,$value) = 
each($extradata))
-                                       {
-                                               if($var != 'menuaction')
+                                       if ( isset($extravars['menuaction']) )
                                                {
-                                                       $extravars[$var] = 
$value;
-                                               }
-                                               else
-                                               {
-                                                       $this->action = $value;
-                                               }
+                                               $this->action = 
$extravars['menuaction'];
+                                               unset($extravars['menuaction']);
                                        }
                                }
                        }
@@ -557,8 +549,9 @@
                        {
                                if ($filter_obj == 1)
                                {
-                                       //  $user_groups = 
$GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']);
-                                       $indexlimit = count($user_groups);
+                                       //$user_groups = 
$GLOBALS['phpgw']->accounts->membership($GLOBALS['phpgw_info']['user']['account_id']);
+                                       //$indexlimit = count($user_groups);
+                                       $indexlimit = 0;
 
                                        if ($yours)
                                        {
@@ -734,6 +727,8 @@
                                unset($temp_format);
                        }
 
+                       $query = isset($_REQUEST['query']) ? 
urlencode(stripslashes($_REQUEST['query'])) : '';
+
                        list($filter,$qfield,$start,$NULL1,$NULL) = 
$this->get_var();
 
                        if(($order == $var) && ($sort == 'ASC'))
@@ -754,7 +749,7 @@
                                $extra = $this->extras_to_string($extra);
                        }
 
-                       $extravar = 
'order='.$var.'&sort='.$sort.'&filter='.$filter.'&qfield='.$qfield.'&start='.$start.'&query='.urlencode(stripslashes($GLOBALS['query'])).$extra;
+                       $extravar = 
'order='.$var.'&sort='.$sort.'&filter='.$filter.'&qfield='.$qfield.'&start='.$start.'&query='.$query.$extra;
 
                        $link = 
($this->action?$this->page($extravar):$GLOBALS['phpgw']->link($program,$extravar));
 




reply via email to

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