Ticket #1484923: changelog.diff
| File changelog.diff, 12.5 kB (added by ASeques, 6 months ago) |
|---|
-
program/include/rcube_contacts.inc
34 34 var $result = null; 35 35 var $search_fields; 36 36 var $search_string; 37 var $table_cols = array('name', ' email', 'firstname', 'surname');38 37 var $table_cols = array('name', 'firstname', 'surname', 'email', 'global_contact', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice'); 38 39 39 /** public properties */ 40 40 var $primary_key = 'contact_id'; 41 41 var $readonly = false; … … 156 156 $sql_result = $this->db->limitquery( 157 157 "SELECT * FROM ".$this->db_name." 158 158 WHERE del<>1 159 AND user_id=?" .159 AND (user_id=? OR global_contact = 1)" . 160 160 ($this->filter ? " AND (".$this->filter.")" : "") . 161 161 " ORDER BY name", 162 162 $start_row, … … 229 229 "SELECT COUNT(contact_id) AS rows 230 230 FROM ".$this->db_name." 231 231 WHERE del<>1 232 AND user_id=?".232 AND (user_id=? OR global_contact = 1)". 233 233 ($this->filter ? " AND (".$this->filter.")" : ""), 234 234 $this->user_id); 235 235 … … 264 264 $this->db->query( 265 265 "SELECT * FROM ".$this->db_name." 266 266 WHERE contact_id=? 267 AND user_id=?267 AND (user_id=? OR global_contact = 1) 268 268 AND del<>1", 269 269 $id, 270 270 $this->user_id); … … 355 355 "UPDATE ".$this->db_name." 356 356 SET changed=".$this->db->now().", ".join(', ', $write_sql)." 357 357 WHERE contact_id=? 358 AND user_id=? 358 AND (user_id=? OR global_contact = 1) 359 359 AND del<>1", 360 360 $id, 361 361 $this->user_id); … … 455 455 } 456 456 457 457 458 ?> 459 No newline at end of file 458 ?> -
program/include/main.inc
1328 1328 { 1329 1329 $fname = '_'.$col; 1330 1330 $attrib['name'] = $fname; 1331 1332 if ($type=='checkbox')1331 1332 if($col == "notice") 1333 1333 { 1334 $attrib['rows'] = "8"; 1335 $attrib['size'] = "40"; 1336 $attrib['cols'] = "40"; 1337 $input = new textarea($attrib); 1338 } 1339 elseif($col == "p_address" | $col == "w_address") 1340 { 1341 $attrib['rows'] = "4"; 1342 $attrib['size'] = "40"; 1343 $attrib['cols'] = "40"; 1344 $input = new textarea($attrib); 1345 } 1346 else if ($type=='checkbox') 1347 { 1334 1348 $attrib['value'] = '1'; 1335 1349 $input = new checkbox($attrib); 1336 1350 } -
program/localization/de_DE/labels.inc
135 135 $labels['firstname'] = 'Vorname'; 136 136 $labels['surname'] = 'Nachname'; 137 137 $labels['email'] = 'E-Mail'; 138 $labels['global_contact'] = 'Globaler Kontakt?'; 139 $labels['firm'] = 'Organisation:'; 140 $labels['position'] = 'Position:'; 141 $labels['p_tel'] = 'Telefon:'; 142 $labels['p_fax'] = 'Fax:'; 143 $labels['p_mob'] = 'Mobil:'; 144 $labels['p_address'] = 'Adresse Privat:'; 145 $labels['w_tel'] = 'Telefon GeschÀftlich:'; 146 $labels['w_fax'] = 'Fax GeschÀftlich:'; 147 $labels['w_mob'] = 'Mobil GeschÀftlich:'; 148 $labels['w_address'] = 'Adresse GeschÀftlich:'; 149 $labels['notice'] = 'Bemerkung:'; 138 150 $labels['addcontact'] = 'Kontakt hinzufÃŒgen'; 139 151 $labels['editcontact'] = 'Kontakt bearbeiten'; 140 152 $labels['edit'] = 'Bearbeiten'; … … 189 201 $labels['sortasc'] = 'Aufsteigend sortieren'; 190 202 $labels['sortdesc'] = 'Absteigend sortieren'; 191 203 192 ?> 193 No newline at end of file 204 ?> -
program/localization/ca/labels.inc
136 136 $labels['firstname'] = 'Nom'; 137 137 $labels['surname'] = 'Cognom'; 138 138 $labels['email'] = 'E-Mail'; 139 $labels['global_contact'] = 'Contacte Global?'; 140 $labels['firm'] = 'Organització'; 141 $labels['position'] = 'Posició'; 142 $labels['p_tel'] = 'TelÚfon'; 143 $labels['p_fax'] = 'Fax'; 144 $labels['p_mob'] = 'Mòbil'; 145 $labels['p_address'] = 'Adreça'; 146 $labels['w_tel'] = 'TelÚfon del negoci'; 147 $labels['w_fax'] = 'Fax del negoci'; 148 $labels['w_mob'] = 'Mòbil del negoci'; 149 $labels['w_address'] = 'Direcció comercial'; 150 $labels['notice'] = 'Avis'; 139 151 $labels['addcontact'] = 'Afegir nou contacte'; 140 152 $labels['editcontact'] = 'Editar contacte'; 141 153 $labels['edit'] = 'Editar'; … … 190 202 $labels['sortasc'] = 'Ordena ascendentment'; 191 203 $labels['sortdesc'] = 'Ordena descendentment'; 192 204 193 ?> 194 No newline at end of file 205 ?> -
program/localization/es/labels.inc
138 138 $labels['firstname'] = 'Nombre'; 139 139 $labels['surname'] = 'Apellido'; 140 140 $labels['email'] = 'Correo'; 141 $labels['global_contact'] = 'Contacto global?'; 142 $labels['firm'] = 'Organización'; 143 $labels['position'] = 'Posición'; 144 $labels['p_tel'] = 'teléfono'; 145 $labels['p_fax'] = 'Fax'; 146 $labels['p_mob'] = 'Móvil'; 147 $labels['p_address'] = 'Dirección'; 148 $labels['w_tel'] = 'Teléfono del negocio'; 149 $labels['w_fax'] = 'Fax del negocio'; 150 $labels['w_mob'] = 'Móvil del negocio'; 151 $labels['w_address'] = 'Dirección comercial'; 152 $labels['notice'] = 'Aviso'; 141 153 $labels['addcontact'] = 'Añadir nuevo contacto'; 142 154 $labels['editcontact'] = 'Editar contacto'; 143 155 $labels['edit'] = 'Editar'; … … 192 204 $labels['sortasc'] = 'Orden ascendente'; 193 205 $labels['sortdesc'] = 'Orden descendente'; 194 206 195 ?> 196 No newline at end of file 207 ?> -
program/localization/en_US/labels.inc
174 174 $labels['firstname'] = 'First name'; 175 175 $labels['surname'] = 'Last name'; 176 176 $labels['email'] = 'E-Mail'; 177 $labels['global_contact'] = 'Global Contact?'; 178 $labels['firm'] = 'Organization:'; 179 $labels['position'] = 'Position:'; 180 $labels['p_tel'] = 'Telephone:'; 181 $labels['p_fax'] = 'Fax:'; 182 $labels['p_mob'] = 'Mobile:'; 183 $labels['p_address'] = 'Address:'; 184 $labels['w_tel'] = 'Business Telephone:'; 185 $labels['w_fax'] = 'Business Fax:'; 186 $labels['w_mob'] = 'Business Mobile:'; 187 $labels['w_address'] = 'Business Address:'; 188 $labels['notice'] = 'Notes:'; 177 189 178 190 $labels['addcontact'] = 'Add new contact'; 179 191 $labels['editcontact'] = 'Edit contact'; -
program/steps/addressbook/save.inc
37 37 38 38 39 39 // setup some vars we need 40 $a_save_cols = array('name', 'firstname', 'surname', 'email' );40 $a_save_cols = array('name', 'firstname', 'surname', 'email', 'global_contact', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice'); 41 41 $a_record = array(); 42 42 $cid = get_input_value('_cid', RCUBE_INPUT_POST); 43 43 … … 45 45 foreach ($a_save_cols as $col) 46 46 { 47 47 $fname = '_'.$col; 48 if (isset($_POST[$fname])) 48 if($col == 'global_contact'){ 49 if(isset($_POST[$fname])){ 50 $a_record[$col] = 1; 51 }else{ 52 $a_record[$col] = 0; 53 } 54 } else if (isset($_POST[$fname])){ 49 55 $a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST); 56 } 50 57 } 51 58 52 59 // update an existing contact -
program/steps/addressbook/show.inc
43 43 // return the complete address record as table 44 44 $out = "<table>\n\n"; 45 45 46 $a_show_cols = array('name', 'firstname', 'surname', 'email'); 46 # REPLACE with (NOTE: Unfortunately the two labels "Data" and "Contact" are not yet included in the roundcube localization 47 # file. If someone could help me out on this one I would really appreciate it. As it is for now just translate these two 48 # labels into your default language. 49 $data ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Data</b></legend><table>\n\n"; 50 $contact ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Contact</b></legend><table>\n\n"; 51 52 $a_show_cols = array('name', 'firstname', 'surname', 'email', 'global_contact', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice'); 47 53 foreach ($a_show_cols as $col) 48 54 { 49 55 if ($col=='email' && !empty($record[$col])) … … 56 62 else 57 63 $value = Q($record[$col]); 58 64 59 $out .= sprintf("<tr><td class=\"title\">%s</td><td>%s</td></tr>\n", 60 Q(rcube_label($col)), 61 $value); 65 $title = Q(rcube_label($col)); 66 if($col == "notice"){ 67 $out2 = "<td colspan=\"3\" width=\"100%\" valign=\"top\"><fieldset width=\"100%\" class=\"title\"><legend><b>$title</b></legend><table>\n"; 68 $out2 .= sprintf("<tr><td>%s</td></tr>\n", $value); 69 $out2 .= "</table></fieldset></td>\n\n"; 70 } 71 elseif($col == "p_tel" | $col == "p_fax" | $col == "p_mob" | $col == "w_tel" | $col == "w_fax" | $col == "w_mob"){ 72 if(!$value == ""){ 73 $contact .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, $value); 74 } 75 } 76 elseif($col == "p_address"){ 77 $p_address = "<td width=\"45%\" valign=\"top\"><fieldset width=\"45%\" class=\"title\"><legend><b>$title</b></legend><table>\n"; 78 $p_address .= sprintf("<tr><td>%s</td></tr>\n", $value); 79 $p_address .= "</table></fieldset></td>\n\n"; 80 } 81 elseif($col == "w_address"){ 82 $w_address = "<td width=\"45%\" valign=\"top\"><fieldset width=\"45%\" class=\"title\"><legend><b>$title</b></legend><table>\n"; 83 $w_address .= sprintf("<tr><td>%s</td></tr>\n", $value); 84 $w_address .= "</table></fieldset></td>\n\n"; 85 } 86 else{ 87 if($col == "global_contact"){ 88 if($value == 1) 89 $data .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, '✔'); 90 else 91 $data .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, '✘'); 92 } else if(!$value == "") 93 $data .= sprintf("<tr><td>%s</td><td>%s</td></tr>\n",$title, $value); 94 } 95 96 97 62 98 } 63 64 $out .= "\n</table>"; 65 99 $data .= "</table></td>"; 100 $contact .= "</table></td>"; 101 102 $out .= "$data<td width=\"2%\">$contact\n\n"; 103 $out .= "</tr><tr>"; 104 $out .= "$p_address<td width=\"2%\">$w_address\n\n"; 105 $out .= "</tr><tr>"; 106 $out .= $out2; 107 $out .= "\n</tr></table>"; 66 108 return $out; 67 109 } 68 110 … … 70 112 //$OUTPUT->framed = $_framed; 71 113 $OUTPUT->add_handler('contactdetails', 'rcmail_contact_details'); 72 114 $OUTPUT->send('showcontact'); 73 ?> 74 No newline at end of file 115 ?> -
program/steps/addressbook/edit.inc
61 61 // return the complete address edit form as table 62 62 $out = "$form_start<table>\n\n"; 63 63 64 $a_show_cols = array('name', 'firstname', 'surname', ' email');64 $a_show_cols = array('name', 'firstname', 'surname', 'global_contact', 'email', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice'); 65 65 foreach ($a_show_cols as $col) 66 66 { 67 $attrib['id'] = 'rcmfd_'.$col; 67 if($col == "global_contact") 68 $value = rcmail_get_edit_field($col, $record[$col], $attrib, 'checkbox'); 69 else 68 70 $value = rcmail_get_edit_field($col, $record[$col], $attrib); 69 71 $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 70 72 $attrib['id'], … … 118 120 119 121 // this will be executed if no template for addcontact exists 120 122 parse_template('editcontact'); 121 ?> 122 No newline at end of file 123 ?>
