Ignore:
Timestamp:
10/08/13 11:59:12 (10 years ago)
Author:
angelo
Message:

Ticket #3491 - Compatibilizar Expresso com novas versoes do PHP

Location:
sandbox/2.5.1-evolucao
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.5.1-evolucao/admin/inc/class.uiconfig.inc.php

    r8229 r8231  
    242242                                                                <td align=\"center\" style=\"width: 15px;\"> 
    243243                                                        </tr>"; 
    244                  
    245                         foreach ($fields as $i => $line)  
    246                         { 
    247                                         if ($line["cc_attribute_name_$i"] != '' && $line["cc_attribute_ldapname_$i"] != '') { 
    248                                                 $campos_vazio  = false; 
    249                         $selectedText  = $line["cc_attribute_type_$i"] == 'text' ? 'selected="selected"' : ''; 
    250                         $selectedTMult = $line["cc_attribute_type_$i"] == 'multivalues' ? 'selected="selected"' : ''; 
    251                                                 $selectedYes   = $line["cc_attribute_searchable_$i"] == 'true'  ? 'selected="selected"' : ''; 
    252                                                 $selectedNo    = $line["cc_attribute_searchable_$i"] == 'false' ? 'selected="selected"' : ''; 
    253  
     244                                if ($fields !== NULL)                    
     245                                foreach ($fields as $i => $line)  
     246                                { 
     247                                                if ($line["cc_attribute_name_$i"] != '' && $line["cc_attribute_ldapname_$i"] != '') { 
     248                                                        $campos_vazio  = false; 
     249                                $selectedText  = $line["cc_attribute_type_$i"] == 'text' ? 'selected="selected"' : ''; 
     250                                $selectedTMult = $line["cc_attribute_type_$i"] == 'multivalues' ? 'selected="selected"' : ''; 
     251                                                        $selectedYes   = $line["cc_attribute_searchable_$i"] == 'true'  ? 'selected="selected"' : ''; 
     252                                                        $selectedNo    = $line["cc_attribute_searchable_$i"] == 'false' ? 'selected="selected"' : ''; 
    254253                                                 
    255                                 $campos = $campos . " 
    256                                                                 <tr> 
    257                                                                         <td><input type=\"text\" name=\"newsettings[cc_attribute_name_" . $i . "]\" value=\"".$line["cc_attribute_name_$i"]."\" style=\"width:170px;\"></input></td> 
    258                                                                         <td><input type=\"text\" name=\"newsettings[cc_attribute_ldapname_" . $i . "]\" value=\"".$line["cc_attribute_ldapname_$i"]."\" style=\"width:170px;\"></input></td> 
    259                                                                         <td><select name=\"newsettings[cc_attribute_type_" . $i . "]\" style=\"width:86px; margin: 0px 0px 0px 8px;\"> 
    260                                                                                         <option value=\"text\" $selectedText>" . lang('Text') . "</option> 
    261                                                                                         <option value=\"multivalues\" $selectedTMult>" . lang('Multivalued') ."</option> 
    262                                                                         </select></td> 
    263                                                                         <td><select name=\"newsettings[cc_attribute_searchable_$i]\" style=\"margin: 0px 16px;\"> 
    264                                                                                         <option value=\"true\" $selectedYes>" . lang('Yes') . "</option> 
    265                                                                                         <option value=\"false\" $selectedNo>" . lang('No') . "</option> 
    266                                                                         </select></td> 
    267                                                                         <td><img src=\"contactcenter/templates/default/images/cc_x.png\" alt=\"". lang('Delete') . "\" title=\"". lang('Delete') ."\" style=\"width: 15px; height: 14px; cursor: pointer; position: relative; top: 3px;\" onclick=\"javascript:cc_attribute_delete(this)\"></img></td>   
    268                                                                 </tr>"; 
    269                         } 
    270                         }  
     254                                        $campos = $campos . " 
     255                                                                        <tr> 
     256                                                                                <td><input type=\"text\" name=\"newsettings[cc_attribute_name_" . $i . "]\" value=\"".$line["cc_attribute_name_$i"]."\" style=\"width:170px;\"></input></td> 
     257                                                                                <td><input type=\"text\" name=\"newsettings[cc_attribute_ldapname_" . $i . "]\" value=\"".$line["cc_attribute_ldapname_$i"]."\" style=\"width:170px;\"></input></td> 
     258                                                                                <td><select name=\"newsettings[cc_attribute_type_" . $i . "]\" style=\"width:86px; margin: 0px 0px 0px 8px;\"> 
     259                                                                                                <option value=\"text\" $selectedText>" . lang('Text') . "</option> 
     260                                                                                                <option value=\"multivalues\" $selectedTMult>" . lang('Multivalued') ."</option> 
     261                                                                                </select></td> 
     262                                                                                <td><select name=\"newsettings[cc_attribute_searchable_$i]\" style=\"margin: 0px 16px;\"> 
     263                                                                                                <option value=\"true\" $selectedYes>" . lang('Yes') . "</option> 
     264                                                                                                <option value=\"false\" $selectedNo>" . lang('No') . "</option> 
     265                                                                                </select></td> 
     266                                                                                <td><img src=\"contactcenter/templates/default/images/cc_x.png\" alt=\"". lang('Delete') . "\" title=\"". lang('Delete') ."\" style=\"width: 15px; height: 14px; cursor: pointer; position: relative; top: 3px;\" onclick=\"javascript:cc_attribute_delete(this)\"></img></td>   
     267                                                                        </tr>"; 
     268                                } 
     269                                }  
    271270                 
    272271                            if ($campos_vazio) 
  • sandbox/2.5.1-evolucao/expressoAdmin1_2/controller.php

    r7655 r8231  
    2222        //      Explode action from cExecuteForm function 
    2323        $cExecuteFormReturn = false; 
    24         if($_POST['_action']) {                  
     24        if(isset($_POST['_action'])) {           
    2525                if($_FILES) { 
    2626                        $count_files = $_POST['countFiles']; 
     
    3636        } 
    3737        //      Explode action from cExecute function 
    38         else if($_GET['action']) 
    39                 list($app,$class,$method) = explode('.',@$_GET['action']); 
     38        else if($_GET['action']){ 
     39                $exp = explode('.',@$_GET['action']); 
     40                //avoiding undefined offsets 
     41                if (count($exp) > 1) 
     42                        list($app,$class,$method) = explode('.',@$_GET['action']); 
     43                else 
     44                        $app = $exp[0]; 
     45        } 
    4046        // NO ACTION 
    4147        else 
    4248                return $_SESSION['response'] = 'false'; 
    43          
    4449        // Load dinamically class file. 
    4550        if($app == '$this') 
  • sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.db_functions.inc.php

    r8204 r8231  
    1010                \**************************************************************************/  
    1111                 
    12 define('PHPGW_INCLUDE_ROOT','../');      
    13 define('PHPGW_API_INC','../phpgwapi/inc'); 
     12if (!defined('PHPGW_INCLUDE_ROOT')) define('PHPGW_INCLUDE_ROOT','../');  
     13if (!defined('PHPGW_API_INC')) define('PHPGW_API_INC','../phpgwapi/inc'); 
    1414include_once(PHPGW_API_INC.'/class.db.inc.php'); 
    1515 
  • sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.functions.inc.php

    r7769 r8231  
    833833                                if (($i +1) % 3 == 1) 
    834834                                { 
    835                                         $checked = $user_applications[$app] ? 'CHECKED' : ''; 
     835                                        $checked = is_array($user_applications) && $user_applications[$app] ? 'CHECKED' : ''; 
    836836                                        $app_col1 = sprintf("<td>%s</td><td width='10'><input type='checkbox' name='apps[%s]' value='1' %s %s></td>\n", 
    837837                                        $data['title'],$app,$checked, $disabled); 
     
    843843                                if (($i +1) % 3 == 2) 
    844844                                { 
    845                                         $checked = $user_applications[$app] ? 'CHECKED' : ''; 
     845                                        $checked = is_array($user_applications) && $user_applications[$app] ? 'CHECKED' : ''; 
    846846                                        $app_col2 = sprintf("<td>%s</td><td width='10'><input type='checkbox' name='apps[%s]' value='1' %s %s></td>\n", 
    847847                                        $data['title'],$app,$checked, $disabled); 
     
    853853                                if (($i +1) % 3 == 0) 
    854854                                { 
    855                                         $checked = $user_applications[$app] ? 'CHECKED' : ''; 
     855                                        $checked = is_array($user_applications) && $user_applications[$app] ? 'CHECKED' : ''; 
    856856                                        $app_col3 = sprintf("<td>%s</td><td width='10'><input type='checkbox' name='apps[%s]' value='1' %s %s></td>\n", 
    857857                                        $data['title'],$app,$checked, $disabled); 
  • sandbox/2.5.1-evolucao/phpgwapi/inc/class.sector_search_ldap.inc.php

    r7655 r8231  
    122122            ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 
    123123 
    124         ldap_bind($ldap_conn, $dn, $passwd); 
     124        @ldap_bind($ldap_conn, $dn, $passwd); 
    125125 
    126126        $justthese = array("dn"); 
    127127        $filter = $show_invisible_ou ? "(objectClass=organizationalUnit)" : "(& (objectClass=organizationalUnit) (!(phpgwAccountVisible=-1)) )"; 
    128         $search = ldap_search($ldap_conn, $context, $filter, $justthese); 
    129  
    130         ldap_sort($ldap_conn, $search, "ou"); 
    131         $info = ldap_get_entries($ldap_conn, $search); 
     128        $search = @ldap_search($ldap_conn, $context, $filter, $justthese); 
     129 
     130        @ldap_sort($ldap_conn, $search, "ou"); 
     131        $info = @ldap_get_entries($ldap_conn, $search); 
    132132        ldap_close($ldap_conn); 
    133133 
Note: See TracChangeset for help on using the changeset viewer.