Changeset 7681 for trunk/phpgwapi


Ignore:
Timestamp:
12/19/12 16:44:18 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Correcoes para Best Practice: Short Open Tag e Best Practice: Always Quote Array Keys.

Location:
trunk/phpgwapi
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/cron/asyncservices.php

    r5141 r7681  
    5757        if (!isset($GLOBALS['phpgw_domain'][$_GET['domain']]) || empty($db_type)) 
    5858        { 
    59                 echo $msg = "asyncservice.php: Domain '$_GET[domain]' is not configured or renamed, exiting !!!\n"; 
     59                echo $msg = "asyncservice.php: Domain '{$_GET['domain']}' is not configured or renamed, exiting !!!\n"; 
    6060                if (defined('ASYNC_LOG')) 
    6161                { 
  • trunk/phpgwapi/inc/class.Template.inc.php

    r2 r7681  
    2525                var $debug = False;     // array('cat_list','cat_list_t'); 
    2626 
    27                 /* $file[handle] = 'filename'; */ 
     27                /* $file['handle'] = 'filename'; */ 
    2828                var $file = array(); 
    2929 
     
    3131                var $root = ''; 
    3232 
    33                 /* $varkeys[key] = 'key'; $varvals[key] = 'value'; */ 
     33                /* $varkeys['key'] = 'key'; $varvals['key'] = 'value'; */ 
    3434                var $varkeys = array(); 
    3535                var $varvals = array(); 
  • trunk/phpgwapi/inc/class.accounts.inc.php

    r7673 r7681  
    189189                 * @param $param['query'] string to search for, no search if unset or empty 
    190190                 * @param $param['query_type'] string: 
    191                  *      'all'   - query all fields for containing $param[query] 
    192                  *      'start' - query all fields starting with $param[query] 
    193                  *      'exact' - query all fields for exact $param[query] 
    194                  *      'lid','firstname','lastname','email' - query only the given field for containing $param[query] 
     191                 *      'all'   - query all fields for containing $param['query'] 
     192                 *      'start' - query all fields starting with $param['query'] 
     193                 *      'exact' - query all fields for exact $param['query'] 
     194                 *      'lid','firstname','lastname','email' - query only the given field for containing $param['query'] 
    195195                 * @param $param['app'] string with an app-name, to limit result on accounts with run-right for that app 
    196196                 * @param $param['offset'] int - number of matches to return if start given, default use the value in the prefs 
     
    251251                                        $this->total = $account_search[$serial2]['total']; 
    252252                                } 
    253                                 //echo "accounts_::get_list($param[type],$param[start],$param[sort],$param[order],$param[query],$param[offset],$param[query_type]) returned<pre>".print_r($account_search[$serial2],True)."</pre>\n"; 
     253                                //echo "accounts_::get_list({$param['type']},{$param['start']},{$param['sort']},{$param['order']},{$param['query']},{$param['offset']},{$param['query_type']}) returned<pre>".print_r($account_search[$serial2],True)."</pre>\n"; 
    254254                                if ($app || $group)     // limit the search on accounts with run-rights for app or a group 
    255255                                { 
  • trunk/phpgwapi/inc/class.asyncservice.inc.php

    r6057 r7681  
    522522                        if ($exists || $this->read($job['id'])) 
    523523                        { 
    524                                 $this->db->query("UPDATE $this->db_table SET next=$job[next],times='$job[times]',". 
    525                                         "method='$job[method]',data='$job[data]',account_id=$job[account_id] WHERE id='$job[id]'",__LINE__,__FILE__); 
     524                                $this->db->query("UPDATE $this->db_table SET next={$job['next']},times='{$job['times']}',". 
     525                                        "method='{$job['method']}',data='{$job['data']}',account_id={$job['account_id']} WHERE id='{$job['id']}'",__LINE__,__FILE__); 
    526526                        } 
    527527                        else 
    528528                        { 
    529529                                $this->db->query("INSERT INTO $this->db_table (id,next,times,method,data,account_id) VALUES ". 
    530                                         "('$job[id]',$job[next],'$job[times]','$job[method]','$job[data]',$job[account_id])",__LINE__,__FILE__); 
     530                                        "('{$job['id']}',{$job['next']},'{$job['times']}','{$job['method']}','{$job['data']}',{$job['account_id']})",__LINE__,__FILE__); 
    531531                        } 
    532532                } 
  • trunk/phpgwapi/inc/class.matrixview.inc.php

    r7655 r7681  
    104104                        { 
    105105                                $dinfo = getdate(mktime(0,0,0, $this->month+1,0,$this->year)); 
    106                                 $this->day = $dinfo[mday]; 
     106                                $this->day = $dinfo['mday']; 
    107107                        } 
    108108 
     
    200200 
    201201                        $in = getdate(mktime(0,0,0, $this->month+1,0,$this->year)); 
    202                         $this->sumdays = $in[mday]; 
    203                         $this->monthname = $in[month]; 
     202                        $this->sumdays = $in['mday']; 
     203                        $this->monthname = $in['month']; 
    204204 
    205205                        $this->out_monthyear($form_link); 
  • trunk/phpgwapi/inc/class.uiaccountsel.inc.php

    r2 r7681  
    343343 
    344344                                $GLOBALS['phpgw']->template->set_var('onclick',"addOption('$element_id','". 
    345                                         $GLOBALS['phpgw']->common->grab_owner_name($group['account_id'])."','$group[account_id]')". 
     345                                        $GLOBALS['phpgw']->common->grab_owner_name($group['account_id'])."','{$group['account_id']}')". 
    346346                                        ($single ? '; window.close()' : '')); 
    347347 
     
    409409                                        'lastname'      => $user['account_lastname'] ? $user['account_lastname'] : '&nbsp;', 
    410410                                        'onclick'       => "addOption('$element_id','". 
    411                                                 $GLOBALS['phpgw']->common->grab_owner_name($user['account_id'])."','$user[account_id]')". 
     411                                                $GLOBALS['phpgw']->common->grab_owner_name($user['account_id'])."','{$user['account_id']}')". 
    412412                                                ($single ? '; window.close()' : ''), 
    413413                                )); 
  • trunk/phpgwapi/inc/class.vfs_dav.inc.php

    r7655 r7681  
    585585                                while (list ($num, $link_info) = each ($this->linked_dirs)) 
    586586                                { 
    587                                         if (preg_match("/^$link_info[directory]\/$link_info[name](\/|$)/", $rarray['fake_full_path'])) 
     587                                        if (preg_match("/^{$link_info['directory']}\/{$link_info['name']}(\/|$)/", $rarray['fake_full_path'])) 
    588588                                        { 
    589589                                                $rarray['real_full_path'] = preg_replace("/^$this->basedir/", '', $rarray['real_full_path']); 
    590                                                 $rarray['real_full_path'] = preg_replace("/^$link_info[directory]" . SEP . "$link_info[name]/", $link_info['link_directory'] . SEP . $link_info['link_name'], $rarray['real_full_path']); 
     590                                                $rarray['real_full_path'] = preg_replace("/^{$link_info['directory']}" . SEP . "{$link_info['name']}/", $link_info['link_directory'] . SEP . $link_info['link_name'], $rarray['real_full_path']); 
    591591 
    592592                                                $p = $this->path_parts (array( 
     
    643643 
    644644/* 
    645                         echo "<br>fake_full_path: $rarray[fake_full_path] 
    646                                 <br>fake_leading_dirs: $rarray[fake_leading_dirs] 
    647                                 <br>fake_extra_path: $rarray[fake_extra_path] 
    648                                 <br>fake_name: $rarray[fake_name] 
    649                                 <br>real_full_path: $rarray[real_full_path] 
    650                                 <br>real_full_url: $rarray[real_full_url] 
    651                                 <br>real_leading_dirs: $rarray[real_leading_dirs] 
    652                                 <br>real_extra_path: $rarray[real_extra_path] 
    653                                 <br>real_name: $rarray[real_name]"; 
     645                        echo "<br>fake_full_path: {$rarray['fake_full_path']} 
     646                                <br>fake_leading_dirs: {$rarray['fake_leading_dirs']} 
     647                                <br>fake_extra_path: {$rarray['fake_extra_path']} 
     648                                <br>fake_name: {$rarray['fake_name']} 
     649                                <br>real_full_path: {$rarray['real_full_path']} 
     650                                <br>real_full_url: {$rarray['real_full_url']} 
     651                                <br>real_leading_dirs: {$rarray['real_leading_dirs']} 
     652                                <br>real_extra_path: {$rarray['real_extra_path']} 
     653                                <br>real_name: {$rarray['real_name']}"; 
    654654*/ 
    655655 
     
    16811681                                        $newdir = preg_replace("/^$f->fake_full_path/", "$t->fake_full_path", $entry['directory']); 
    16821682                                        $this->cp (array( 
    1683                                                         'from'  => "$entry[directory]/$entry[name]", 
    1684                                                         'to'    => "$newdir/$entry[name]", 
     1683                                                        'from'  => "$entry[directory]/{$entry['name']}", 
     1684                                                        'to'    => "$newdir/{$entry['name']}", 
    16851685                                                        'relatives'     => array ($f->mask, $t->mask) 
    16861686                                                ) 
     
    19511951                                { 
    19521952                                        $this->rm (array( 
    1953                                                         'string'        => "$entry[directory]/$entry[name]", 
     1953                                                        'string'        => "{$entry['directory']}/{$entry['name']}", 
    19541954                                                        'relatives'     => array ($p->mask) 
    19551955                                                ) 
  • trunk/phpgwapi/inc/class.vfs_shared.inc.php

    r7655 r7681  
    10281028                                while (list ($num, $link_info) = each ($this->linked_dirs)) 
    10291029                                { 
    1030                                         if (preg_match("/^$link_info[directory]\/$link_info[name](\/|$)/", $rarray['fake_full_path'])) 
     1030                                        if (preg_match("/^{$link_info['directory']}\/{$link_info['name']}(\/|$)/", $rarray['fake_full_path'])) 
    10311031                                        { 
    10321032                                                $rarray['real_full_path'] = preg_replace("/^$this->basedir/", '', $rarray['real_full_path']); 
    1033                                                 $rarray['real_full_path'] = preg_replace("/^$link_info[directory]" . SEP . "$link_info[name]/", $link_info['link_directory'] . SEP . $link_info['link_name'], $rarray['real_full_path']); 
     1033                                                $rarray['real_full_path'] = preg_replace("/^{$link_info['directory']}" . SEP . "{$link_info['name']}/", $link_info['link_directory'] . SEP . $link_info['link_name'], $rarray['real_full_path']); 
    10341034 
    10351035                                                $p = $this->path_parts (array( 
     
    10691069                        } 
    10701070 
    1071                         /* 
    1072                         echo "<br>fake_full_path: $rarray[fake_full_path] 
    1073                                 <br>fake_leading_dirs: $rarray[fake_leading_dirs] 
    1074                                 <br>fake_extra_path: $rarray[fake_extra_path] 
    1075                                 <br>fake_name: $rarray[fake_name] 
    1076                                 <br>real_full_path: $rarray[real_full_path] 
    1077                                 <br>real_leading_dirs: $rarray[real_leading_dirs] 
    1078                                 <br>real_extra_path: $rarray[real_extra_path] 
    1079                                 <br>real_name: $rarray[real_name]"; 
    1080                         */ 
     1071            /* 
     1072                        echo "<br>fake_full_path: {$rarray['fake_full_path']} 
     1073                                <br>fake_leading_dirs: {$rarray['fake_leading_dirs']} 
     1074                                <br>fake_extra_path: {$rarray['fake_extra_path']} 
     1075                                <br>fake_name: {$rarray['fake_name']} 
     1076                                <br>real_full_path: {$rarray['real_full_path']} 
     1077                                <br>real_leading_dirs: {$rarray['real_leading_dirs']} 
     1078                                <br>real_extra_path: {$rarray['real_extra_path']} 
     1079                                <br>real_name: {$rarray['real_name']}"; 
     1080            */ 
    10811081 
    10821082                        if ($data['object']) 
  • trunk/phpgwapi/inc/class.vfs_sql.inc.php

    r7655 r7681  
    14111411                                        $newdir = preg_replace("/^$f->fake_full_path/", "$t->fake_full_path", $entry['directory']); 
    14121412                                        $this->cp (array( 
    1413                                                         'from'  => "$entry[directory]/$entry[name]", 
    1414                                                         'to'    => "$newdir/$entry[name]", 
     1413                                                        'from'  => "$entry[directory]/{$entry['name']}", 
     1414                                                        'to'    => "$newdir/{$entry['name']}", 
    14151415                                                        'relatives'     => array ($f->mask, $t->mask) 
    14161416                                                ) 
     
    16511651 
    16521652                                        $query = $GLOBALS['phpgw']->db->query ("UPDATE phpgw_vfs SET directory='". 
    1653                                                 $GLOBALS['phpgw']->db->db_addslashes($newdir_clean)."' WHERE file_id='$entry[file_id]'" . 
     1653                                                $GLOBALS['phpgw']->db->db_addslashes($newdir_clean)."' WHERE file_id='{$entry['file_id']}'" . 
    16541654                                                $this->extra_sql (array ('query_type' => VFS_SQL_UPDATE)), __LINE__, __FILE__); 
    16551655                                        $this->correct_attributes (array( 
    1656                                                         'string'        => "$newdir/$entry[name]", 
     1656                                                        'string'        => "$newdir/{$entry['name']}", 
    16571657                                                        'relatives'     => array ($t->mask) 
    16581658                                                ) 
     
    17821782 
    17831783                                        $this->rm (array( 
    1784                                                         'string'        => "$entry[directory]/$entry[name]", 
     1784                                                        'string'        => "{$entry['directory']}/{$entry['name']}", 
    17851785                                                        'relatives'     => array ($p->mask) 
    17861786                                                ) 
     
    17981798                                        /* Only the best in confusing recursion */ 
    17991799                                        $this->rm (array( 
    1800                                                         'string'        => "$entry[directory]/$entry[name]", 
     1800                                                        'string'        => "{$entry['directory']}/{$entry['name']}", 
    18011801                                                        'relatives'     => array ($p->mask) 
    18021802                                                ) 
  • trunk/phpgwapi/templates/classic/login_classic.php

    r7673 r7681  
    315315        $config_reg = $cnf_reg->config_data; 
    316316 
    317         if($config_reg[enable_registration]=='True' && $config_reg[register_link]=='True') 
     317        if($config_reg['enable_registration']=='True' && $config_reg['register_link']=='True') 
    318318        { 
    319319                $reg_link='&nbsp;<a href="registration/">'.lang('Not a user yet? Register now').'</a><br/>'; 
  • trunk/phpgwapi/templates/default/login_default.php

    r7673 r7681  
    428428        $config_reg = $cnf_reg->config_data; 
    429429 
    430         if($config_reg[enable_registration]=='True' && $config_reg[register_link]=='True') 
     430        if($config_reg['enable_registration']=='True' && $config_reg['register_link']=='True') 
    431431        { 
    432432                $reg_link='&nbsp;<a href="registration/">'.lang('Not a user yet? Register now').'</a><br/>'; 
  • trunk/phpgwapi/templates/news/login_news.php

    r7673 r7681  
    364364        $config_reg = $cnf_reg->config_data; 
    365365 
    366         if($config_reg[enable_registration]=='True' && $config_reg[register_link]=='True') 
     366        if($config_reg['enable_registration']=='True' && $config_reg['register_link']=='True') 
    367367        { 
    368368                $reg_link='&nbsp;<a href="registration/">'.lang('Not a user yet? Register now').'</a><br/>'; 
Note: See TracChangeset for help on using the changeset viewer.