diff --git a/addressbook/inc/class.so_ldap.inc.php b/addressbook/inc/class.so_ldap.inc.php index 4175afbc22..d851d3afd4 100644 --- a/addressbook/inc/class.so_ldap.inc.php +++ b/addressbook/inc/class.so_ldap.inc.php @@ -850,13 +850,13 @@ class so_ldap $bin = ldap_get_values_len($this->ds,ldap_first_entry($this->ds,$result),'jpegphoto'); $contact['jpegphoto'] = $bin[0]; } - if(preg_match('/cn=([^,]+),'.preg_quote($this->personalContactsDN).'$/i',$entry['dn'],$matches)) + if(preg_match('/cn=([^,]+),'.preg_quote($this->personalContactsDN,'/').'$/i',$entry['dn'],$matches)) { // personal addressbook $contact['owner'] = $GLOBALS['egw']->accounts->name2id($matches[1],'account_lid','u'); $contact['private'] = 1; } - elseif(preg_match('/cn=([^,]+),'.preg_quote($this->sharedContactsDN).'$/i',$entry['dn'],$matches)) + elseif(preg_match('/cn=([^,]+),'.preg_quote($this->sharedContactsDN,'/').'$/i',$entry['dn'],$matches)) { // group addressbook $contact['owner'] = $GLOBALS['egw']->accounts->name2id($matches[1],'account_lid','g'); @@ -1062,10 +1062,10 @@ class so_ldap } else { - $parts = preg_split('/'. preg_quote($data['givenname'][0]) .'.*'. preg_quote($data['sn'][0]) .'/', $data['cn'][0]); + $parts = preg_split('/'. preg_quote($data['givenname'][0],'/') .'.*'. preg_quote($data['sn'][0],'/') .'/', $data['cn'][0]); $contact['n_prefix'] = trim($parts[0]); $contact['n_suffix'] = trim($parts[1]); - if(preg_match('/'. preg_quote($data['givenname'][0]) .' (.*) '. preg_quote($data['sn'][0]) .'/',$data['cn'][0], $matches)) + if(preg_match('/'. preg_quote($data['givenname'][0],'/') .' (.*) '. preg_quote($data['sn'][0],'/') .'/',$data['cn'][0], $matches)) { $contact['n_middle'] = $matches[1]; } diff --git a/addressbook/inc/class.uicontacts.inc.php b/addressbook/inc/class.uicontacts.inc.php index d1d5e07b59..a337fb7c06 100644 --- a/addressbook/inc/class.uicontacts.inc.php +++ b/addressbook/inc/class.uicontacts.inc.php @@ -41,6 +41,11 @@ class uicontacts extends bocontacts var $private_addressbook = false; var $org_views; + /** + * Addressbook configuration (stored as phpgwapi = general server config) + * + * @var array + */ var $config; /** * Name(s) of the tabs in the edit dialog @@ -345,6 +350,7 @@ class uicontacts extends bocontacts $query = $GLOBALS['egw']->session->appsession('index','addressbook'); $query['num_rows'] = -1; // all $query['org_view'] = $org; + $query['searchletter'] = ''; $this->get_rows($query,$checked,$readonlys,true); // true = only return the id's if (count($checked) > 1) // use a nicely formatted org-name as title in infolog @@ -393,6 +399,7 @@ class uicontacts extends bocontacts if ($use_all) { + @set_time_limit(0); // switch off the execution time limit, as it's for big selections to small $query['num_rows'] = -1; // all $this->get_rows($query,$checked,$readonlys,true); // true = only return the id's } @@ -424,6 +431,14 @@ class uicontacts extends bocontacts $to_list = (int)substr($action,8); $action = 'to_list'; } + // Security: stop non-admins to export more then the configured number of contacts + if (in_array($action,array('csv','vcard')) && (int)$this->config['contact_export_limit'] && + !isset($GLOBALS['egw_info']['user']['apps']['admin']) && count($checked) > $this->config['contact_export_limit']) + { + $action_msg = lang('exported'); + $failed = count($checked); + return false; + } switch($action) { case 'csv': @@ -766,7 +781,7 @@ class uicontacts extends bocontacts $wildcard = $query['advanced_search']['meth_select']; unset($query['advanced_search']['meth_select']); } - $rows = parent::search($query['advanced_search'] ? $query['advanced_search'] : $query['search'],false, + $rows = parent::search($query['advanced_search'] ? $query['advanced_search'] : $query['search'],$id_only, $order,'',$wildcard,false,$op,array((int)$query['start'],(int) $query['num_rows']),$query['col_filter']); // do we need the custom fields @@ -1582,7 +1597,9 @@ $readonlys['button[vcard]'] = true; } /** - * returns link to call the given phonenumer + * returns link to call the given phonenumber + * + * replaces '%1' with the phonenumber to call, '%u' with the user's account_lid and '%t' with his work-phone-number * * @param string $number phone number * @param string &$link returns the link @@ -1592,7 +1609,14 @@ $readonlys['button[vcard]'] = true; { if (!$number || !$this->config['call_link']) return false; - $link = str_replace('%1',urlencode($number),$this->config['call_link']); + static $userphone; + if (is_null($userphone)) + { + $user = $this->read('account_id:'.$GLOBALS['egw_info']['user']['account_id']); + $userphone = is_array($user) ? ($user['tel_work'] ? $user['tel_work'] : $user['tel_home']) : false; + } + $link = str_replace(array('%1','%u','%t'),array(urlencode($number),$GLOBALS['egw_info']['user']['account_lid'],$userphone), + $this->config['call_link']); } function js() diff --git a/addressbook/setup/phpgw_de.lang b/addressbook/setup/phpgw_de.lang index a2f8a1df0a..7c8413a606 100644 --- a/addressbook/setup/phpgw_de.lang +++ b/addressbook/setup/phpgw_de.lang @@ -14,7 +14,7 @@ actions addressbook de Befehle add %1 addressbook de %1 hinzufügen add a contact to this organisation addressbook de Einen Kontakt zu dieser Organisation hinzufügen add a new contact addressbook de Neuen Kontakt anlegen -add a new list addressbook de Neuen Verteiler hinzfügen +add a new list addressbook de Neuen Verteiler hinzufügen add a single entry by passing the fields. addressbook de Hinzufügen eines einzelnen Eintrags durch Übergeben der Felder. add custom field addressbook de Benutzerdefiniertes Feld hinzufügen add to distribution list: addressbook de Hinzufügen zu Verteiler: @@ -167,6 +167,7 @@ home phone addressbook de Tel. privat home state addressbook de Bundesland privat home street addressbook de Straße privat home zip code addressbook de PLZ privat +how many contacts should non-admins be able to export (empty = no limit) admin de Wieviele Kontakte sollen nicht-Adminstratoren exportieren können (leer = keine Begrenzung) icon addressbook de Icon if accounts are already in ldap admin de wenn die Benutzer bereits im LDAP sind import addressbook de Import @@ -289,7 +290,7 @@ translation addressbook de type addressbook de Typ update a single entry by passing the fields. addressbook de Aktualisiert einen einzelnen Eintrag durch Übergabe seiner Felder. upload or delete the photo addressbook de Foto hochladen oder löschen -url to link telephone numbers to (use %1 for the number) admin de URL mit denen Telefonnummern verlinkt werden sollen (%1 für die Nummber verwenden) +url to link telephone numbers to (use %1 = number to call, %u = account name, %t = account phone) admin de URL mit denen Telefonnummern verlinkt werden sollen (verwenden Sie %1 = anzurufende Nummer, %u = Benutzernamen, %t = Telefon des Benutzers) use an extra category tab? addressbook de Separaten Reiter für Kategorien verwenden? use country list addressbook de Länderliste benutzen use setup for a full account-migration admin de für eine komplette Benutzer Migration setup verwenden @@ -302,7 +303,7 @@ warning!! ldap is valid only if you are not using contacts for accounts storage! warning: all contacts found will be deleted! addressbook de WARNUNG: Alle gefundenen Kontakte werden gelöscht! what should links to the addressbook display in other applications. empty values will be left out. you need to log in anew, if you change this setting! addressbook de Was sollen Verknüpfungen zum Adressbuch in anderen Anwendungen anzeigen. Leere Werte werden ausgelassen. Sie müssen sich neu anmelden, wenn Sie hier eine Änderung vornehmen! which address format should the addressbook use for countries it does not know the address format. if the address format of a country is known, it uses it independent of this setting. addressbook de Welches Format soll das Adressbuch für Adressen verwenden deren landesübliches Adressformat unbekannt ist. Wenn das Adressformat eines Landes dem Adressbuch bekannt ist, wird das unabhänig von dieser Einstellung benutzt. -which addressbook should be selected when adding a contact and you have no add rights to the current addressbook. addressbook de Welches Adressbuch soll ausgewählt sein beim Hinzfügen von Kontakten, wenn Sie keine Hinzufügen Rechte zum aktuellen Adressbuch haben. +which addressbook should be selected when adding a contact and you have no add rights to the current addressbook. addressbook de Welches Adressbuch soll ausgewählt sein beim Hinzufügen von Kontakten, wenn Sie keine Hinzufügen Rechte zum aktuellen Adressbuch haben. which charset should be used for the csv export. the system default is the charset of this egroupware installation. addressbook de Welcher Zeichensatz soll für den CSV Export verwendet werden. Die systemweite Vorgabe ist der Zeichensatz der eGroupWare Installation. which fields should be exported. all means every field stored in the addressbook incl. the custom fields. the business or home address only contains name, company and the selected address. addressbook de Welche Felder sollen exportiert werden. Alle bedeutet jedes Feld das im Adressbuch gespeichert ist einschl. der benutzerdefinierten Felder. Die Geschäfts- oder Privatadresse enthält nur Name, Firma und die ausgewählte Adresse. whole query addressbook de gesamte Abfrage diff --git a/addressbook/setup/phpgw_en.lang b/addressbook/setup/phpgw_en.lang index 9f249f7a16..1ca87b2158 100644 --- a/addressbook/setup/phpgw_en.lang +++ b/addressbook/setup/phpgw_en.lang @@ -167,6 +167,7 @@ home phone addressbook en Home Phone home state addressbook en Home State home street addressbook en Home Street home zip code addressbook en Home ZIP Code +how many contacts should non-admins be able to export (empty = no limit) admin en How many contacts should non-admins be able to export (empty = no limit) icon addressbook en Icon if accounts are already in ldap admin en if accounts are already in LDAP import addressbook en Import @@ -289,7 +290,7 @@ translation addressbook en Translation type addressbook en Type update a single entry by passing the fields. addressbook en Update a single entry by passing the fields. upload or delete the photo addressbook en Upload or delete the photo -url to link telephone numbers to (use %1 for the number) admin en URL to link telephone numbers to (use %1 for the number) +url to link telephone numbers to (use %1 = number to call, %u = account name, %t = account phone) admin en URL to link telephone numbers to (use %1 = number to call, %u = account name, %t = account phone) use an extra category tab? addressbook en Use an extra category tab? use country list addressbook en Use Country List use setup for a full account-migration admin en use setup for a full account-migration diff --git a/addressbook/templates/default/config.tpl b/addressbook/templates/default/config.tpl index 3c0a7212ec..be9016cbec 100644 --- a/addressbook/templates/default/config.tpl +++ b/addressbook/templates/default/config.tpl @@ -14,7 +14,7 @@  {lang_Telephony_integration} -  {lang_URL_to_link_telephone_numbers_to_(use_%1_for_the_number)}: +  {lang_URL_to_link_telephone_numbers_to_(use_%1_=_number_to_call,_%u_=_account_name,_%t_=_account_phone)}: @@ -46,6 +46,10 @@ + +  {lang_Security}: {lang_How_many_contacts_should_non-admins_be_able_to_export_(empty_=_no_limit)}: + +  {lang_Contact_repository} diff --git a/etemplate/inc/class.date_widget.inc.php b/etemplate/inc/class.date_widget.inc.php index 9f6cccbbcc..71a947faf0 100644 --- a/etemplate/inc/class.date_widget.inc.php +++ b/etemplate/inc/class.date_widget.inc.php @@ -181,8 +181,8 @@ static $chars_shortcut; if (is_null($chars_shortcut)) $chars_shortcut = (int)lang('3 number of chars for month-shortcut'); // < 0 to take the chars from the end - $value['M'] = lang(substr($month[$value['m']],0,3)); // check if we have a translation of the short-cut - if ($substr($value['M'],-1) == '*') // if not generate one by truncating the translation of the long name + $value['M'] = lang($m = substr($month[$value['m']],0,3)); // check if we have a translation of the short-cut + if ($value['M'] == $m || $substr($value['M'],-1) == '*') // if not generate one by truncating the translation of the long name { $value['M'] = $chars_shortcut > 0 ? $substr(lang($month[$value['m']]),0,$chars_shortcut) : $substr(lang($month[$value['m']]),$chars_shortcut); diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index bbcc9b99f6..faf1ba4297 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -178,9 +178,6 @@ $extension_data['old_value'] = $value = $nm_global['col_filter'][$this->last_part($name)]; return True; } - if (!$value['filter_onchange']) $value['filter_onchange'] = 'this.form.submit();'; - if (!$value['filter2_onchange']) $value['filter2_onchange'] = 'this.form.submit();'; - // presetting the selectboxes with their default values, to NOT loop, because post-process thinks they changed if (!isset($value['cat_id'])) $value['cat_id'] = ''; if (!isset($value['search'])) $value['search'] = ''; @@ -192,6 +189,12 @@ if (!is_string($value[$f])) $value[$f] = (string) $value[$f]; } } + // save values in persistent extension_data to be able use it in post_process + $extension_data += $value; + + if (!$value['filter_onchange']) $value['filter_onchange'] = 'this.form.submit();'; + if (!$value['filter2_onchange']) $value['filter2_onchange'] = 'this.form.submit();'; + list($app,$class,$method) = explode('.',$value['get_rows']); if ($app && $class) { @@ -401,9 +404,6 @@ $cell['type'] = 'template'; $cell['label'] = $cell['help'] = ''; - // save values in persistent extension_data to be able use it in post_process - $extension_data += $value; - foreach(array('sort','order','col_filter') as $n) // save them for the sortheader { $nm_global[$n] = $value[$n]; diff --git a/infolog/csv_import.php b/infolog/csv_import.php index ccb6e8144a..ba292e389e 100644 --- a/infolog/csv_import.php +++ b/infolog/csv_import.php @@ -1,16 +1,14 @@ * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License, or (at your * - * option) any later version. * - \**************************************************************************/ - - /* $Id$ */ +/** + * InfoLog - CSV import + * + * @link http://www.egroupware.org + * @author Ralf Becker + * @package infolog + * @copyright (c) 2003-6 by Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ $GLOBALS['egw_info']['flags'] = array( 'currentapp' => 'infolog', diff --git a/infolog/inc/class.admin_prefs_sidebox_hooks.inc.php b/infolog/inc/class.admin_prefs_sidebox_hooks.inc.php index f414501801..fd164bba83 100644 --- a/infolog/inc/class.admin_prefs_sidebox_hooks.inc.php +++ b/infolog/inc/class.admin_prefs_sidebox_hooks.inc.php @@ -1,24 +1,17 @@ * - * ------------------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License, or (at your * - * option) any later version. * - \**************************************************************************/ - - /* $Id$ */ +/** + * InfoLog - Admin-, Preferences- and SideboxMenu-Hooks + * + * @link http://www.egroupware.org + * @author Ralf Becker + * @package infolog + * @copyright (c) 2003-6 by Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ /** * Class containing admin, preferences and sidebox-menus (used as hooks) - * - * @package infolog - * @author Ralf Becker - * @copyright (c) by Ralf Becker - * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License */ class admin_prefs_sidebox_hooks { @@ -84,5 +77,3 @@ class admin_prefs_sidebox_hooks } } } - -?> diff --git a/infolog/inc/class.datasource_infolog.inc.php b/infolog/inc/class.datasource_infolog.inc.php index 0040f33399..12543438ad 100644 --- a/infolog/inc/class.datasource_infolog.inc.php +++ b/infolog/inc/class.datasource_infolog.inc.php @@ -1,16 +1,15 @@ * -* -------------------------------------------- * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU General Public License as published by the * -* Free Software Foundation; either version 2 of the License, or (at your * -* option) any later version. * -\**************************************************************************/ - -/* $Id$ */ +/** + * InfoLog - Datasource for ProjektManager + * + * @link http://www.egroupware.org + * @author Ralf Becker + * @package infolog + * @subpackage projectmanager + * @copyright (c) 2005 by Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ include_once(EGW_INCLUDE_ROOT.'/projectmanager/inc/class.datasource.inc.php'); @@ -23,11 +22,6 @@ include_once(EGW_INCLUDE_ROOT.'/projectmanager/inc/class.datasource.inc.php'); * - planned start from the end of a start constrain * - planned end from the planned time and a start-time * - planned start and end from the "real" values - * - * @package infolog - * @author RalfBecker-AT-outdoor-training.de - * @copyright (c) 2005 by RalfBecker-AT-outdoor-training.de - * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License */ class datasource_infolog extends datasource { diff --git a/infolog/inc/class.infolog_link_registry.inc.php b/infolog/inc/class.infolog_link_registry.inc.php index 32ede940e2..717e356a99 100644 --- a/infolog/inc/class.infolog_link_registry.inc.php +++ b/infolog/inc/class.infolog_link_registry.inc.php @@ -1,37 +1,29 @@ * - * originaly based on todo written by Joseph Engo * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License, or (at your * - * option) any later version. * - \**************************************************************************/ - - /* $Id$ */ +/** + * InfoLog - Link-registry + * + * @link http://www.egroupware.org + * @author Ralf Becker + * @package infolog + * @copyright (c) 2003-6 by Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ - include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.boinfolog.inc.php'); +include_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.boinfolog.inc.php'); - /** - * This class returns the link-registry for infolog - * - * To prevent an invinit recursion, it has to be outside the boinfolog class, - * which itself instanciats the link class by default. - * - * @package infolog - * @author Ralf Becker - * @copyright (c) by RalfBecker-At-outdoor-training.de - * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License - */ - class infolog_link_registry +/** + * This class returns the link-registry for infolog + * + * To prevent an invinit recursion, it has to be outside the boinfolog class, + * which itself instanciats the link class by default. + */ +class infolog_link_registry +{ + function search_link($location) { - function search_link($location) - { - $bo =& new boinfolog(0,false); // false = dont instanciate the link class - - return $bo->search_link($location); - } - } \ No newline at end of file + $bo =& new boinfolog(0,false); // false = dont instanciate the link class + + return $bo->search_link($location); + } +} \ No newline at end of file diff --git a/infolog/inc/class.sifinfolog.inc.php b/infolog/inc/class.sifinfolog.inc.php index 38dc495189..5b18401afb 100644 --- a/infolog/inc/class.sifinfolog.inc.php +++ b/infolog/inc/class.sifinfolog.inc.php @@ -1,15 +1,14 @@ * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License. * - \**************************************************************************/ - - /* $Id$ */ +/** + * InfoLog - SIF Parser + * + * @link http://www.egroupware.org + * @author Lars Kneschke + * @package infolog + * @subpackage syncml + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ require_once PHPGW_SERVER_ROOT.'/infolog/inc/class.boinfolog.inc.php'; require_once EGW_SERVER_ROOT.'/phpgwapi/inc/horde/Horde/iCalendar.php'; diff --git a/infolog/inc/class.uicustomfields.inc.php b/infolog/inc/class.uicustomfields.inc.php index df5142dd63..4979457192 100644 --- a/infolog/inc/class.uicustomfields.inc.php +++ b/infolog/inc/class.uicustomfields.inc.php @@ -1,6 +1,6 @@ diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index 62aa8e11e3..0bf81de6d4 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -179,7 +179,7 @@ class uiinfolog $readonlys["sp[$id]"] = !$this->bo->check_access($info,EGW_ACL_ADD); $readonlys["view[$id]"] = $info['info_anz_subs'] < 1; $readonlys['view[0]'] = True; // no parent - $readonlys["timesheet[$id]"] = !$this->prefs['show_times'] || !isset($GLOBALS['egw_info']['user']['apps']['timesheet']); + $readonlys["timesheet[$id]"] = !isset($GLOBALS['egw_info']['user']['apps']['timesheet']); if (!$show_links) $show_links = $this->prefs['show_links']; @@ -321,9 +321,12 @@ class uiinfolog } else { - unset($query['columnselection_pref']); // it might be set + $query['columnselection_pref'] = 'infolog.index.rows'; $query['default_cols'] = '!cat_id,info_datemodified,info_used_time_info_planned_time,info_id'; } + // set old show_times pref, that get_info calculates the cumulated time of the timesheets + $this->prefs['show_times'] = strpos($this->prefs['nextmatch-'.$query['columnselection_pref']],'info_used_time_info_planned_time') !== false; + $readonlys = $rows = array(); foreach($ids as $id => $info) { diff --git a/infolog/inc/class.vcalinfolog.inc.php b/infolog/inc/class.vcalinfolog.inc.php index a8b9bc5d2c..cf5f61cd7e 100644 --- a/infolog/inc/class.vcalinfolog.inc.php +++ b/infolog/inc/class.vcalinfolog.inc.php @@ -1,15 +1,14 @@ * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License. * - \**************************************************************************/ - - /* $Id$ */ +/** + * InfoLog - iCalendar Parser + * + * @link http://www.egroupware.org + * @author Lars Kneschke + * @package infolog + * @subpackage syncml + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ require_once EGW_SERVER_ROOT.'/infolog/inc/class.boinfolog.inc.php'; require_once EGW_SERVER_ROOT.'/phpgwapi/inc/horde/Horde/iCalendar.php'; diff --git a/infolog/inc/hook_deleteaccount.inc.php b/infolog/inc/hook_deleteaccount.inc.php index f886176eed..c230ad628a 100644 --- a/infolog/inc/hook_deleteaccount.inc.php +++ b/infolog/inc/hook_deleteaccount.inc.php @@ -1,22 +1,22 @@ + * @package infolog + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ - // Delete all records for a user - if((int)$GLOBALS['hook_values']['account_id'] > 0) - { - $info =& CreateObject('infolog.soinfolog'); +// Delete all records for a user +if((int)$GLOBALS['hook_values']['account_id'] > 0) +{ + require_once(EGW_INCLUDE_ROOT.'/infolog/inc/class.soinfolog.inc.php'); - $info->change_delete_owner((int)$GLOBALS['hook_values']['account_id'],(int)$_POST['new_owner']); + $info =& new soinfolog; - unset($info); - } -?> + $info->change_delete_owner((int)$GLOBALS['hook_values']['account_id'],(int)$_POST['new_owner']); + + unset($info); +} diff --git a/infolog/inc/hook_home.inc.php b/infolog/inc/hook_home.inc.php index 1f152c0207..3bd309ae3d 100644 --- a/infolog/inc/hook_home.inc.php +++ b/infolog/inc/hook_home.inc.php @@ -1,57 +1,56 @@ + * @package infolog + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ - if (($showevents = $GLOBALS['egw_info']['user']['preferences']['infolog']['homeShowEvents'])) +if (($showevents = $GLOBALS['egw_info']['user']['preferences']['infolog']['homeShowEvents'])) +{ + $save_app = $GLOBALS['egw_info']['flags']['currentapp']; + $GLOBALS['egw_info']['flags']['currentapp'] = 'infolog'; + + $GLOBALS['egw']->translation->add_app('infolog'); + + $app_id = $GLOBALS['egw']->applications->name2id('infolog'); + $GLOBALS['portal_order'][] = $app_id; + + $infolog =& CreateObject('infolog.uiinfolog'); + $infolog->called_by = 'home'; + + if (in_array($showevents,array('1','2'))) $showevents = 'own-open-today'; + $html = $infolog->index(array('nm' => array('filter' => $showevents)),'','',0,False,True); + $title = lang('InfoLog').' - '.lang($infolog->filters[$showevents]); + unset($infolog); + + $portalbox =& CreateObject('phpgwapi.listbox',array( + 'title' => $title, + 'primary' => $GLOBALS['egw_info']['theme']['navbar_bg'], + 'secondary' => $GLOBALS['egw_info']['theme']['navbar_bg'], + 'tertiary' => $GLOBALS['egw_info']['theme']['navbar_bg'], + 'width' => '100%', + 'outerborderwidth' => '0', + 'header_background_image' => $GLOBALS['egw']->common->image('phpgwapi/templates/default','bg_filler') + )); + foreach(array('up','down','close','question','edit') as $key) { - $save_app = $GLOBALS['egw_info']['flags']['currentapp']; - $GLOBALS['egw_info']['flags']['currentapp'] = 'infolog'; + $portalbox->set_controls($key,Array('url' => '/set_box.php', 'app' => $app_id)); + } + $portalbox->data = $data; - $GLOBALS['egw']->translation->add_app('infolog'); - - $app_id = $GLOBALS['egw']->applications->name2id('infolog'); - $GLOBALS['portal_order'][] = $app_id; - - $infolog =& CreateObject('infolog.uiinfolog'); - $infolog->called_by = 'home'; - - if (in_array($showevents,array('1','2'))) $showevents = 'own-open-today'; - $html = $infolog->index(array('nm' => array('filter' => $showevents)),'','',0,False,True); - $title = lang('InfoLog').' - '.lang($infolog->filters[$showevents]); - unset($infolog); - - $portalbox =& CreateObject('phpgwapi.listbox',array( - 'title' => $title, - 'primary' => $GLOBALS['egw_info']['theme']['navbar_bg'], - 'secondary' => $GLOBALS['egw_info']['theme']['navbar_bg'], - 'tertiary' => $GLOBALS['egw_info']['theme']['navbar_bg'], - 'width' => '100%', - 'outerborderwidth' => '0', - 'header_background_image' => $GLOBALS['egw']->common->image('phpgwapi/templates/default','bg_filler') - )); - foreach(array('up','down','close','question','edit') as $key) - { - $portalbox->set_controls($key,Array('url' => '/set_box.php', 'app' => $app_id)); - } - $portalbox->data = $data; - - if (!file_exists(EGW_SERVER_ROOT.($et_css_file ='/etemplate/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/app.css'))) - { - $et_css_file = '/etemplate/templates/default/app.css'; - } - if (!file_exists(EGW_SERVER_ROOT.($css_file ='/infolog/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/app.css'))) - { - $css_file = '/infolog/templates/default/app.css'; - } - echo ' + if (!file_exists(EGW_SERVER_ROOT.($et_css_file ='/etemplate/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/app.css'))) + { + $et_css_file = '/etemplate/templates/default/app.css'; + } + if (!file_exists(EGW_SERVER_ROOT.($css_file ='/infolog/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/app.css'))) + { + $css_file = '/infolog/templates/default/app.css'; + } + echo ' -'. $portalbox->draw($html)."\n\n"; +'. $portalbox->draw($html)."\n\n"; - unset($css_file); unset($et_css_file); - unset($portalbox); - unset($html); - $GLOBALS['egw_info']['flags']['currentapp'] = $save_app; - } - unset($showevents); -?> + unset($css_file); unset($et_css_file); + unset($portalbox); + unset($html); + $GLOBALS['egw_info']['flags']['currentapp'] = $save_app; +} +unset($showevents); diff --git a/infolog/inc/hook_settings.inc.php b/infolog/inc/hook_settings.inc.php index 83217ac469..2a051c7cee 100644 --- a/infolog/inc/hook_settings.inc.php +++ b/infolog/inc/hook_settings.inc.php @@ -1,16 +1,13 @@ * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License, or (at your * - * option) any later version. * - \**************************************************************************/ - - /* $Id$ */ +/** + * InfoLog - Preferences + * + * @link http://www.egroupware.org + * @author Ralf Becker + * @package infolog + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ /* Setup some values to fill the array of this app's settings below */ $ui =& CreateObject('infolog.uiinfolog'); // need some labels from diff --git a/infolog/setup/setup.inc.php b/infolog/setup/setup.inc.php index d0c276aa8b..06e8472fa1 100755 --- a/infolog/setup/setup.inc.php +++ b/infolog/setup/setup.inc.php @@ -1,78 +1,73 @@ 'Ralf Becker', - 'email' => 'ralfbecker@outdoor-training.de' - ); - $setup_info['infolog']['license'] = 'GPL'; - $setup_info['infolog']['description'] = - '

CRM (customer-relation-management) type app using Addressbook providing - Todo List, Notes and Phonelog. InfoLog is orininaly based on eGroupWare\'s - old ToDo-List and has the features of all 3 mentioned applications plus fully working ACL - (including Add+Private attributes, add for to addreplys/subtasks).

-

Responsibility for a task (ToDo) or a phonecall can be delegated to an other - user. All entries can be linked to addressbook entries, projects and/or calendar events. - This allows you to log all activity of a contact/address or project. - The entries may be viewed or added from InfoLog direct or from within - the contact/address, project or calendar view.

-

Other documents / files can be linked to InfoLog entries and are store in the VFS - (eGroupWare\'s virtual file system). An extension of the VFS allows to symlink - the files to a fileserver, instead of placeing a copy in the VFS - (need to be configured in the admin-section). - It is planed to include emails and faxes into InfoLog in the future.

'; - $setup_info['infolog']['note'] = - '

There is a CSV import filter (in the admin-section) to import existing data. - It allows to interactivly assign fields, customize the values with regular - expressions and direct calls to php-functions (e.g. to link the phone calls - (again) to the addressbook entrys).

-

More information about InfoLog and the current development-status can be found on the - InfoLog page on our Website.

'; - - /* The hooks this app includes, needed for hooks registration */ - $setup_info['infolog']['hooks']['preferences'] = 'infolog.admin_prefs_sidebox_hooks.all_hooks'; - $setup_info['infolog']['hooks'][] = 'settings'; - $setup_info['infolog']['hooks']['admin'] = 'infolog.admin_prefs_sidebox_hooks.all_hooks'; - $setup_info['infolog']['hooks'][] = 'deleteaccount'; - $setup_info['infolog']['hooks'][] = 'home'; - $setup_info['infolog']['hooks']['addressbook_view'] = 'infolog.uiinfolog.hook_view'; - $setup_info['infolog']['hooks']['projects_view'] = 'infolog.uiinfolog.hook_view'; - $setup_info['infolog']['hooks']['calendar_view'] = 'infolog.uiinfolog.hook_view'; - $setup_info['infolog']['hooks']['infolog'] = 'infolog.uiinfolog.hook_view'; - $setup_info['infolog']['hooks']['calendar_include_events'] = 'infolog.boinfolog.cal_to_include'; - $setup_info['infolog']['hooks']['calendar_include_todos'] = 'infolog.boinfolog.cal_to_include'; - $setup_info['infolog']['hooks']['sidebox_menu'] = 'infolog.admin_prefs_sidebox_hooks.all_hooks'; - $setup_info['infolog']['hooks']['search_link'] = 'infolog.infolog_link_registry.search_link'; - $setup_info['infolog']['hooks']['pm_custom_app_icons'] = 'infolog.boinfolog.pm_icons'; - - /* Dependencies for this app to work */ - $setup_info['infolog']['depends'][] = array( - 'appname' => 'phpgwapi', - 'versions' => Array('1.3','1.4','1.5') - ); - $setup_info['infolog']['depends'][] = array( - 'appname' => 'etemplate', - 'versions' => Array('1.3','1.4','1.5') - ); - +/** + * InfoLog - Setup + * + * @link http://www.egroupware.org + * @author Ralf Becker + * @package infolog + * @subpackage setup + * @copyright (c) 2003-6 by Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ +$setup_info['infolog']['name'] = 'infolog'; +$setup_info['infolog']['version'] = '1.4'; +$setup_info['infolog']['app_order'] = 5; +$setup_info['infolog']['tables'] = array('egw_infolog','egw_infolog_extra'); +$setup_info['infolog']['enable'] = 1; +$setup_info['infolog']['author'] = +$setup_info['infolog']['maintainer'] = array( + 'name' => 'Ralf Becker', + 'email' => 'ralfbecker@outdoor-training.de' +); +$setup_info['infolog']['license'] = 'GPL'; +$setup_info['infolog']['description'] = + '

CRM (customer-relation-management) type app using Addressbook providing + Todo List, Notes and Phonelog. InfoLog is orininaly based on eGroupWare\'s + old ToDo-List and has the features of all 3 mentioned applications plus fully working ACL + (including Add+Private attributes, add for to addreplys/subtasks).

+

Responsibility for a task (ToDo) or a phonecall can be delegated to an other + user. All entries can be linked to addressbook entries, projects and/or calendar events. + This allows you to log all activity of a contact/address or project. + The entries may be viewed or added from InfoLog direct or from within + the contact/address, project or calendar view.

+

Other documents / files can be linked to InfoLog entries and are store in the VFS + (eGroupWare\'s virtual file system). An extension of the VFS allows to symlink + the files to a fileserver, instead of placeing a copy in the VFS + (need to be configured in the admin-section). + It is planed to include emails and faxes into InfoLog in the future.

'; +$setup_info['infolog']['note'] = + '

There is a CSV import filter (in the admin-section) to import existing data. + It allows to interactivly assign fields, customize the values with regular + expressions and direct calls to php-functions (e.g. to link the phone calls + (again) to the addressbook entrys).

+

More information about InfoLog and the current development-status can be found on the + InfoLog page on our Website.

'; +/* The hooks this app includes, needed for hooks registration */ +$setup_info['infolog']['hooks']['preferences'] = 'infolog.admin_prefs_sidebox_hooks.all_hooks'; +$setup_info['infolog']['hooks'][] = 'settings'; +$setup_info['infolog']['hooks']['admin'] = 'infolog.admin_prefs_sidebox_hooks.all_hooks'; +$setup_info['infolog']['hooks'][] = 'deleteaccount'; +$setup_info['infolog']['hooks'][] = 'home'; +$setup_info['infolog']['hooks']['addressbook_view'] = 'infolog.uiinfolog.hook_view'; +$setup_info['infolog']['hooks']['projects_view'] = 'infolog.uiinfolog.hook_view'; +$setup_info['infolog']['hooks']['calendar_view'] = 'infolog.uiinfolog.hook_view'; +$setup_info['infolog']['hooks']['infolog'] = 'infolog.uiinfolog.hook_view'; +$setup_info['infolog']['hooks']['calendar_include_events'] = 'infolog.boinfolog.cal_to_include'; +$setup_info['infolog']['hooks']['calendar_include_todos'] = 'infolog.boinfolog.cal_to_include'; +$setup_info['infolog']['hooks']['sidebox_menu'] = 'infolog.admin_prefs_sidebox_hooks.all_hooks'; +$setup_info['infolog']['hooks']['search_link'] = 'infolog.infolog_link_registry.search_link'; +$setup_info['infolog']['hooks']['pm_custom_app_icons'] = 'infolog.boinfolog.pm_icons'; +/* Dependencies for this app to work */ +$setup_info['infolog']['depends'][] = array( + 'appname' => 'phpgwapi', + 'versions' => Array('1.3','1.4','1.5') +); +$setup_info['infolog']['depends'][] = array( + 'appname' => 'etemplate', + 'versions' => Array('1.3','1.4','1.5') +); diff --git a/infolog/setup/tables_current.inc.php b/infolog/setup/tables_current.inc.php index 9dfd1f4bbd..99225ff8ef 100644 --- a/infolog/setup/tables_current.inc.php +++ b/infolog/setup/tables_current.inc.php @@ -1,15 +1,15 @@ + * @package infolog + * @subpackage setup + * @copyright (c) 2003-6 by Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ $phpgw_baseline = array( 'egw_infolog' => array( diff --git a/infolog/setup/tables_update.inc.php b/infolog/setup/tables_update.inc.php index fe63301ead..f6c7563346 100644 --- a/infolog/setup/tables_update.inc.php +++ b/infolog/setup/tables_update.inc.php @@ -1,15 +1,15 @@ + * @package infolog + * @subpackage setup + * @copyright (c) 2003-6 by Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ $test[] = '0.9.11'; function infolog_upgrade0_9_11() diff --git a/phpgwapi/inc/class.jscalendar.inc.php b/phpgwapi/inc/class.jscalendar.inc.php index 1f4ab99a35..0192826f1b 100644 --- a/phpgwapi/inc/class.jscalendar.inc.php +++ b/phpgwapi/inc/class.jscalendar.inc.php @@ -88,8 +88,8 @@ class jscalendar static $chars_shortcut; if (is_null($chars_shortcut)) $chars_shortcut = (int)lang('3 number of chars for month-shortcut'); // < 0 to take the chars from the end - $short = lang(adodb_date('M',$ts)); // check if we have a translation of the short-cut - if ($substr($short,-1) == '*') // if not generate one by truncating the translation of the long name + $short = lang($m = adodb_date('M',$ts)); // check if we have a translation of the short-cut + if ($short == $m || $substr($short,-1) == '*') // if not generate one by truncating the translation of the long name { $short = $chars_shortcut > 0 ? $substr(lang(adodb_date('F',$ts)),0,$chars_shortcut) : $substr(lang(adodb_date('F',$ts)),$chars_shortcut); diff --git a/phpgwapi/inc/class.sessions.inc.php b/phpgwapi/inc/class.sessions.inc.php index 3d792dba5a..6dd5f02cec 100644 --- a/phpgwapi/inc/class.sessions.inc.php +++ b/phpgwapi/inc/class.sessions.inc.php @@ -1255,17 +1255,24 @@ $url = str_replace ( 'http:', 'https:', $url); } } + $vars = array(); + // add session params if not using cookies + if (!$GLOBALS['egw_info']['server']['usecookies']) + { + $vars['sessionid'] = $this->sessionid; + $vars['kp3'] = $this->kp3; + $vars['domain'] = $this->account_domain; + } // check if the url already contains a query and ensure that vars is an array and all strings are in extravars list($url,$othervars) = explode('?',$url); if ($extravars && is_array($extravars)) { - $vars = $extravars; + $vars += $extravars; $extravars = $othervars; } else { - $vars = array(); if ($othervars) $extravars .= '&'.$othervars; } @@ -1286,14 +1293,6 @@ } } - // add session params if not using cookies - if (!$GLOBALS['egw_info']['server']['usecookies']) - { - $vars['sessionid'] = $this->sessionid; - $vars['kp3'] = $this->kp3; - $vars['domain'] = $this->account_domain; - } - // if there are vars, we add them urlencoded to the url if (count($vars)) { diff --git a/phpgwapi/inc/class.sessions_php4.inc.php b/phpgwapi/inc/class.sessions_php4.inc.php index 4fa7597083..fc0529ee43 100644 --- a/phpgwapi/inc/class.sessions_php4.inc.php +++ b/phpgwapi/inc/class.sessions_php4.inc.php @@ -68,13 +68,12 @@ /** * Create a new session id, called by session::create() * - * Reimplemented to tell the php-sessions to use the id + * Reimplemented to use php session-id * * @return string a new session id */ function new_session_id() { - session_id(parent::new_session_id()); session_start(); return session_id(); diff --git a/phpgwapi/inc/jscalendar-setup.php b/phpgwapi/inc/jscalendar-setup.php index e6a71b00c5..2ff2dd484b 100644 --- a/phpgwapi/inc/jscalendar-setup.php +++ b/phpgwapi/inc/jscalendar-setup.php @@ -281,8 +281,8 @@ $monthnames = array('January','February','March','April','May','June','July','Au $chars_shortcut = (int)lang('3 number of chars for month-shortcut'); // < 0 to take the chars from the end foreach($monthnames as $n => $name) { - $short = lang(substr($name,0,3)); // test if our lang-file have a translation for the english short with 3 chars - if ($substr($short,-1) == '*') // else create one by truncating the full translation to x chars + $short = lang($m = substr($name,0,3)); // test if our lang-file have a translation for the english short with 3 chars + if ($short == $m || $substr($short,-1) == '*') // else create one by truncating the full translation to x chars { $short = $chars_shortcut > 0 ? $substr(lang($name),0,$chars_shortcut) : $substr(lang($name),$chars_shortcut); } diff --git a/preferences/inc/hook_settings.inc.php b/preferences/inc/hook_settings.inc.php index 3b438826cc..a245e4ff3f 100755 --- a/preferences/inc/hook_settings.inc.php +++ b/preferences/inc/hook_settings.inc.php @@ -40,10 +40,10 @@ { $format .= 'H:i'; } - for($i = -23; $i<24; $i++) + for($i = -23.5; $i < 24.0; $i += 0.5) { - $t = time() + $i * 60*60; - $tz_offset[$i] = $i . ' ' . lang('hours').': ' . date($format,$t); + $t = time() + round($i * 3600); + $tz_offset[(string)$i] = sprintf('%3.1lf',$i) . ' ' . lang('hours').': ' . date($format,$t); } $date_formats = array( diff --git a/setup/check_install.php b/setup/check_install.php index 2288361818..ca0b422cae 100644 --- a/setup/check_install.php +++ b/setup/check_install.php @@ -372,7 +372,7 @@ if (!isset($args['warning'])) { $args['warning'] = lang('The %1 extension is needed from: %2.',$name, - is_array($args['from'] ? implode(', ',$args['from']) : $args['from'])); + is_array($args['from']) ? implode(', ',$args['from']) : $args['from']); } echo "
".$args['warning'].'
'; }