Changeset 4972


Ignore:
Timestamp:
08/22/11 10:00:54 (13 years ago)
Author:
fernando-alberto
Message:

Ticket #1269 - Mergiando revisoes do branch22 de rev4876 ate rev4971

Location:
sandbox/expressoMail1_2/MailArchiver/2.2
Files:
2 deleted
27 edited
4 copied

Legend:

Unmodified
Added
Removed
  • sandbox/expressoMail1_2/MailArchiver/2.2/admin/inc/class.bovoip.inc.php

    r395 r4972  
    3838                $group = "<groups>"; 
    3939         
    40                 if((trim($groups) != '') && (is_array($groups))) 
     40                if(is_array($groups)) 
    4141                { 
    4242                        foreach($groups as $tmp)         
  • sandbox/expressoMail1_2/MailArchiver/2.2/calendar/inc/class.bocalendar.inc.php

    r4427 r4972  
    804804                } 
    805805 
    806                 // TODO: Levar em consideração no cálculo das ocorrências o parâmetro 
     806                // TODO: Levar em consideracao no calculo das ocorrencias o parametro 
    807807                // $event['recur_interval'] 
    808808                function expand_repetition($event){ 
     
    12451245                                                $this->so->set_recur_weekly((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval'],$l_cal['recur_data']); 
    12461246                                                break; 
     1247                                        case MCAL_RECUR_MONTHLY_WDAY: 
     1248                                                $var_wday = true; 
    12471249                                        case MCAL_RECUR_MONTHLY_MDAY: 
    1248                                                 $this->so->set_recur_monthly_mday((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval']); 
    1249  
     1250                                                if ($var_wday) 
     1251                                                { 
     1252                                                        $this->so->set_recur_monthly_wday((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval']); 
     1253                                                } 
     1254                                                else 
     1255                                                { 
     1256                                                        $this->so->set_recur_monthly_mday((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval']); 
     1257                                                } 
     1258                                                 
    12501259                                                $repetido = (int)$l_cal['recur_type']; // recebe o tipo de repeticao; 
    12511260                                                $this->so->add_attribute('recur_type',(@isset($repetido) && $repetido?$repetido:0)); 
     
    12641273                                                        $end_rept = 0; // variavel recebe zero e nao sera adicionado nenhum alarme para o agendamento; 
    12651274                                                } 
    1266                                                 break; 
    1267                                         case MCAL_RECUR_MONTHLY_WDAY: 
    1268                                                 $this->so->set_recur_monthly_wday((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval']); 
    12691275                                                break; 
    12701276                                        case MCAL_RECUR_YEARLY: 
     
    29852991 
    29862992                                //set to GMT 
    2987                                 //Aqui estou pegando o horário do evento e setando para GMT de acordo com o fuso horário estabelecido nas configurações do expresso. 
     2993                                //Aqui estou pegando o horario do evento e setando para GMT de acordo com o fuso horario estabelecido nas configuracoes do expresso. 
    29882994                                $start_time = mktime($event['start']['hour'],$event['start']['min'],$event['start']['sec'],$event['start']['month'],$event['start']['mday'],$event['start']['year']) - $GLOBALS['phpgw']->datetime->tz_offset; 
    29892995                                $end_time = mktime($event['end']['hour'],$event['end']['min'],$event['end']['sec'],$event['end']['month'],$event['end']['mday'],$event['end']['year']) - $GLOBALS['phpgw']->datetime->tz_offset; 
     
    29922998                                $end_time = date("Ymd\THis\Z", $end_time); 
    29932999         
    2994                                 // Necessário espaços após quebra-de-linha, na descrição, caso contrário  
    2995                                 // ocorrerá erro ao importar o agendamento no Outlook (erro lunar). 
     3000                                // Necessario espacos apos quebra-de-linha, na descricao, caso contrario  
     3001                                // ocorrera erro ao importar o agendamento no Outlook (erro lunar). 
    29963002                                $description = str_replace("\n","\n ", $event['description']); 
    29973003                                 
     
    34333439                        } 
    34343440 
    3435                         //Inicializa variï¿œvel de retorno. 
     3441                        //Inicializa variavel de retorno. 
    34363442                        $returncode=true;                        
    34373443                        if(count($mail->to)) {                           
     
    35323538                        $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'] = $temp_dateformat; 
    35333539                         
    3534                         // Notifica por email o criador do compromisso, com as possï¿œveis falhas.                                               
     3540                        // Notifica por email o criador do compromisso, com as posseveis falhas.                                                 
    35353541                        if($errorInfo) { 
    35363542                                $tmpbody = "<font color='red'>".lang("The following commitment had problems for DELIVERING the NOTIFICATION messages.").".</font><br>"; 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ScriptS.inc.php

    r4644 r4972  
    254254        $continue = 1; 
    255255        $tmpSubject = ""; 
    256  
    257         $a = 0; 
    258          
    259256 
    260257        // Recebe os valores das regras; 
     
    281278            $rule['unconditional'] = 0; 
    282279 
    283             if( $a < 2 ) 
    284             { 
    285                 error_log( print_r($tmp, true), 3, "/tmp/log" ); 
    286                  
    287                 error_log( print_r($rule, true), 3, "/tmp/log" ); 
    288                  
    289                 $a++; 
    290             }     
    291              
    292              
    293280            if (!$rule['from'] && !$rule['to'] && !$rule['subject'] && !$rule['field'] && empty($rule['size']) && $rule['action']) { 
    294281                $rule['unconditional'] = 1; 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.dynamic_contacts.inc.php

    r4644 r4972  
    7979                        { 
    8080                                foreach($this->contacts as $item => $valor) 
    81                                         $contact .= str_replace("#",";",$this->contacts[$item]['email']) . ','; 
     81                                        // 
     82                                        if (strstr($this->contacts[$item]['email'], '#')){ 
     83                                                $contact .= str_replace("#",";",$this->contacts[$item]['email']) . ','; 
     84                                        }else{ 
     85                                                $contact .= ';'.$this->contacts[$item]['email'] . ','; 
     86                                        }        
     87                                         
    8288                                //Retira ultima virgula. 
    8389                                $contact = substr($contact,0,(strlen($contact) - 1)); 
     
    106112                { 
    107113                        // Trim all whitespaces and duplicated commas from full_email_address 
    108                         $full_email_address = preg_replace('{(,)\1+}',',',ereg_replace( ' +', '', $full_email_address)); 
     114                        //$full_email_address = preg_replace('{(,)\1+}',',',ereg_replace( ' +', '', $full_email_address)); 
    109115                        $parse_address = imap_rfc822_parse_adrlist($full_email_address, ""); 
    110116                        $new_contacts = array(); 
     
    118124                                if(!$this->contacts) // Used one time to insert the first contact in database 
    119125                                { 
    120                                         $this->db->insert_contact($val->personal."#".$val->mailbox."@".$val->host); 
     126                                        $this->db->insert_contact(ltrim(rtrim($val->personal))."#".$val->mailbox."@".$val->host); 
    121127                                        // Just new contact added. 
    122                                         $new_contacts[] = $val->personal.";".$val->mailbox."@".$val->host; 
     128                                        $new_contacts[] = ltrim(rtrim($val->personal)).";".$val->mailbox."@".$val->host; 
    123129                                        $this->contacts = $this->db->get_dynamic_contacts(); 
    124130                                } 
     
    129135                                        foreach($this->contacts as $item => $valor) 
    130136                                        { 
    131                                                 if($this->contacts[$item]['email'] == $val->personal."#".$val->mailbox."@".$val->host) // check if email already exists 
     137                                                if($this->contacts[$item]['email'] == ltrim(rtrim($val->personal))."#".$val->mailbox."@".$val->host) // check if email already exists 
    132138                                                {        
    133139                                                        $this->contacts[$item]['timestamp'] = time(); //update timestamp of email 
     
    143149                                        { 
    144150                                                // Just new contact added. 
    145                                                 $new_contacts[] = $val->personal.";".$val->mailbox."@".$val->host; 
     151                                                $new_contacts[] = ltrim(rtrim($val->personal)).";".$val->mailbox."@".$val->host; 
    146152                                                if($this->number_of_contacts > count($this->contacts)) 
    147153                                                { 
    148154                                                        $this->contacts[] = array( 'timestamp'  => time(), 
    149                                                                                                                 'email'         => $val->personal."#".$val->mailbox."@".$val->host); 
     155                                                                                                                'email'         => ltrim(rtrim($val->personal))."#".$val->mailbox."@".$val->host); 
    150156                                                } 
    151157                                                if($this->number_of_contacts <= count($this->contacts)) 
    152158                                                { 
    153159                                                        $this->contacts[$older_contact] = array( 'timestamp'    => time(), 
    154                                                                                                                                                 'email'         => $val->personal."#".$val->mailbox."@".$val->host); 
     160                                                                                                                                                'email'         => ltrim(rtrim($val->personal))."#".$val->mailbox."@".$val->host); 
    155161                                                } 
    156162                                        } 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ldap_functions.inc.php

    r4778 r4972  
    129129                                $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid", "employeeNumber", "ou"); 
    130130                                else 
    131                                     $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid"); 
     131                                    $justthese = array("cn", "mail", "telephoneNumber", "phpgwAccountVisible", "uid"); 
    132132                        } 
    133133                        else 
     
    137137                                $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible","jpegPhoto", "uid", "employeeNumber", "ou"); 
    138138                                else 
    139                                     $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible","jpegPhoto", "uid"); 
     139                                    $justthese = array("cn", "mail", "telephoneNumber", "phpgwAccountVisible","jpegPhoto", "uid"); 
    140140                        } 
    141141                        $sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese, 0, $this->max_result + 1); 
     
    191191                                                $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid","employeeNumber", "ou"); 
    192192                                                else 
    193                                                     $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid"); 
     193                                                    $justthese = array("cn", "mail", "telephoneNumber", "phpgwAccountVisible", "uid"); 
    194194                                                $sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese, 0, $this->max_result+1); 
    195195                                                if(!$sr) 
     
    834834                    $justthese = array("cn","uid","telephoneNumber","jpegPhoto","mobile","ou","employeeNumber"); 
    835835                else 
    836                     $justthese = array("cn","uid","telephoneNumber","jpegPhoto","mobile"); 
     836                    $justthese = array("cn","uid","telephoneNumber","jpegPhoto"); 
    837837 
    838838                // Follow the referral 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.rss.inc.php

    r4778 r4972  
    11<?php 
     2 
     3include('../header.inc.php'); 
    24 
    35class rss 
    46{ 
    5  
    6         function rss (){ 
    7         } 
    87        // BEGIN of functions. 
    9         function getContent($param){ 
     8        function getContent($param) 
     9        { 
    1010                $daurl=$param['url']; 
     11                 
    1112                if (preg_match('/http(s)?:\/\//i',$daurl,$matches) == 0) 
    1213                        $daurl = 'http://'.$daurl; 
     
    3435        } 
    3536 
    36         private function createTableRSS() 
    37         { 
    38                 $query = 'CREATE TABLE phpgw_userrss( uid INT NOT NULL,rss_url VARCHAR(1000),name varchar(50), PRIMARY KEY (uid,rss_url) );'; 
    39                  
    40                 $GLOBALS['phpgw']->db->query($query); 
    41                  
    42                 if ( $GLOBALS['phpgw']->db->Error ) 
    43                         return false; 
    44                 else 
    45                         return true; 
    46         } 
    47          
    4837        function getChannels() 
    4938        { 
    50                 include('../header.inc.php'); 
     39                $query  = "SELECT config_value FROM phpgw_config WHERE config_name = 'expressoMail_enabled_read_rss';"; 
    5140                 
    52                 $flag           = false; 
    53                 $tableQuery = "select relname from pg_stat_user_tables order by relname;"; 
    54                  
    55                 if( $GLOBALS['phpgw']->db->query( $tableQuery ) ) 
     41                if( $GLOBALS['phpgw']->db->query( $query ) ) 
    5642                { 
    5743                        while( $GLOBALS['phpgw']->db->next_record() ) 
    5844                        { 
    59                                 $tables[] = $GLOBALS['phpgw']->db->row(); 
    60                         } 
    61                          
    62                         foreach( $tables as $tableName ) 
    63                         { 
    64                                 if( strtolower( $tableName['relname'] ) === 'phpgw_userrss' ) 
    65                                 { 
    66                                         $flag = true; 
    67                                 } 
     45                                $result = $GLOBALS['phpgw']->db->row(); 
    6846                        } 
    6947                } 
    7048                 
    71                 if( !$flag ) 
     49                if( $result['config_value'] === 'true' ) 
    7250                { 
    73                         $flag = $this->createTableRSS(); 
     51                        $query = "SELECT * FROM phpgw_config WHERE config_name = 'expressoMail_list_rss';"; 
     52                         
     53                        if( $GLOBALS['phpgw']->db->query($query) )  
     54                        { 
     55                                while( $GLOBALS['phpgw']->db->next_record() ) 
     56                                { 
     57                                        $result = $GLOBALS['phpgw']->db->row(); 
     58                                } 
     59                        } 
     60         
     61                        if( $result['config_value'] ) 
     62                        { 
     63                                $i              = 0; 
     64                                $rss    = unserialize($result['config_value']); 
     65                                 
     66                                foreach( $rss as $item ) 
     67                                { 
     68                                        $tmp = explode( "|", $item ); 
     69                                        $return[$i]['rss_url']  = $tmp[0]; 
     70                                        $return[$i++]['name']   = $tmp[1]; 
     71                                } 
     72         
     73                                return $return; 
     74                        } 
     75                        else 
     76                                return ""; 
    7477                } 
    75                  
    76                 $query = 'SELECT rss_url,name FROM phpgw_userrss WHERE uid = '.$_SESSION['phpgw_session']['account_id'];                 
    77                  
    78                 if( $GLOBALS['phpgw']->db->query($query) )  
    79                 { 
    80                         while( $GLOBALS['phpgw']->db->next_record() ) 
    81                         { 
    82                                 $return[] = $GLOBALS['phpgw']->db->row(); 
    83                         } 
    84                 } 
    85  
    86                 if( count($return) > 0 ) 
    87                         return $return; 
    88                 else 
    89                         return ""; 
    9078        } 
    9179         
    92         function addChannel($param) 
     80        /*function addChannel($param) 
    9381        { 
    94                 include('../header.inc.php'); 
    95                 $name = $GLOBALS['phpgw']->db->db_addslashes(htmlentities($param['name'])); 
    96                 $url = $GLOBALS['phpgw']->db->db_addslashes($param['url']); 
    97                 $GLOBALS['phpgw']->db->query('INSERT INTO phpgw_userrss values('.$_SESSION['phpgw_session']['account_id'].',\''.$url.'\',\''.$name.'\');',__LINE__,__FILE__); 
     82 
     83                $name   = $GLOBALS['phpgw']->db->db_addslashes(htmlentities($param['name'])); 
     84                $url    = $GLOBALS['phpgw']->db->db_addslashes($param['url']); 
     85                $query  = 'INSERT INTO phpgw_userrss values('.$_SESSION['phpgw_session']['account_id'].',\''.$url.'\',\''.$name.'\');'; 
     86                 
     87                error_log( print_r( $query, true ), 3, "/tmp/log" ); 
     88                 
     89                $GLOBALS['phpgw']->db->query( $query ,__LINE__,__FILE__ ); 
    9890                if ($GLOBALS['phpgw']->db->Error) 
    99                             return "Error"; 
     91                        return "Error"; 
    10092                else 
    101                             return "Success"; 
     93                        return "Success"; 
    10294 
    10395        } 
     
    10597        function removeChannel($param) 
    10698        { 
    107                 include('../header.inc.php'); 
    10899                $url = $GLOBALS['phpgw']->db->db_addslashes($param['url']); 
    109100                $GLOBALS['phpgw']->db->query('DELETE FROM phpgw_userrss where rss_url = \''.$url.'\';',__LINE__,__FILE__); 
     
    112103                else 
    113104                            return "Success"; 
    114         } 
     105        }*/ 
    115106 
    116107} 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/hook_admin.inc.php

    r1040 r4972  
    2626        $file = Array( 
    2727                'Site Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname), 
     28                'RSS Reader' => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoMail1_2.uiconfigRSS.editRss') 
    2829        ); 
     30         
    2931//Do not modify below this line 
    3032        display_section($appname,$title,$file); 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/abas.js

    r4202 r4972  
    3434        if (spanD) 
    3535                spanD.style.display = (openTab.type[ID] == 0 ? '' : 'none'); 
    36  
     36         
     37        if( document.getElementById('divScrollMain_0') != null ) 
     38        { 
     39                var _RSS = document.getElementById('divScrollMain_0'); 
     40        }        
     41         
    3742        var footer_menu = Element("footer_menu");        
    3843        if (footer_menu) { 
    39                 footer_menu.style.display = (openTab.type[ID] != 4 ? '' : 'none'); 
     44 
     45                var attrRSS = _RSS.getAttribute("rss"); 
     46                 
     47                if( attrRSS == "rss" ) 
     48                { 
     49                        footer_menu.style.display = "none";      
     50                } 
     51                else 
     52                { 
     53                        footer_menu.style.display = (openTab.type[ID] != 4 ? '' : 'none'); 
     54                } 
     55                                 
     56                var options_search = Element('span_options'); 
     57                if (options_search){ 
     58                        var spans_search = options_search.getElementsByTagName("span"); 
     59                        var span_search; 
     60                        for (i = 0; i < spans_search.length; i++){ 
     61                                span_search = spans_search[i]; 
     62                                span_search.className == 'message_options_export'?span_search.style.display = (openTab.type[ID] != 1 ? '' : 'none'):''; 
     63                                span_search.className == 'message_options_import'?span_search.style.display = (openTab.type[ID] == 0 ? '' : 'none'):''; 
     64                                (span_search.title  == get_lang("Archive") || span_search.title == get_lang("Unarchive"))?span_search.style.display = (openTab.type[ID] == 0 ? '' : 'none'):''; 
     65                        } 
     66                } 
     67 
    4068        } 
    4169 
     
    122150} 
    123151 
    124 function create_border(borderTitle, id_value) 
    125 { 
     152function create_border(borderTitle, id_value, border_type) 
     153{ 
     154        if (borderTitle == get_lang("Server Results")) 
     155                id_value = "search_" + parseInt(BordersArray.length-1) + 1; 
     156 
    126157        borderTitle = ( ( borderTitle && borderTitle.constructor == String && borderTitle.length > 0 ) ? borderTitle : '&nbsp;' ); 
    127158 
     
    195226 
    196227        Element("exmail_main_body").insertBefore(div,Element("footer_menu")); 
     228         
     229        if(border_type) 
     230                openTab.type[ID] = border_type; 
    197231        alternate_border(ID); 
    198232        return ID; 
     
    318352                } 
    319353        if(j == 1) 
    320                 Element("footer_menu").style.display = ''; 
     354        {        
     355                if( document.getElementById('divScrollMain_0') != null ) 
     356                { 
     357                        var _RSS = document.getElementById('divScrollMain_0'); 
     358                }        
     359                 
     360                var attrRSS = _RSS.getAttribute("rss"); 
     361                 
     362                if( attrRSS == "rss" ) 
     363                { 
     364                        Element("footer_menu").style.display = 'none';                   
     365                } 
     366                else 
     367                { 
     368                        Element("footer_menu").style.display = ''; 
     369                }                
     370        } 
     371         
    321372        BordersArray = new_BordersArray; 
    322373 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/doiMenuData.js

    r4778 r4972  
    1010        if (!expresso_offline) 
    1111        { 
    12                 if( eval(enabledReadRSS ) == true )  
    13                 { 
    14                         var itens = new Array(  "preferences_mail()|" + get_lang("Preferences") + "|preferences.png", 
    15                                                                         "search_emails(\"\")|" + get_lang("Search") + "|search.png", 
    16                                                                         "filterbox()|" + get_lang("Edit filters") + "|filters.png", 
    17                                                                         "folderbox()|" + get_lang("Edit folders") + "|editfolders.png", 
    18                                                                         "sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png", 
    19                                                                         "editrss()|" + get_lang("Edit my news") + "|rss.png", 
    20                                                                         "empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png"); 
    21                 } 
    22                 else 
    23                 { 
    24                         var itens = new Array(  "preferences_mail()|" + get_lang("Preferences") + "|preferences.png", 
    25                                         "search_emails(\"\")|" + get_lang("Search") + "|search.png", 
    26                                         "filterbox()|" + get_lang("Edit filters") + "|filters.png", 
    27                                         "folderbox()|" + get_lang("Edit folders") + "|editfolders.png", 
    28                                         "sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png", 
    29                                         "empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png"); 
    30                          
    31                 } 
     12                var itens = new Array(  "preferences_mail()|" + get_lang("Preferences") + "|preferences.png", 
     13                                "search_emails(\"\")|" + get_lang("Search") + "|search.png", 
     14                                "filterbox()|" + get_lang("Edit filters") + "|filters.png", 
     15                                "folderbox()|" + get_lang("Edit folders") + "|editfolders.png", 
     16                                "sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png", 
     17                                "empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png"); 
    3218                 
    3319                if(window.google && google.gears && preferences.use_local_messages==1) 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/draw_api.js

    r4968 r4972  
    165165        } 
    166166        else{ 
    167                 if (!expresso_offline) { 
    168                         tree_folders = new dFTree({name: 'tree_folders'}); 
     167                if (!expresso_offline) 
     168                { 
     169                    tree_folders = new dFTree({name: 'tree_folders'}); 
    169170 
    170171                    var n_root = new dNode({id:'root', caption: get_lang("My Folders")}); 
     
    233234                }                 
    234235 
    235                 var handlerChannel = function(data) 
     236       var handlerChannel = function(data) 
     237       { 
     238            
     239                if ( data == null || typeof(data) == 'string') 
     240                {     
     241                        return false; 
     242                } 
     243 
     244                var nodeParent  = document.getElementById('content_folders'); 
     245                var treeRss     = new dFTree({name: 'treeRss'}); 
     246                var root_rss    = new dNode({id:'news_root', caption: get_lang("News")}); 
     247                     
     248                treeRss.add(root_rss,'anything'); 
     249 
     250                for( i=0; i < data.length; i++ ) 
    236251                { 
    237  
    238                         if ( data == null || typeof(data) == 'string') 
    239                     {     
    240                                 return false; 
    241                     } 
    242  
    243                     var nodeParent  = document.getElementById('content_folders'); 
    244                     var treeRss     = new dFTree({name: 'treeRss'}); 
    245                     var root_rss    = new dNode({id:'news_root', caption: get_lang("News")}); 
    246                      
    247                     treeRss.add(root_rss,'anything'); 
    248  
    249                     for( i=0; i < data.length; i++ ) 
     252                    var nodeNews = new dNode( 
    250253                    { 
    251                         var nodeNews = new dNode( 
    252                         { 
    253254                            id: "NEWS/"+data[i].name, 
    254255                            caption: data[i].name, 
    255256                            onClick: "open_rss('"+data[i].rss_url+"')", 
    256257                            plusSign: 0 
    257                         }); 
    258                         treeRss.add(nodeNews,"news_root"); 
    259                     } 
     258                     }); 
     259                     treeRss.add(nodeNews,"news_root"); 
     260                } 
    260261                     
    261                     treeRss.draw( nodeParent ); 
     262                treeRss.draw( nodeParent ); 
    262263                     
    263                     with ( document.getElementById('lnews_roottreeRss') ) 
    264                     { 
    265                         style.backgroundImage   = "url(templates/"+template+"/images/menu/rss.png)"; 
    266                         style.marginLeft        = "2px"; 
    267                     } 
    268  
    269                     if( nodeParent.firstChild.id != ("dftree_" + treeRss.name ) ) 
    270                     { 
    271                         var _folder     = Element(nodeParent.firstChild.id); 
    272                         var _rssNews    = Element("dftree_" + treeRss.name ); 
     264                with ( document.getElementById('lnews_roottreeRss') ) 
     265                { 
     266                     style.backgroundImage   = "url(templates/"+template+"/images/menu/rss.png)"; 
     267                     style.marginLeft        = "2px"; 
     268                } 
     269 
     270                if( nodeParent.firstChild.id != ("dftree_" + treeRss.name ) ) 
     271                { 
     272                     var _folder     = Element(nodeParent.firstChild.id); 
     273                     var _rssNews    = Element("dftree_" + treeRss.name ); 
    273274                         
    274                         nodeParent.insertBefore( _rssNews, _folder ); 
    275                     } 
     275                     nodeParent.insertBefore( _rssNews, _folder ); 
     276                } 
    276277                     
    277                 } 
    278                  
    279        if( eval(enabledReadRSS ) == true )  
    280            cExecute('$this.rss.getChannels',handlerChannel); 
    281  
     278           } 
     279        
     280       if( eval(enabledReadRSS ) == true ) 
     281       {         
     282           setTimeout(function() 
     283           { 
     284             cExecute('$this.rss.getChannels',handlerChannel); 
     285           }, 2000); 
     286       } 
     287        
    282288                tree_folders.draw(Element('content_folders')); 
    283289                if (!expresso_offline) { 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/messages_controller.js

    r4971 r4972  
    7474                if (folder == 'null') 
    7575                        folder = get_current_folder(); 
    76                 if (msgs_number == 'selected') 
    77                         msgs_number = get_selected_messages(); 
    78                          
     76                if (msgs_number == 'selected'){ 
     77                        if (openTab.type[currentTab] > 1){ 
     78                                msgs_number = currentTab.substring(0,currentTab.length-2,currentTab); 
     79                    }else{ 
     80                                msgs_number = get_selected_messages(); 
     81                    } 
     82                }        
    7983                if (!this.is_local_folder(folder))  
    8084                        delete_msgs(folder, msgs_number, border_ID); 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/news_edit.js

    r4778 r4972  
    99cnews_edit.prototype.read_rss = function(val) 
    1010{ 
    11     Element("border_id_0").innerHTML    = get_lang('News')+'&nbsp;&nbsp;<font face="Verdana" size="1" color="#505050">[ <span id="tot_m"></span> ]</font>'; 
    12      
     11    document.getElementById("border_id_0").innerHTML    = get_lang('News')+'&nbsp;&nbsp;<font face="Verdana" size="1" color="#505050">[ <span id="tot_m"></span> ]</font>'; 
     12 
    1313    current_folder = "NEWS/"+val; 
    1414    openTab.imapBox[0] = "NEWS/"+val; 
     
    2323        'lang_size'     : get_lang('size') 
    2424    }; 
    25      
     25 
     26    // Div 
    2627    var _div = document.getElementById("content_id_0"); 
    2728        _div.innerHTML = this.xtools.parse( this.rssXml, 'stylesheet/news_read.xsl' , langs ); 
    2829     
     30    resizeWindow();     
     31 
     32    var footerMenu = document.getElementById("footer_menu"); 
     33 
     34    // footer Menu; 
     35    if( footerMenu ) 
     36    { 
     37                footerMenu.style.display = "none"; 
     38    } 
     39         
    2940    update_menu(); 
    30     var box = Element("tbody_box"); 
     41     
     42    var box = document.getElementById("tbody_box"); 
    3143     
    3244    if(box.childNodes.length > 1) 
     
    4153    } 
    4254     
    43     Element("tot_m").innerHTML = box.childNodes.length - 1 ; 
     55    document.getElementById("tot_m").innerHTML = box.childNodes.length - 1 ; 
    4456} 
    4557 
     
    5567    } 
    5668     
    57     var title = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('title')[0].firstChild.nodeValue; 
    58     var pubDate = this.dateString(this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('pubDate')[0].firstChild.nodeValue); 
    59     var link = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('link')[0].firstChild.nodeValue; 
    60     var owner = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('owner')[0]; 
    61     if (currentTab.toString().indexOf('news_') != -1) 
     69    var title   = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('title')[0].firstChild.nodeValue; 
     70    var pubDate = this.dateString(this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('pubDate')[0].firstChild.nodeValue); 
     71    var link    = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('link')[0].firstChild.nodeValue; 
     72    var owner   = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('owner')[0]; 
     73     
     74    if ( currentTab.toString().indexOf('news_') != -1 ) 
    6275        delete_border(currentTab); 
    63     var border_id = create_border(title, 'news_'+item_number); 
     76     
     77    var border_id = create_border(title, 'news_'+item_number, "RSS" ); 
     78     
    6479    if(!border_id) 
    6580        return false; 
     
    6883 
    6984    var toolbarCode = "<div style='background-color: #FFF; font-size: larger;'>"+ 
    70                       "<table class='table_message' style='width:100%;'><tr><td>"+(owner != undefined?owner.firstChild.nodeValue:get_lang('nobody'))+", "+pubDate+"</td>"+ 
    71                       '<td width="30%" align="left"></td>'+ 
    72                       '<td nowrap="true" width="30%" align="right"><a target="_blank" href="'+link+'" style class="message_options">'+get_lang('Complete news')+'</a>'; 
    73     if ( owner != undefined ) 
    74         toolbarCode += '<span>&nbsp;|&nbsp;</span><span class="message_options">'+get_lang('forward')+'</span><span>&nbsp;|&nbsp;</span>'+ 
    75         '<span class="message_options">Responder</span></td>'; 
    76     toolbarCode += '<td nowrap="true" width="40px" align="right">'+ 
    77     ( item_number == 1 ?  '<img style="cursor: default;" src="./templates/default/images/up.gray.button.png">' : 
    78         '<img onclick="news_edit.read_item('+(parseInt(item_number)-1)+')" style="cursor: default;" src="./templates/default/images/up.button.png">')+ 
    79     '<span>&nbsp;</span>'+ 
     85                      "<table class='table_message' style='width:100%;'><tr><td>"+pubDate+"</td>"+ 
     86                      "<td width='30%' align='left'></td>"+ 
     87                      "<td nowrap='true' width='30%' align='right'><a target='_blank' href='"+link+"' style class='message_options'>"+get_lang("Complete news")+"</a>"; 
     88     
     89     
     90    toolbarCode +=  '<td nowrap="true" width="40px" align="right">'+ 
     91                            ( item_number == 1 ?  '<img style="cursor: default;" src="./templates/default/images/up.gray.button.png">' : 
     92                                '<img onclick="news_edit.read_item('+(parseInt(item_number)-1)+')" style="cursor: default;" src="./templates/default/images/up.button.png">')+ 
     93                                '<span>&nbsp;</span>'+ 
    8094    (this.rssXml.getElementsByTagName('item')[parseInt(item_number)] == undefined ? '<img style="cursor: default;" src="./templates/default/images/down.gray.button.png">' : 
    81         '<img onclick="news_edit.read_item('+(parseInt(item_number)+1)+')" style="cursor: pointer;" src="./templates/default/images/down.button.png">')+ 
     95    '<img onclick="news_edit.read_item('+(parseInt(item_number)+1)+')" style="cursor: pointer;" src="./templates/default/images/down.button.png">')+ 
    8296    "</td></tr></table><h2>"+title+"</h2><br>"+description+"</div>"; 
    83     Element('content_id_'+border_id).innerHTML = toolbarCode; 
     97     
     98    document.getElementById('content_id_'+border_id).innerHTML = toolbarCode; 
     99     
    84100    resizeWindow(); 
     101     
     102    var footerMenu = document.getElementById("footer_menu"); 
     103 
     104    // footer Menu; 
     105    if( footerMenu ) 
     106    { 
     107                footerMenu.style.display = "none"; 
     108    } 
    85109} 
    86110 
     
    99123} 
    100124 
    101 cnews_edit.prototype.makeWindow = function(options) 
    102 { 
    103     _this = this; 
    104  
    105     var params =  
    106     { 
    107         'lang_label1'       :   get_lang('Enter the URL of RSS service'), 
    108         'lang_label2'       :   get_lang('List of registered RSS'), 
    109         'lang_subscribe'    :   get_lang('Subscribe')  
    110     }; 
    111  
    112     var el = document.createElement("DIV"); 
    113         el.style.visibility = "hidden"; 
    114         el.style.position = "absolute"; 
    115         el.style.left = "0px"; 
    116         el.style.top = "0px"; 
    117         el.style.width = "0px"; 
    118         el.style.height = "0px"; 
    119         el.id = 'dJSWin_newswin'; 
    120         el.innerHTML = this.xtools.parse( this.xtools.xml('make_window'), 'stylesheet/makeWindow.xsl', params ); 
    121  
    122     document.body.appendChild(el); 
    123      
    124     var butt = Element('dJSWin_wfolders_bok'); 
    125      
    126     if ( !butt ) 
    127     { 
    128         butt = document.createElement('INPUT'); 
    129         butt.style.margin = "3px"; 
    130         butt.id = 'dJSWin_wfolders_bok'; 
    131         butt.type = 'button'; 
    132         butt.value = get_lang('Close'); 
    133         el.appendChild(butt); 
    134     } 
    135      
    136     butt.onclick = function () 
    137     { 
    138         news_edit.arrayWin[el.id].close(); 
    139     } 
    140  
    141     _this.showWindow(el); 
    142 } 
    143  
    144 cnews_edit.prototype.showWindow = function (div) 
    145 { 
    146     if(! this.arrayWin[div.id]) 
    147     { 
    148         div.style.height = "280px"; 
    149         div.style.width = "340px"; 
    150         var title = "<label style='margin-left:5px;'>:: "+get_lang("News edit")+" ::</label> "; 
    151         var wHeight = div.offsetHeight + "px"; 
    152         var wWidth =  div.offsetWidth   + "px"; 
    153         div.style.width = div.offsetWidth - 5; 
    154  
    155         win = new dJSWin({ 
    156             id: 'win_'+div.id, 
    157             content_id: div.id, 
    158             width: wWidth, 
    159             height: wHeight, 
    160             title_color: '#3978d6', 
    161             bg_color: '#eee', 
    162             title: title, 
    163             title_text_color: 'white', 
    164             button_x_img: '../phpgwapi/images/winclose.gif', 
    165             border: true 
    166         }); 
    167         this.arrayWin[div.id] = win; 
    168         win.draw(); 
    169     } 
    170     else 
    171     { 
    172         win = this.arrayWin[div.id]; 
    173     } 
    174      
    175     win.open(); 
    176      
    177     var handlerChannel = function( data ) 
    178     { 
    179         var _listRss =  document.getElementById("listRSS"); 
    180          
    181         if( data != null ) 
    182         { 
    183             for( var i = 0 ; i < data.length; i++) 
    184             {     
    185                 _listRss.innerHTML += "<div>" + 
    186                                         "<img onclick='news_edit.unsubscribe(\""+data[i].rss_url+"\",this);' style='width:16px; height:16px; cursor: pointer;' src='../phpgwapi/templates/default/images/foldertree_trash.png' />" + 
    187                                         "<label style='margin-right: 2px'>"+data[i].name+"</label>" +                 
    188                                        "</div>"; 
    189             } 
    190         } 
    191     } 
    192      
    193     cExecute('$this.rss.getChannels',handlerChannel); 
    194 } 
     125cnews_edit.prototype.trim = function(inputString) 
     126{ 
     127        if (typeof inputString != "string") 
     128                return inputString; 
     129         
     130        var retValue = inputString; 
     131        var ch = retValue.substring(0, 1); 
     132         
     133        while (ch == " ") 
     134        { 
     135                retValue = retValue.substring(1, retValue.length); 
     136                ch = retValue.substring(0, 1); 
     137        } 
     138                ch = retValue.substring(retValue.length-1, retValue.length); 
     139         
     140        while ( ch == " ") 
     141        { 
     142                retValue = retValue.substring(0, retValue.length-1); 
     143                ch = retValue.substring(retValue.length-1, retValue.length); 
     144        } 
     145         
     146        while (retValue.indexOf("  ") != -1)  
     147        { 
     148                retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); 
     149        } 
     150         
     151        return retValue; 
     152} 
     153 
     154 
    195155cnews_edit.prototype.unsubscribe = function(url,el) 
    196156{ 
    197     var rem_handler = function (data) 
    198     { 
    199         if ( data != "Success" ) 
    200         {     
    201             if (data == "Error") 
    202                 alert(get_lang("Database Error")); 
    203             else 
    204                 alert(get_lang("Invalid entry")); 
    205         } 
    206         else 
    207         { 
    208            el.parentNode.parentNode.removeChild( el.parentNode ); 
    209         } 
    210     }; 
    211  
    212     cExecute('$this.rss.removeChannel&url='+escape(url),rem_handler); 
    213 } 
     157        var _select = document.getElementById("list_rss"); 
     158         
     159        for( var i = 0 ; i < _select.options.length; i++ ) 
     160        { 
     161                if( _select.options[i].selected == true ) 
     162                { 
     163                        _select.removeChild(_select.options[i]); 
     164                        i--; 
     165                } 
     166        } 
     167} 
     168 
    214169cnews_edit.prototype.subscribe = function() 
    215170{ 
    216     var newTableEl  = document.getElementById("listRSS"); 
    217     var val         = trim( Element('rssEnter').value ); 
    218      
    219     if( val != "" ) 
    220     { 
    221         this.rssXml = this.xtools.load('controller.php?action=$this.rss.getContent&url='+escape(val)); 
    222  
    223         var params = 
    224         { 
    225             'linkURL' : val 
    226         }; 
    227  
    228         var _div = document.createElement("div"); 
    229             _div.innerHTML = this.xtools.parse( this.rssXml, 'stylesheet/news_add.xsl', params ); 
    230  
    231         var add_handler = function (data) 
    232         { 
    233             if ( data != "Success" ) 
    234             { 
    235                 if ( data == "Error" ) 
    236                     alert( get_lang("Database Error") ); 
    237                 else 
    238                     alert( get_lang("Invalid entry") ); 
    239             } 
    240             else 
    241             { 
    242                 newTableEl.appendChild(_div); 
    243             } 
    244         }; 
    245  
    246         try 
    247         { 
    248             if( _div.childNodes[2].getAttribute("titleRss") ) 
    249             {     
    250                 var name = _div.childNodes[2].getAttribute("titleRss"); 
    251  
    252                 cExecute('$this.rss.addChannel&url='+escape(val)+'&name='+name,add_handler); 
    253             } 
    254         } 
    255         catch(e){ } 
    256     } 
    257  
     171        var _select = document.getElementById("list_rss"); 
     172         
     173    var _rssUrl = this.trim( document.getElementById('rssEnter').value ); 
     174 
     175    if( _rssUrl != "" ) 
     176    { 
     177        var _lang = document.getElementById('lang_can_not_access_this_rss').value 
     178         
     179        try 
     180        { 
     181                this.rssXml = this.xtools.load('expressoMail1_2/controller.php?action=$this.rss.getContent&url='+escape(_rssUrl)); 
     182                 
     183                title = this.rssXml.getElementsByTagName("title"); 
     184         
     185                if( title.length > 0 && this.trim(title[0].childNodes[0].nodeValue) != "" ) 
     186                { 
     187                        var flag = false; 
     188                         
     189                        for( var i = 0; i < _select.options.length; i++ ) 
     190                        { 
     191                                if( this.trim( _select.options[i].value ) == this.trim( _rssUrl ) ) 
     192                                { 
     193                                        flag = true; 
     194                                } 
     195                        } 
     196                         
     197                        if( !flag ) 
     198                        { 
     199                                var _value = _rssUrl + "|" + title[0].childNodes[0].nodeValue; 
     200                                _select.options[_select.length] = new Option( title[0].childNodes[0].nodeValue, _value , false, true ); 
     201                        } 
     202                         
     203                        document.getElementById('rssEnter').value = ""; 
     204                } 
     205                else 
     206                { 
     207                        alert( _lang + "!!" ); 
     208                } 
     209        } 
     210        catch(e) 
     211        { 
     212                alert( _lang + "!!" ); 
     213        } 
     214    } 
    258215}; 
    259216 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/search.js

    r4644 r4972  
    375375                numBox++; 
    376376 
    377                 if( Data['data'] ) 
    378                         var border_id = create_border(get_lang("Server Results"), "search_" + numBox); 
     377                if( Data['data'] ) 
     378                        var border_id = create_border(get_lang("Server Results"), "search_" + numBox,1); 
    379379                 
    380380                if( Data['data_gears']) 
    381                         var border_id = create_border(get_lang("Local Results"), "search_local_msg" + numBox); 
     381                        var border_id = create_border(get_lang("Local Results"), "search_local_msg" + numBox,1); 
    382382                         
    383383                if (!border_id) 
     
    387387        openTab.content_id[currentTab] = Element('content_id_search_' + numBox); 
    388388        openTab.type[currentTab] = 1; 
    389          
     389                                    
    390390                var table = document.createElement("TABLE"); 
    391391                        table.id    = "table_resultsearch_" + numBox; 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/setup.inc.php

    r4876 r4972  
    1616        $setup_info['expressoMail1_2']['tables'][]              = 'phpgw_expressomail_contacts'; 
    1717    $setup_info['expressoMail1_2']['tables'][]          = 'phpgw_certificados'; 
    18     $setup_info['expressoMail1_2']['tables'][]          = 'phpgw_userrss'; 
    1918        $setup_info['expressoMail1_2']['enable']        = 1; 
    2019 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/tables_current.inc.php

    r4778 r4972  
    3333            'ix' => array(), 
    3434            'uc' => array() 
    35                 ), 
    36                 'phpgw_userrss' => array( 
    37                         'fd' => array( 
    38                                 'uid'           => array('type' => 'int', 'nullable' => false  ), 
    39                                 'rss_url'       => array('type' => 'varchar', 'precision' => 1000 ), 
    40                                 'name'          => array('type' => 'varchar', 'precision' => 50) 
    41                         ), 
    42                         'pk' => array('uid','rss_url'), 
    43                         'fk' => array(), 
    44             'ix' => array(), 
    45             'uc' => array() 
    4635                ) 
    4736        ); 
  • sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/templates/default/config.tpl

    r4778 r4972  
    147147       </td> 
    148148   </tr>  
    149    <tr bgcolor="{th_bg}"> 
    150                 <td colspan="2"> 
    151                         &nbsp; 
    152                 </td>            
    153    </tr> 
    154    <tr bgcolor="{row_on}"> 
    155        <td> 
    156            <label style="font-weight:bold;">Habilitar leitor de RSS</label> 
    157        </td> 
    158            <td> 
    159                <select id="enabledReadRSS" name="newsettings[expressoMail_enabled_read_rss]"> 
    160                     <option value="false" {selected_expressoMail_enabled_read_rss_false}>{lang_No}</option> 
    161                                 <option value="true" {selected_expressoMail_enabled_read_rss_true}>{lang_Yes}</option>               
    162                </select> 
    163        </td> 
    164    </tr> 
    165149<!-- END body --> 
    166150<!-- BEGIN footer --> 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/after_upload.php

    r3610 r4972  
    2121include_once("../../header.inc.php"); 
    2222 
     23 
     24function convert_char( $String ) 
     25{ 
     26                $String = trim( str_replace( "\'", "", $String) ); 
     27                $String = str_replace( "'", "", $String ); 
     28                $String = str_replace( "ç", "c", $String ); 
     29                $String = str_replace( "Ç", "C", $String ); 
     30                $String = ereg_replace( "[áàâã]", "a", $String ); 
     31                $String = ereg_replace( "[ÁÀÂÃ]", "A", $String ); 
     32                $String = ereg_replace( "[éÚê]", "e", $String ); 
     33                $String = ereg_replace( "[ÉÈÊ]", "E", $String ); 
     34                $String = ereg_replace( "[íìîï]", "i", $String ); 
     35                $String = ereg_replace( "[ÍÌÎ]", "I", $String ); 
     36                $String = ereg_replace( "[óòÎõ]", "o", $String ); 
     37                $String = ereg_replace( "[ÓÒÔÕ]", "O", $String ); 
     38                $String = ereg_replace( "[úùû]", "u", $String ); 
     39                $String = ereg_replace( "[ÚÙÛ]", "U", $String ); 
     40                 
     41                return $String; 
     42} 
     43 
    2344$bo = CreateObject('filemanager.bofilemanager'); 
    2445 
    25 foreach ($files as $f) { 
    26                 if ($bo->vfs->cp(array( 
    27                         'from'=> $f['fullName'], 
    28                         'to'=> $f['name'], 
    29                         'relatives'     => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) 
    30                 ))) 
     46foreach ($files as $f) 
     47{ 
     48        $newName = convert_char( $f['name'] ); 
     49         
     50        $_array = array( 
     51                        'from'          => $f['fullName'], 
     52                        'to'            => $newName, 
     53                        'relatives'     => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) 
     54        ); 
     55         
     56        if ( $bo->vfs->cp($_array) ) 
     57        { 
     58                $bo->vfs->set_attributes(array( 
     59                        'string'                => $newName, 
     60                        'relatives'             => array( RELATIVE_ALL ), 
     61                        'attributes'    => array( 'mime_type' => $f['mimetype'] ) 
     62                )); 
     63                 
     64                $fullName = $f['fullName']; 
     65                 
     66                if( file_exists($fullName) ) 
    3167                { 
    32                                 $bo->vfs->set_attributes(array( 
    33                                 'string'=> $f['name'], 
    34                                 'relatives'     => array(RELATIVE_ALL), 
    35                                 'attributes'=> array( 
    36                                 'mime_type' => $f['mimetype'] 
    37                                 ) 
    38                         )); 
    39                         exec("rm -f ".escapeshellcmd(escapeshellarg($f['fullName']))); 
     68                        exec("rm -f ".escapeshellcmd(escapeshellarg($fullName))); 
    4069                } 
     70        } 
    4171} 
    4272 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/class.uifilemanager.inc.php

    r4228 r4972  
    582582                $return['files'] = $output; 
    583583                $return['quota']['quotaSize'] = ($quota * 1024 * 1024); 
     584                //echo serialize(htmlspecialchars_decode(htmlentities($return))); 
    584585                echo serialize($return); 
    585586        } 
     
    609610                        $return[] = $dir['directory'] . $dir['name']; 
    610611                sort(&$return, SORT_STRING); 
     612 
    611613                echo serialize($return); 
    612614        } 
     
    752754        } 
    753755 
    754         function createdir() { 
     756        function createdir() 
     757        { 
    755758                if ($this->bo->badchar = $this->bo->bad_chars($this->filename, True, True)) { 
    756759                        echo lang('Error:') . $this->bo->html_encode(lang('Directory names cannot contain "%1"', $badchar), 1); 
     
    771774                $fileinfo = $ls_array[0]; 
    772775 
    773                 if ($fileinfo['name']) { 
     776                if ($fileinfo['name']) 
     777                { 
    774778                        if ($fileinfo['mime_type'] != 'Directory') { 
    775779                                echo lang('Error:') . lang('%1 already exists as a file', $fileinfo['name']); 
     
    777781                                echo lang('Error:') . lang('Directory %1 already exists', $fileinfo['name']); 
    778782                        } 
    779                 } else { 
     783                } 
     784                else 
     785                { 
    780786                        $this->bo->vfs->cd(array('string' => $this->path, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 
    781787 
    782                         if ($this->bo->vfs->mkdir(array('string' => $this->filename))) { 
    783                                 echo lang('Created directory %1', $this->disppath . '/' . $this->filename); 
    784                         } else { 
     788                        if ($this->bo->vfs->mkdir(array('string' => $this->filename))) 
     789                        { 
     790                                echo "True"; 
     791                                //echo lang('Created directory %1', $this->disppath . '/' . $this->filename); 
     792                        } 
     793                        else 
     794                        { 
    785795                                echo lang('Error:') . lang('Could not create %1', $this->disppath . '/' . $this->filename); 
    786796                        } 
    787797                } 
    788                 echo lang('Directory created'); 
     798                 
    789799        } 
    790800 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/load_lang.php

    r3873 r4972  
    2525        } 
    2626         
    27         echo "var array_lang = new Array(); \n$script"; 
     27        echo "var array_lang = new Array();\n{$script}"; 
    2828         
    2929?> 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/upload.php

    r3897 r4972  
    3333$path                                   = $_POST['path']; 
    3434$notifUser                              = $_POST['notifTo']; 
    35 $show_upload_boxes      = count($_FILES['upload_file']['name']); 
    36 $filesUpload                            = $_FILES['upload_file']; 
     35$show_upload_boxes              = count($_FILES['upload_file']['name']); 
     36$filesUpload                    = $_FILES['upload_file']; 
    3737 
    3838function create_summaryImage($file) 
     
    121121                { 
    122122                        $badchar = $bo->bad_chars( $_FILES['upload_file']['name'][$i], True, True ); 
    123                          
     123 
    124124                        if( $badchar ) 
    125125                        { 
     
    165165                                $bo->vfs->cp($tmp_arr); 
    166166                                $tmp_arr=array( 
    167                                                 'string'=> $_FILES['upload_file']['name'][$i], 
    168                                                 'relatives'     => array(RELATIVE_ALL), 
     167                                                'string'                => $_FILES['upload_file']['name'][$i], 
     168                                                'relatives'             => array(RELATIVE_ALL), 
    169169                                                'attributes'    => array( 
    170                                                         'owner_id' => $bo->userinfo['username'], 
    171                                                         'modifiedby_id' => $bo->userinfo['username'], 
    172                                                         'size' => $_FILES['upload_file']['size'][$i], 
    173                                                         'mime_type' => $_FILES['upload_file']['type'][$i], 
    174                                                         'deleteable' => 'Y', 
    175                                                         'comment' => stripslashes($_POST['upload_comment'][$i]) 
     170                                                'owner_id'              => $bo->userinfo['username'], 
     171                                                'modifiedby_id' => $bo->userinfo['username'], 
     172                                                'size'                  => $_FILES['upload_file']['size'][$i], 
     173                                                'mime_type'             => $_FILES['upload_file']['type'][$i], 
     174                                                'deleteable'    => 'Y', 
     175                                                'comment'               => stripslashes($_POST['upload_comment'][$i]) 
    176176                                        ) 
    177177                                ); 
     
    191191                                ))) 
    192192                                { 
    193                                         $bo->vfs->set_attributes(array( 
     193                                $bo->vfs->set_attributes(array( 
    194194                                                        'string'                => $_FILES['upload_file']['name'][$i], 
    195195                                                        'relatives'     => array(RELATIVE_ALL), 
    196196                                                        'attributes'    => array( 
    197                                                                 'mime_type'     => $_FILES['upload_file']['type'][$i], 
    198                                                                 'comment'       => stripslashes($_POST['upload_comment'][$i]) 
     197                                                        'mime_type'     => $_FILES['upload_file']['type'][$i], 
     198                                                        'comment'       => stripslashes($_POST['upload_comment'][$i]) 
    199199                                                        ) 
    200200                                        )); 
     
    218218                        $bo->vfs->set_attributes(array( 
    219219                                        'string'                => $_FILES['upload_file']['name'][$i], 
    220                                         'relatives'     => array(RELATIVE_ALL), 
     220                                        'relatives'             => array(RELATIVE_ALL), 
    221221                                        'attributes'    => array( 
    222                                                                                 'mime_type'     => $_FILES['upload_file']['type'][$i], 
    223                                                                                 'comment'       => stripslashes($_POST['upload_comment'][$i]) 
     222                                        'mime_type'     => $_FILES['upload_file']['type'][$i], 
     223                                        'comment'       => stripslashes($_POST['upload_comment'][$i]) 
    224224                                        ) 
    225225                        )); 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/uploadApp.php

    r3894 r4972  
    3434                                                        'maxFileSize'           => $maxFileSize, 
    3535                                                        'maxChunkSize'          => $maxChunkSize, 
    36                                                         'archive'                               => '../tp/juploader/wjhk.jupload.jar', 
    37                                                         'afterUploadURL'                => 'after_upload.php', 
     36                                                        'archive'                       => '../tp/juploader/wjhk.jupload.jar', 
     37                                                        'afterUploadURL'        => 'after_upload.php', 
    3838                                                        'sendMD5Sum'            => 'true', 
    39                                                         'showLogWindow' => 'false', 
    40                                                         'debugLevel'                    => 0  
     39                                                        'showLogWindow'         => 'false', 
     40                                                        'debugLevel'            => 0  
    4141                                                ); 
    4242 
    4343$classParameters = array( 
    44                                                         'demo_mode'     => false, 
     44                                                        'demo_mode'             => false, 
    4545                                                        'allow_subdirs' => true, 
    46                                                         'destdir'                       => '/tmp'  //Where to store the files on the webserver  
     46                                                        'destdir'               => '/tmp'  //Where to store the files on the webserver  
    4747                                                ); 
    4848 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/drag_area.js

    r3436 r4972  
    1919 
    2020counter = 0; 
    21 DragArea.prototype.dragObj = function(e){ 
     21DragArea.prototype.dragObj = function(e) 
     22{ 
    2223        var _event  = is_ie ? window.event : e; 
    2324        var _target = is_ie ? _event.srcElement : _event.target; 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/draw_api.js

    r3936 r4972  
    410410                var contentQuota = document.getElementById('content_quota'); 
    411411                if (contentQuota != null) 
    412                         contentQuota.innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota"><tbody><tr><td width="102" nowrap="true" height="15" background="../phpgwapi/templates/default/images/dsunused.gif"><table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;"><tbody><tr><td height="15" class="dsused"/></tr></tbody></table></td><td nowrap="true" align="center"><span class="boxHeaderText">'+parseInt(usedSpace/quotaSize*100)+'% ('+borkb(usedSpace)+'/'+borkb(quotaSize)+')</span></td></tr></tbody></table></td></tr></table>'; 
     412                        contentQuota.innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota"><tbody><tr><td width="102" nowrap="true" height="15" background="./phpgwapi/templates/default/images/dsunused.gif"><table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;"><tbody><tr><td height="15" class="dsused"/></tr></tbody></table></td><td nowrap="true" align="center"><span class="boxHeaderText">'+parseInt(usedSpace/quotaSize*100)+'% ('+borkb(usedSpace)+'/'+borkb(quotaSize)+')</span></td></tr></tbody></table></td></tr></table>'; 
    413413        } 
    414414} 
     
    820820                                 
    821821                        var parentDir_en = base64_encode( parentDir ); 
    822                         cExecute_('./index.php?menuaction=filemanager.uifilemanager.createdir&path=' 
    823                                 + parentDir_en+'&filename='+base64_encode(name), handler.refreshDir); 
     822                        var _action = './index.php?menuaction=filemanager.uifilemanager.createdir&path='+ parentDir_en+'&filename='+base64_encode(name);         
     823                         
     824                        cExecute_( _action , handler.refreshDir ); 
    824825                                 
    825826                        currentPath = parentDir + '/' + name; 
     
    836837                                        Dfolder.replace(my_home_filemanager, get_lang("My folder"))), '') ) 
    837838                                        { 
     839                                         
    838840                                        var Dfolder_en = base64_encode( Dfolder ); 
    839                                          
    840                                         cExecute_('./index.php?menuaction=filemanager.uifilemanager.removedir&path=' + Dfolder_en ,handler.refreshDir ); 
     841                                        var _action = './index.php?menuaction=filemanager.uifilemanager.removedir&path=' + Dfolder_en;  
     842                                        cExecute_( _action , handler.refreshDir ); 
    841843                                        var lastIndex = Dfolder.lastIndexOf('/'); 
    842844                                        currentPath = Dfolder.substr(0,lastIndex); 
     
    871873                        { 
    872874                                'lang_new_folder'               : get_lang('new folder'), 
    873                                 'lang_remove_folder'            : get_lang('remove folder'), 
     875                                'lang_remove_folder'    : get_lang('remove folder'), 
    874876                                'path_filemanager'              : path_filemanager, 
    875                                 'onclick_new_folder'            : 'editFolders("new")', 
     877                                'onclick_new_folder'    : 'editFolders("new")', 
    876878                                'onclick_remove_folder' : 'editFolders("remove")' 
    877879                        }; 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/handler.js

    r3924 r4972  
    1212 
    1313                if (returnVal[0] == 'wpasswd') 
    14         { 
    15                 write_error(get_lang('Wrong password')); 
    16                 return; 
    17         } 
    18         else 
    19                 write_msg(get_lang('Your operation was successfully executed')); 
    20  
    21         toolbar.control('reload'); 
     14                { 
     15                        write_error(get_lang('Wrong password')); 
     16                        return; 
     17                } 
     18                else 
     19                        write_msg(get_lang('Your operation was successfully executed')); 
     20 
     21                toolbar.control('reload'); 
    2222        } 
    2323 
     
    7979        function draw_folders_list(data) 
    8080        { 
     81                var contentFolders = document.getElementById('content_folders'); 
     82                 
    8183                toolbar.control('reload'); 
    8284                folders_tree = new dFTree({name: 'main'}); 
    83  
    8485                folders = unserialize(data); 
    85  
     86                 
     87                contentFolders.innerHTML = ""; 
     88                 
    8689                var rootFold = new dNode({id:'root', caption: get_lang("Directories")}); 
     90                 
    8791                folders_tree.add(rootFold,'root'); 
    8892 
     
    118122                } 
    119123 
    120                 document.getElementById('content_folders').innerHTML = ""; 
    121  
    122                 folders_tree.draw(document.getElementById('content_folders')); 
     124                folders_tree.draw(contentFolders); 
    123125 
    124126                folders_tree.openTo(currentPath); 
    125127 
    126128                folders_tree.getNodeById(currentPath)._select(); 
     129 
    127130        } 
    128131 
    129132        function moveto(data)  
    130133        { 
    131                 returnVal = data.split('|'); 
     134                var returnVal = data.split('|'); 
     135                 
    132136                if (returnVal[0] == 'NODIR') 
     137                { 
    133138                        write_error(get_lang('Could not copy file because no destination directory is given')); 
    134                 else if(returnVal[0] == 'SOMEERROR'){ 
    135                         write_error(get_lang('Could not move %1 file(s)',returnVal[1])); 
    136                 } 
    137                 else  if(returnVal[0] == 'MOVED'){ 
    138                         if (returnVal[1] == 1) 
    139                                 write_msg(get_lang('File moved successfuly')); 
    140                         else 
    141                                 write_msg(get_lang('%1 files moved successfuly', returnVal[1])); 
    142                 } 
    143                 handler.refreshDir(); 
     139                }        
     140                else if( returnVal[0] == 'SOMEERROR' ) 
     141                { 
     142                        write_error( get_lang('Could not move %1 file(s)',returnVal[1]) ); 
     143                } 
     144                else  if( returnVal[0] == 'MOVED') 
     145                { 
     146                        if ( returnVal[1] == 1 ) 
     147                        {        
     148                                write_msg( get_lang('File moved successfuly') ); 
     149                                toolbar.control('reload'); 
     150                        } 
     151                        else 
     152                        { 
     153                                write_msg( get_lang('%1 files moved successfuly', returnVal[1]) ); 
     154                        } 
     155                } 
    144156        } 
    145157 
    146158        function refreshDir(data)  
    147159        { 
    148                 cExecute_('./index.php?menuaction=filemanager.uifilemanager.get_folders_list', handler.draw_folders_list); 
     160                if( data.toString() === "True" ) 
     161                { 
     162                        var _action = './index.php?menuaction=filemanager.uifilemanager.get_folders_list'; 
     163                         
     164                        cExecute_( _action , draw_folders_list ); 
     165                } 
     166                else 
     167                { 
     168                        write_msg( data ); 
     169                } 
    149170        } 
    150171 
     
    342363        handler.prototype.draw_folders_list     = draw_folders_list; 
    343364        handler.prototype.moveto                        = moveto; 
    344         handler.prototype.refreshDir                    = refreshDir; 
     365        handler.prototype.refreshDir            = refreshDir; 
    345366        handler.prototype.rename                        = rename; 
    346         handler.prototype.restricted                    = restricted; 
    347         handler.prototype.updateComment = updateComment; 
     367        handler.prototype.restricted            = restricted; 
     368        handler.prototype.updateComment         = updateComment; 
    348369        handler.prototype.upload                        = upload; 
    349370 
  • sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/main.js

    r3019 r4972  
    1  
    2  
  • sandbox/expressoMail1_2/MailArchiver/2.2/phpgwapi/inc/class.vfs_dav.inc.php

    r3863 r4972  
    20022002                function delete ($data) 
    20032003                { 
    2004                         error_log("Aqui", 3, "/tmp/log"); 
    2005                          
    20062004                        return $this->rm ($data); 
    20072005                } 
Note: See TracChangeset for help on using the changeset viewer.