@@ -22,11 +22,11 @@ discard block |
||
| 22 | 22 | "<a href=\"$webserverURL/redirect.php?go=".htmlentities(urlencode('http://www.egroupware.org')).'">' |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | - if(!function_exists('html_entity_decode')) |
|
| 25 | + if (!function_exists('html_entity_decode')) |
|
| 26 | 26 | { |
| 27 | 27 | function html_entity_decode($given_html, $quote_style = ENT_QUOTES) |
| 28 | 28 | { |
| 29 | - $trans_table = array_flip(get_html_translation_table( HTML_SPECIALCHARS, $quote_style)); |
|
| 29 | + $trans_table = array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style)); |
|
| 30 | 30 | $trans_table['''] = "'"; |
| 31 | 31 | return(strtr($given_html, $trans_table)); |
| 32 | 32 | } |
@@ -45,17 +45,17 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | /* Only allow redirects from inside this eGroupware installation. */ |
| 47 | 47 | $valid_referer = array(); |
| 48 | - $path = preg_replace('/\/[^\/]*$/','',$_SERVER['PHP_SELF']) . '/'; |
|
| 48 | + $path = preg_replace('/\/[^\/]*$/', '', $_SERVER['PHP_SELF']).'/'; |
|
| 49 | 49 | array_push($valid_referer, $path); |
| 50 | - array_push($valid_referer, ($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['SERVER_ADDR'] . $path); |
|
| 51 | - array_push($valid_referer, ($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . $path); |
|
| 50 | + array_push($valid_referer, ($_SERVER['HTTPS'] ? 'https://' : 'http://').$_SERVER['SERVER_ADDR'].$path); |
|
| 51 | + array_push($valid_referer, ($_SERVER['HTTPS'] ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].$path); |
|
| 52 | 52 | |
| 53 | 53 | $referrer = trim($_SERVER['HTTP_REFERER']); |
| 54 | 54 | if ((!isset($_SERVER['HTTP_REFERER'])) || (empty($referrer))) |
| 55 | 55 | { |
| 56 | 56 | echo "Only usable from within eGroupware.\n"; |
| 57 | 57 | } |
| 58 | - else if($_GET['go']) |
|
| 58 | + else if ($_GET['go']) |
|
| 59 | 59 | { |
| 60 | 60 | $allow = false; |
| 61 | 61 | foreach ($valid_referer as $urlRoot) |
@@ -69,15 +69,15 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | if ($allow) |
| 71 | 71 | { |
| 72 | - $url= html_entity_decode(urldecode($_GET['go'])); |
|
| 72 | + $url = html_entity_decode(urldecode($_GET['go'])); |
|
| 73 | 73 | unset($_GET['go']); |
| 74 | 74 | /* Only add "&" if there is something to append. */ |
| 75 | 75 | if (!empty($_GET)) |
| 76 | 76 | { |
| 77 | - $url=$url."&".http_build_query($_GET); |
|
| 77 | + $url = $url."&".http_build_query($_GET); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - Header('Location: ' . html_entity_decode(urldecode($url))); |
|
| 80 | + Header('Location: '.html_entity_decode(urldecode($url))); |
|
| 81 | 81 | exit; |
| 82 | 82 | } |
| 83 | 83 | else |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | 'name' => 'Ralf Becker', |
| 21 | 21 | 'email' => '[email protected]' |
| 22 | 22 | ); |
| 23 | -$setup_info['filemanager']['license'] = 'GPL'; |
|
| 23 | +$setup_info['filemanager']['license'] = 'GPL'; |
|
| 24 | 24 | |
| 25 | 25 | /* The hooks this app includes, needed for hooks registration */ |
| 26 | 26 | $setup_info['filemanager']['hooks']['settings'] = 'filemanager_hooks::settings'; |
@@ -27,12 +27,12 @@ |
||
| 27 | 27 | $this->description = lang('This module displays the current month'); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - function get_content(&$arguments,$properties) |
|
| 30 | + function get_content(&$arguments, $properties) |
|
| 31 | 31 | { |
| 32 | - $date = (int) (strtotime(get_var('date',array('POST','GET')))); |
|
| 32 | + $date = (int)(strtotime(get_var('date', array('POST', 'GET')))); |
|
| 33 | 33 | $redirect = $arguments['redirect'] ? $arguments['redirect'] : '#'; |
| 34 | 34 | |
| 35 | 35 | return $GLOBALS['egw']->jscalendar->get_javascript(). |
| 36 | - $GLOBALS['egw']->jscalendar->flat($redirect,$date); |
|
| 36 | + $GLOBALS['egw']->jscalendar->flat($redirect, $date); |
|
| 37 | 37 | } |
| 38 | 38 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | $setup_info['calendar']['enable'] = 1; |
| 16 | 16 | $setup_info['calendar']['index'] = 'calendar.calendar_uiviews.index&ajax=true'; |
| 17 | 17 | |
| 18 | -$setup_info['calendar']['license'] = 'GPL'; |
|
| 18 | +$setup_info['calendar']['license'] = 'GPL'; |
|
| 19 | 19 | $setup_info['calendar']['description'] = |
| 20 | 20 | 'Powerful group calendar with meeting request system and ACL security.'; |
| 21 | 21 | $setup_info['calendar']['note'] = |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | 'Arab Standard Time' => 'Asia/Riyadh', |
| 25 | 25 | 'Arabian Standard Time' => 'Asia/Dubai', |
| 26 | 26 | 'Arabic Standard Time' => 'Asia/Baghdad', |
| 27 | - 'Argentina Standard Time' => 'America/Argentina/Buenos_Aires', // was 'America/Buenos_Aires', |
|
| 27 | + 'Argentina Standard Time' => 'America/Argentina/Buenos_Aires', // was 'America/Buenos_Aires', |
|
| 28 | 28 | 'Atlantic Standard Time' => 'America/Halifax', |
| 29 | 29 | 'Azerbaijan Standard Time' => 'Asia/Baku', |
| 30 | 30 | 'Azores Standard Time' => 'Atlantic/Azores', |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | 'Greenland Standard Time' => 'America/Godthab', |
| 60 | 60 | 'Greenwich Standard Time' => 'Atlantic/Reykjavik', |
| 61 | 61 | 'Hawaiian Standard Time' => 'Pacific/Honolulu', |
| 62 | - 'India Standard Time' => 'Asia/Kolkata', // Asia/Calcutta is an alias to Asia/Kolkata |
|
| 62 | + 'India Standard Time' => 'Asia/Kolkata', // Asia/Calcutta is an alias to Asia/Kolkata |
|
| 63 | 63 | 'Iran Standard Time' => 'Asia/Tehran', |
| 64 | 64 | 'Israel Standard Time' => 'Asia/Jerusalem', |
| 65 | 65 | 'Jordan Standard Time' => 'Asia/Amman', |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | 'Eniwetok, Kwajalein, Dateline Time' => 'Pacific/Kwajalein', |
| 199 | 199 | |
| 200 | 200 | // various aliases collected over time |
| 201 | - 'America/Creston' => 'America/Dawson_Creek', // not in sqlight DB of Thunderbird version 1.2011n, Dawson Creek is also UTC-7 without DS |
|
| 201 | + 'America/Creston' => 'America/Dawson_Creek', // not in sqlight DB of Thunderbird version 1.2011n, Dawson Creek is also UTC-7 without DS |
|
| 202 | 202 | 'Armenian Standard Time' => 'Asia/Yerevan', |
| 203 | 203 | 'Asia/Katmandu' => 'Asia/Kathmandu', |
| 204 | 204 | 'Asia/Calcutta' => 'Asia/Kolkata', |
@@ -10,17 +10,17 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | // enable auto-loading of holidays from localhost by default |
| 13 | -foreach(array( |
|
| 13 | +foreach (array( |
|
| 14 | 14 | 'auto_load_holidays' => 'True', |
| 15 | 15 | 'holidays_url_path' => 'localhost', |
| 16 | 16 | ) as $name => $value) |
| 17 | 17 | { |
| 18 | - $oProc->insert($GLOBALS['egw_setup']->config_table,array( |
|
| 18 | + $oProc->insert($GLOBALS['egw_setup']->config_table, array( |
|
| 19 | 19 | 'config_value' => $value, |
| 20 | - ),array( |
|
| 20 | + ), array( |
|
| 21 | 21 | 'config_app' => 'phpgwapi', |
| 22 | 22 | 'config_name' => $name, |
| 23 | - ),__FILE__,__LINE__); |
|
| 23 | + ), __FILE__, __LINE__); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | // import timezone data |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | // List each custom field |
| 34 | 34 | unset($this->mapping_fields['customfields']); |
| 35 | 35 | $custom = Api\Storage\Customfields::get('calendar'); |
| 36 | - foreach($custom as $name => $data) { |
|
| 36 | + foreach ($custom as $name => $data) { |
|
| 37 | 37 | $this->mapping_fields['#'.$name] = $data['label']; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | function wizard_step50(&$content, &$sel_options, &$readonlys, &$preserv) |
| 54 | 54 | { |
| 55 | 55 | $result = parent::wizard_step50($content, $sel_options, $readonlys, $preserv); |
| 56 | - $content['msg'] .= "\n*" ; |
|
| 56 | + $content['msg'] .= "\n*"; |
|
| 57 | 57 | |
| 58 | 58 | return $result; |
| 59 | 59 | } |
@@ -15,19 +15,19 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * import ical for calendar |
| 17 | 17 | */ |
| 18 | -class calendar_import_ical implements importexport_iface_import_plugin { |
|
| 18 | +class calendar_import_ical implements importexport_iface_import_plugin { |
|
| 19 | 19 | |
| 20 | 20 | private static $plugin_options = array( |
| 21 | - 'fieldsep', // char |
|
| 22 | - 'charset', // string |
|
| 23 | - 'owner', // int |
|
| 24 | - 'update_cats', // string {override|add} overides record |
|
| 21 | + 'fieldsep', // char |
|
| 22 | + 'charset', // string |
|
| 23 | + 'owner', // int |
|
| 24 | + 'update_cats', // string {override|add} overides record |
|
| 25 | 25 | // with cat(s) from csv OR add the cat from |
| 26 | 26 | // csv file to exeisting cat(s) of record |
| 27 | 27 | 'num_header_lines', // int number of header lines |
| 28 | 28 | 'field_conversion', // array( $csv_col_num => conversion) |
| 29 | - 'field_mapping', // array( $csv_col_num => adb_filed) |
|
| 30 | - 'conditions', /* => array containing condition arrays: |
|
| 29 | + 'field_mapping', // array( $csv_col_num => adb_filed) |
|
| 30 | + 'conditions', /* => array containing condition arrays: |
|
| 31 | 31 | 'type' => exists, // exists |
| 32 | 32 | 'string' => '#kundennummer', |
| 33 | 33 | 'true' => array( |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * @param string $_charset |
| 105 | 105 | * @param definition $_definition |
| 106 | 106 | */ |
| 107 | - public function import( $_stream, importexport_definition $_definition ) { |
|
| 107 | + public function import($_stream, importexport_definition $_definition) { |
|
| 108 | 108 | |
| 109 | 109 | $this->definition = $_definition; |
| 110 | 110 | |
@@ -112,20 +112,20 @@ discard block |
||
| 112 | 112 | $this->user = $GLOBALS['egw_info']['user']['account_id']; |
| 113 | 113 | |
| 114 | 114 | // dry run? |
| 115 | - $this->dry_run = isset( $_definition->plugin_options['dry_run'] ) ? $_definition->plugin_options['dry_run'] : false; |
|
| 115 | + $this->dry_run = isset($_definition->plugin_options['dry_run']) ? $_definition->plugin_options['dry_run'] : false; |
|
| 116 | 116 | |
| 117 | 117 | // fetch the addressbook bo |
| 118 | - $this->bo= new calendar_boupdate(); |
|
| 118 | + $this->bo = new calendar_boupdate(); |
|
| 119 | 119 | |
| 120 | 120 | |
| 121 | 121 | // Failures |
| 122 | 122 | $this->errors = array(); |
| 123 | 123 | |
| 124 | - @set_time_limit(0); // try switching execution time limit off |
|
| 124 | + @set_time_limit(0); // try switching execution time limit off |
|
| 125 | 125 | |
| 126 | 126 | $calendar_ical = new calendar_ical; |
| 127 | 127 | $calendar_ical->setSupportedFields('file', ''); |
| 128 | - if($this->dry_run) |
|
| 128 | + if ($this->dry_run) |
|
| 129 | 129 | { |
| 130 | 130 | // No real dry run for iCal |
| 131 | 131 | echo lang("No preview for iCal"); |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | { |
| 137 | 137 | $_definition->plugin_options['no_notification'] = true; |
| 138 | 138 | } |
| 139 | - if (!$calendar_ical->importVCal($_stream, -1,null,false,0,'',null,null,null,$_definition->plugin_options['no_notification'])) |
|
| 139 | + if (!$calendar_ical->importVCal($_stream, -1, null, false, 0, '', null, null, null, $_definition->plugin_options['no_notification'])) |
|
| 140 | 140 | { |
| 141 | 141 | $this->errors[] = lang('Error: importing the iCal'); |
| 142 | 142 | } |
@@ -114,18 +114,18 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public function __construct() |
| 116 | 116 | { |
| 117 | - parent::__construct('calendar'); // adds custom fields |
|
| 117 | + parent::__construct('calendar'); // adds custom fields |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
| 121 | 121 | * Tracks the changes in one entry $data, by comparing it with the last version in $old |
| 122 | 122 | * Overrides parent to reformat participants into a format parent can handle |
| 123 | 123 | */ |
| 124 | - public function track(array $data,array $old=null,$user=null,$deleted=null,array $changed_fields=null) |
|
| 124 | + public function track(array $data, array $old = null, $user = null, $deleted = null, array $changed_fields = null) |
|
| 125 | 125 | { |
| 126 | 126 | // Don't try to track dates on recurring events. |
| 127 | 127 | // It won't change for the base event, and any change to the time creates an exception |
| 128 | - if($data['recur_type']) |
|
| 128 | + if ($data['recur_type']) |
|
| 129 | 129 | { |
| 130 | 130 | unset($data['start']); unset($data['end']); |
| 131 | 131 | unset($old['start']); unset($old['end']); |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | * If this is one of a recurring event, append the recur_date to the participant field so we can |
| 137 | 137 | * filter by it later. |
| 138 | 138 | */ |
| 139 | - if(is_array($data['participants'])) |
|
| 139 | + if (is_array($data['participants'])) |
|
| 140 | 140 | { |
| 141 | 141 | $participants = $data['participants']; |
| 142 | 142 | $data['participants'] = array(); |
@@ -144,25 +144,25 @@ discard block |
||
| 144 | 144 | } |
| 145 | 145 | // if clients eg. CalDAV do NOT set participants, they are left untouched |
| 146 | 146 | // therefore we should not track them, as all updates then show up as all participants removed |
| 147 | - elseif(!isset($data['participants'])) |
|
| 147 | + elseif (!isset($data['participants'])) |
|
| 148 | 148 | { |
| 149 | 149 | unset($old['participants']); |
| 150 | 150 | } |
| 151 | - if(is_array($old['participants'])) |
|
| 151 | + if (is_array($old['participants'])) |
|
| 152 | 152 | { |
| 153 | 153 | $participants = $old['participants']; |
| 154 | 154 | $old['participants'] = array(); |
| 155 | 155 | $old = array_merge($old, $this->alter_participants($participants)); |
| 156 | 156 | } |
| 157 | - parent::track($data,$old,$user,$deleted, $changed_fields); |
|
| 157 | + parent::track($data, $old, $user, $deleted, $changed_fields); |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | /** |
| 161 | 161 | * Overrides parent because calendar_boupdates handles the notifications |
| 162 | 162 | */ |
| 163 | - public function do_notifications($data,$old,$deleted=null) |
|
| 163 | + public function do_notifications($data, $old, $deleted = null) |
|
| 164 | 164 | { |
| 165 | - unset($data, $old, $deleted); // unused, but required by function signature |
|
| 165 | + unset($data, $old, $deleted); // unused, but required by function signature |
|
| 166 | 166 | return true; |
| 167 | 167 | } |
| 168 | 168 | |
@@ -177,21 +177,21 @@ discard block |
||
| 177 | 177 | * @param array $old = null |
| 178 | 178 | * @return array of keys with different values in $data and $old |
| 179 | 179 | */ |
| 180 | - public function changed_fields(array $data,array $old=null) |
|
| 180 | + public function changed_fields(array $data, array $old = null) |
|
| 181 | 181 | { |
| 182 | - if(is_array($data['participants'])) |
|
| 182 | + if (is_array($data['participants'])) |
|
| 183 | 183 | { |
| 184 | 184 | $participants = $data['participants']; |
| 185 | 185 | $data['participants'] = array(); |
| 186 | 186 | $data = array_merge($data, $this->alter_participants($participants)); |
| 187 | 187 | } |
| 188 | - if(is_array($old['participants'])) |
|
| 188 | + if (is_array($old['participants'])) |
|
| 189 | 189 | { |
| 190 | 190 | $participants = $old['participants']; |
| 191 | 191 | $old['participants'] = array(); |
| 192 | 192 | $old = array_merge($old, $this->alter_participants($participants)); |
| 193 | 193 | } |
| 194 | - return parent::changed_fields($data,$old); |
|
| 194 | + return parent::changed_fields($data, $old); |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | /** |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | protected function alter_participants($participants) |
| 203 | 203 | { |
| 204 | 204 | $data = array(); |
| 205 | - foreach($participants as $uid => $status) |
|
| 205 | + foreach ($participants as $uid => $status) |
|
| 206 | 206 | { |
| 207 | 207 | $quantity = $role = $user_type = $user_id = null; |
| 208 | 208 | calendar_so::split_status($status, $quantity, $role); |