Changeset 1246 for trunk/expressoMail1_2
- Timestamp:
- 08/03/09 09:54:23 (15 years ago)
- Location:
- trunk/expressoMail1_2
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/controller.php
r1061 r1246 7 7 ); 8 8 } 9 require_once '../header. session.inc.php';9 require_once '../header.inc.php'; 10 10 11 11 // Explode action from cExecuteForm function -
trunk/expressoMail1_2/inc/class.exporteml.inc.php
r1066 r1246 75 75 $file = $subject."_".$i.".eml"; 76 76 } else{ 77 $file = "email_".$ _SESSION[ 'phpgw_session' ][ 'session_id' ].".eml";77 $file = "email_".$GLOBALS['phpgw']->session->sessionid.".eml"; 78 78 } 79 79 } … … 90 90 91 91 function createFileZip($files, $tempDir){ 92 $tmp_zip_filename = "email_".$ _SESSION[ 'phpgw_session' ][ 'session_id' ].".zip";92 $tmp_zip_filename = "email_".$GLOBALS['phpgw']->session->sessionid.".zip"; 93 93 $command = "cd " . escapeshellarg($tempDir) . " && nice zip -m9 " . escapeshellarg($tmp_zip_filename) . " " . escapeshellcmd($files); 94 94 if(!exec($command)) { … … 235 235 $body = $this-> getBody($id_number); 236 236 237 $file = "source_".$ _SESSION[ 'phpgw_session' ][ 'session_id' ].".txt";237 $file = "source_".$GLOBALS['phpgw']->session->sessionid.".txt"; 238 238 $f = fopen($tempDir.'/'.$file,"w"); 239 239 fputs($f,$header ."\r\n\r\n". $body); … … 273 273 $body = $this-> getBody($id_msg); 274 274 275 $file = "source_".$ _SESSION[ 'phpgw_session' ][ 'session_id' ].".php";275 $file = "source_".$GLOBALS['phpgw']->session->sessionid.".php"; 276 276 $f = fopen($tempDir.'/'.$file,"w"); 277 277 fputs($f,$phpheader.$header ."\r\n\r\n". $body); -
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r1233 r1246 60 60 // This error is returned from Postfix. 61 61 elseif(strstr($error,'message file too big')) { 62 return str_replace("%1", ini_get('upload_max_filesize'),$this->functions->getLang('The size of this message has exceeded the limit (%1B).'));62 return str_replace("%1", $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size']."M",$this->functions->getLang('The size of this message has exceeded the limit (%1B).')); 63 63 } 64 64 elseif(strstr($error,'virus')) { … … 210 210 return $this->htmlspecialchars_encode($string); 211 211 } 212 212 213 /** 213 214 * Função que importa arquivos .eml exportados pelo expresso para a caixa do usuário. Testado apenas … … 1629 1630 $body = $params['body']; 1630 1631 } 1631 //echo "<script language=\"javascript\">javascript:alert('".$body."');</script>";1632 1632 $attachments = $params['FILES']; 1633 1633 $forwarding_attachments = $params['forwarding_attachments']; … … 1803 1803 } 1804 1804 $tempDir = ini_get("session.save_path"); 1805 $file = "cidimage_".$ _SESSION[ 'phpgw_session' ][ 'session_id' ].$cid_imgs[6][$j].".dat";1805 $file = "cidimage_".$GLOBALS['phpgw']->session->sessionid.".dat"; 1806 1806 $f = fopen($tempDir.'/'.$file,"w"); 1807 1807 fputs($f,$fileContent); … … 1818 1818 { 1819 1819 $total_uploaded_size = 0; 1820 $upload_max_filesize = str_replace("M","",ini_get('upload_max_filesize')) * 1024 * 1024;1820 $upload_max_filesize = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size']; 1821 1821 foreach ($attachments as $attach) 1822 1822 { … … 1824 1824 $total_uploaded_size = $total_uploaded_size + $attach['size']; 1825 1825 } 1826 if( $total_uploaded_size > $upload_max_filesize) 1826 if( $total_uploaded_size > $upload_max_filesize) 1827 1827 return $this->parse_error("message file too big"); 1828 1828 } … … 2315 2315 } 2316 2316 $tempDir = ini_get("session.save_path"); 2317 $file = "cidimage_".$ _SESSION[ 'phpgw_session' ][ 'session_id' ].$cid_imgs[6][$j].".dat";2317 $file = "cidimage_".$GLOBALS['phpgw']->session->sessionid.".dat"; 2318 2318 $f = fopen($tempDir.'/'.$file,"w"); 2319 2319 fputs($f,$fileContent); … … 2366 2366 case 3: $image_big = imagecreatefrompng($attach['tmp_name']); break; 2367 2367 case 6: 2368 require_once("gd_functions.php");2368 include_once("gd_functions.php"); 2369 2369 $image_big = imagecreatefrombmp($attach['tmp_name']); break; 2370 2370 default: … … 2390 2390 imagecopyresampled($image_new, $image_big, 0, 0, 0, 0, $new_width, $new_height, $width, $height); 2391 2391 $tmpDir = ini_get("session.save_path"); 2392 $_file = "cidimage_".$ _SESSION[ 'phpgw_session' ][ 'session_id' ].".dat";2392 $_file = "cidimage_".$GLOBALS['phpgw']->session->sessionid.".dat"; 2393 2393 imagejpeg($image_new,$tmpDir.$_file, 85); 2394 2394 $mail->AddAttachment($tmpDir.$_file, $attach['name'], "base64", $this->get_file_type($tmpDir.$_file)); … … 3263 3263 if($timestamp){ 3264 3264 $tempDir = ini_get("session.save_path"); 3265 $file = $tempDir."imap_".$ _SESSION[ 'phpgw_session' ][ 'session_id' ];3265 $file = $tempDir."imap_".$GLOBALS['phpgw']->session->sessionid; 3266 3266 $f = fopen($file,"w"); 3267 3267 fputs($f,base64_encode($source)); -
trunk/expressoMail1_2/inc/class.phpmailer.php
r1174 r1246 626 626 if($pos_MIME_Version >= $pos_content_type) 627 627 { 628 628 // nao deve enviar a msg..... O header MIME-Version com posicao invalida ...... 629 629 $this->SetError('Formato dos headers da msg estao invalidos.(CD-17) - A'); 630 630 $this->smtp->Reset(); … … 670 670 } 671 671 else 672 673 674 672 { 673 $smtpSent = $this->smtp->Data($header . $body); 674 } 675 675 676 676 if(!$smtpSent) 677 677 { 678 678 $this->SetError($this->Lang("data_not_accepted") .' '. $this->smtp->error['error'] .','. $this->smtp->error['smtp_code'].','. $this->smtp->error['smtp_msg']); 679 679 $this->smtp->Reset(); 680 680 return false; 681 681 } 682 682 if($this->SMTPKeepAlive == true) 683 683 $this->smtp->Reset(); -
trunk/expressoMail1_2/inc/gotodownload.php
r1065 r1246 167 167 } 168 168 else 169 if (preg_match("#^".ini_get('session.save_path')."/[A-z]+_".$GLOBALS['phpgw']->session->sessionid." [A-z0-9]*(\.[A-z]{3,4})?$#",$strFileName))169 if (preg_match("#^".ini_get('session.save_path')."/[A-z]+_".$GLOBALS['phpgw']->session->sessionid."(\.[A-z]{3,4})?$#",$strFileName)) 170 170 { 171 171 readfile($strFileName); -
trunk/expressoMail1_2/index.php
r1243 r1246 78 78 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['num_max_certs_to_cipher'] = $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] ? $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] : "10"; 79 79 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] : "0"; 80 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size'] = $current_config['expressoMail_Max_attachment_size'] ? $current_config['expressoMail_Max_attachment_size'] : ini_get('upload_max_filesize'); 80 81 81 82 $template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); -
trunk/expressoMail1_2/js/abas.js
r1092 r1246 121 121 td.onclick = function(){alternate_border(ID);}; 122 122 td.setAttribute("noWrap","true"); 123 td.alt = borderTitle; 124 td.title = borderTitle; 123 125 124 borderTitle = borderTitle ? borderTitle : id_value ? get_lang("No Subject") : " " ; 126 125 td.value = borderTitle; 126 td.alt = borderTitle; 127 td.title = borderTitle; 127 128 if (borderTitle.length > 21) 128 129 borderTitle = borderTitle.substring(0,21) + "..."; -
trunk/expressoMail1_2/js/connector.js
r802 r1246 620 620 divUpload.innerHTML= "<iframe onload=\"cExecute('$this.functions.getReturnExecuteForm',"+handler+");\" style='display:"+(debug_controller ? "" : "none")+";width:"+(debug_controller ? 400 : 0)+";height:"+(debug_controller ? 400 : 0)+";' name='uploadFile'></iframe>"; 621 621 form.action ="controller.php"; 622 form.target ="uploadFile"; 622 form.target ="uploadFile"; 623 623 form.submit(); 624 624 } -
trunk/expressoMail1_2/js/draw_api.js
r1208 r1246 408 408 span_paging = document.createElement("DIV"); 409 409 span_paging.id = "span_paging"; 410 span_paging.className = "boxHeaderText";411 410 span_paging.align="right"; 412 411 document.getElementById("div_menu_c3").appendChild(span_paging); … … 868 867 } 869 868 else{ 869 td_element3.onmouseover = function (event) {try {InfoContact.begin(this,headers_msgs.from.email)} catch(e){};}; 870 td_element3.onmouseout = function (){ try {clearTimeout(InfoContact.timeout);} catch(e){}}; 870 871 if (headers_msgs.Draft == 'X'){ 871 872 td_element3.innerHTML = "<span style=\"color:red\">("+get_lang("Draft")+") </span>"; 872 873 } 873 else{ 874 var spanSender = document.createElement("SPAN");875 spanSender.onmouseover = function (event) {this.style.textDecoration = "underline";try {InfoContact.begin(this,headers_msgs.from.email)} catch(e){};};876 spanSender.onmouseout = function (){ try {this.style.textDecoration = "none"; clearTimeout(InfoContact.timeout);} catch(e){}};877 spanSender.innerHTML = headers_msgs.from.name != null ? headers_msgs.from.name :headers_msgs.from.email;878 if (spanSender.innerHTML.indexOf(" ") == '-1' && spanSender.innerHTML.length > 25){879 spanSender.innerHTML = spanSender.innerHTML.substring(0,25) + "...";880 }881 else if (spanSender.innerHTML.length > 40 ){882 spanSender.innerHTML = spanSender.innerHTML.substring(0,40) + "...";883 }884 td_element3.appendChild(spanSender);885 886 }874 else{ 875 if (headers_msgs.from.name != null) 876 td_element3.innerHTML += headers_msgs.from.name; 877 else 878 td_element3.innerHTML += headers_msgs.from.email; 879 } 880 } 881 if (td_element3.innerHTML.indexOf(" ") == '-1' && td_element3.innerHTML.length > 25){ 882 td_element3.innerHTML = td_element3.innerHTML.substring(0,25) + "..."; 883 } 884 else if (td_element3.innerHTML.length > 40 ){ 885 td_element3.innerHTML = td_element3.innerHTML.substring(0,40) + "..."; 886 } 887 887 888 td_element4 = document.createElement("TD"); 888 889 td_element4.className = "td_msg"; … … 2519 2520 td11.align="center"; 2520 2521 td11.setAttribute("noWrap","true"); 2521 td11.innerHTML += ' <span class="boxHeaderText">' + value+"% ("+q_used+"M/"+q_limit+"M)</span>";2522 td11.innerHTML += ' ' + value+"% ("+q_used+"M/"+q_limit+"M)"; 2522 2523 //tr1.appendChild(td11); 2523 2524 -
trunk/expressoMail1_2/js/main.js
r1226 r1246 1567 1567 return; 1568 1568 } 1569 1570 1569 if (expresso_offline) { 1571 1570 stringEmail = Element("to_"+ID).value; … … 2213 2212 document.form_import.appendChild(folder); 2214 2213 write_msg(get_lang('You must wait while the messages will be imported...')); 2215 2214 2216 2215 cExecuteForm('$this.imap_functions.import_msgs', document.form_import, handler); 2217 2216 } … … 2254 2253 //Begin: Verify if the file extension is allowed. 2255 2254 var imgExtensions = new Array("eml","zip"); 2256 var inputFile = document.form_import.file_1; 2255 var inputFile = document.form_import.file_1; 2257 2256 if(!inputFile.value){ 2258 2257 alert(get_lang('File extension forbidden or invalid file') + '.'); -
trunk/expressoMail1_2/setup/setup.inc.php
r1068 r1246 37 37 $setup_info['expressoMail1_2']['depends'][] = array( 38 38 'appname' => 'phpgwapi', 39 'versions' => Array('0.9.14','0.9.15',' 2.0.0')39 'versions' => Array('0.9.14','0.9.15','1.0.0') 40 40 ); 41 41 ?> -
trunk/expressoMail1_2/setup/tables_update.inc.php
r1087 r1246 9 9 * option) any later version. * 10 10 \**************************************************************************/ 11 $test[] = '1.2031'; 12 function expressoMail1_2_upgrade1_2031() { 13 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.2201'; 14 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 11 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.234'){ 12 $test[] = '1.234'; 13 function expressoMail1_2_upgrade1_234() { 14 $oProc = $GLOBALS['phpgw_setup']->oProc; 15 $oProc->CreateTable('phpgw_certificados',array( 16 'fd' => array( 17 'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false), 18 'chave_publica' => array( 'type' => 'text'), 19 'expirado' => array('type' => 'bool', 'default' => 'false'), 20 'revogado' => array('type' => 'bool', 'default' => 'false'), 21 'serialnumber' => array('type' => 'int', 'precision' => 8, 'nullable' => false), 22 'authoritykeyidentifier' => array( 'type' => 'text', 'nullable' => false), 23 ), 24 'pk' => array('email','serialnumber','authoritykeyidentifier'), 25 'fk' => array(), 26 'ix' => array(), 27 'uc' => array() 28 ) 29 ); 30 31 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.235'; 32 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 33 } 34 } 35 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.233'){ 36 $test[] = '1.233'; 37 function expressoMail1_2_upgrade1_233() { 38 $setup_info['expressoMail1_2']['currentver'] = '1.234'; 39 return $setup_info['expressoMail1_2']['currentver']; 40 } 41 } 42 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.232'){ 43 $test[] = '1.232'; 44 function expressoMail1_2_upgrade1_232() { 45 $setup_info['expressoMail1_2']['currentver'] = '1.233'; 46 return $setup_info['expressoMail1_2']['currentver']; 47 } 48 } 49 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.231'){ 50 $test[] = '1.231'; 51 function expressoMail1_2_upgrade1_231() { 52 $setup_info['expressoMail1_2']['currentver'] = '1.232'; 53 return $setup_info['expressoMail1_2']['currentver']; 54 } 15 55 } 16 56 17 $test[] = '1.2201';18 function expressoMail1_2_upgrade1_2201() {19 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.2211';20 return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];21 }22 23 $test[] = '1.2211';24 function expressoMail1_2_upgrade1_2211() {25 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.222';26 return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];27 }28 29 $test[] = '1.222';30 function expressoMail1_2_upgrade1_222() {31 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.230';32 return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];33 }34 35 $test[] = '1.230';36 57 function expressoMail1_2_upgrade1_230() { 37 58 $oProc = $GLOBALS['phpgw_setup']->oProc; … … 49 70 return $setup_info['expressoMail1_2']['currentver']; 50 71 } 51 $test[] = '1.231'; 52 function expressoMail1_2_upgrade1_231() { 53 $setup_info['expressoMail1_2']['currentver'] = '1.232'; 54 return $setup_info['expressoMail1_2']['currentver']; 72 73 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.230'){ 74 $test[] = '1.230'; 75 return expressoMail1_2_upgrade1_230(); 76 } 77 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.222'){ 78 $test[] = '1.222'; 79 function expressoMail1_2_upgrade1_222() { 80 $oProc = $GLOBALS['phpgw_setup']->oProc; 81 $oProc->CreateTable('phpgw_expressomail_contacts',array( 82 'fd' => array( 83 'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false), 84 'data' => array( 'type' => 'text') 85 ), 86 'pk' => array('id_owner'), 87 'fk' => array(), 88 'ix' => array(), 89 'uc' => array() 90 ) 91 ); 92 $oProc->CreateTable('phpgw_certificados',array( 93 'fd' => array( 94 'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false), 95 'chave_publica' => array( 'type' => 'text'), 96 'expirado' => array('type' => 'bool', 'default' => 'false') 97 ), 98 'pk' => array('email'), 99 'fk' => array(), 100 'ix' => array(), 101 'uc' => array() 102 ) 103 ); 104 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.223'; 105 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 106 } 107 } 108 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2211'){ 109 $test[] = '1.2211'; 110 function expressoMail1_2_upgrade1_2211() { 111 $oProc = $GLOBALS['phpgw_setup']->oProc; 112 $oProc->CreateTable('phpgw_expressomail_contacts',array( 113 'fd' => array( 114 'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false), 115 'data' => array( 'type' => 'text') 116 ), 117 'pk' => array('id_owner'), 118 'fk' => array(), 119 'ix' => array(), 120 'uc' => array() 121 ) 122 ); 123 $oProc->CreateTable('phpgw_certificados',array( 124 'fd' => array( 125 'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false), 126 'chave_publica' => array( 'type' => 'text'), 127 'expirado' => array('type' => 'bool', 'default' => 'false') 128 ), 129 'pk' => array('email'), 130 'fk' => array(), 131 'ix' => array(), 132 'uc' => array() 133 ) 134 ); 135 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.223'; 136 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 137 } 138 } 139 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2201'){ 140 $test[] = '1.2201'; 141 function expressoMail1_2_upgrade1_2201() {return expressoMail1_2_upgrade1_230();} 55 142 } 56 143 57 $test[] = '1.232'; 58 function expressoMail1_2_upgrade1_232() { 59 $setup_info['expressoMail1_2']['currentver'] = '1.233'; 60 return $setup_info['expressoMail1_2']['currentver']; 61 } 62 63 $test[] = '1.233'; 64 function expressoMail1_2_upgrade1_233() { 65 $setup_info['expressoMail1_2']['currentver'] = '1.234'; 66 return $setup_info['expressoMail1_2']['currentver']; 67 } 68 69 $test[] = '1.234'; 70 function expressoMail1_2_upgrade1_234() { 71 $oProc = $GLOBALS['phpgw_setup']->oProc; 72 $oProc->CreateTable('phpgw_certificados',array( 73 'fd' => array( 74 'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false), 75 'chave_publica' => array( 'type' => 'text'), 76 'expirado' => array('type' => 'bool', 'default' => 'false'), 77 'revogado' => array('type' => 'bool', 'default' => 'false'), 78 'serialnumber' => array('type' => 'int', 'precision' => 8, 'nullable' => false), 79 'authoritykeyidentifier' => array( 'type' => 'text', 'nullable' => false), 80 ), 81 'pk' => array('email','serialnumber','authoritykeyidentifier'), 82 'fk' => array(), 83 'ix' => array(), 84 'uc' => array() 85 ) 86 ); 87 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.235'; 88 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 144 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2031'){ 145 $test[] = '1.2031'; 146 function expressoMail1_2_upgrade1_2031() { 147 $oProc = $GLOBALS['phpgw_setup']->oProc; 148 $oProc->CreateTable('phpgw_expressomail_contacts',array( 149 'fd' => array( 150 'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false), 151 'data' => array( 'type' => 'text') 152 ), 153 'pk' => array('id_owner'), 154 'fk' => array(), 155 'ix' => array(), 156 'uc' => array() 157 ) 158 ); 159 $oProc->CreateTable('phpgw_certificados',array( 160 'fd' => array( 161 'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false), 162 'chave_publica' => array( 'type' => 'text'), 163 'expirado' => array('type' => 'bool', 'default' => 'false') 164 ), 165 'pk' => array('email'), 166 'fk' => array(), 167 'ix' => array(), 168 'uc' => array() 169 ) 170 ); 171 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.223'; 172 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 173 } 89 174 } 90 175 ?> -
trunk/expressoMail1_2/templates/default/config.tpl
r1231 r1246 99 99 </td> 100 100 </tr> 101 <tr bgcolor="{row_off}"> 102 <td>{lang_Max_attachment_size}</td> 103 <td> 104 <input size="1" name="newsettings[expressoMail_Max_attachment_size]" value="{value_expressoMail_Max_attachment_size}"> 105 </td> 106 </tr> 101 107 <!-- END body --> 102 108 <!-- BEGIN footer -->
Note: See TracChangeset
for help on using the changeset viewer.