@@ -1420,7 +1420,7 @@ |
||
1420 | 1420 | if (Vfs::file_exists($target) && $app_dir) |
1421 | 1421 | { |
1422 | 1422 | if (!Vfs::file_exists($app_dir)) Vfs::mkdir($app_dir); |
1423 | - error_log("Symlinking $target to $app_dir"); |
|
1423 | + error_log("symlinking $target to $app_dir"); |
|
1424 | 1424 | Vfs::symlink($target, Vfs::concat($app_dir,Vfs::encodePathComponent($file['name']))); |
1425 | 1425 | } |
1426 | 1426 | } |
@@ -381,13 +381,13 @@ discard block |
||
381 | 381 | if (!($owner = $GLOBALS['egw']->accounts->name2id($owner_was=$owner,'account_lid',$type[0])) || |
382 | 382 | ($owner < 0) != ($cmd == 'chgrp')) |
383 | 383 | { |
384 | - die("Unknown $type '$owner_was'!"); |
|
384 | + die("unknown $type '$owner_was'!"); |
|
385 | 385 | } |
386 | 386 | } |
387 | 387 | elseif($owner && is_object($GLOBALS['egw']) && (!$GLOBALS['egw']->accounts->id2name($owner) || |
388 | 388 | ($owner < 0) != ($cmd == 'chgrp'))) |
389 | 389 | { |
390 | - die("Unknown $type '$owner_was'!"); |
|
390 | + die("unknown $type '$owner_was'!"); |
|
391 | 391 | } |
392 | 392 | } |
393 | 393 | $params = array($url,$owner); |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | { |
446 | 446 | if (!($f = fopen($url,'r'))) |
447 | 447 | { |
448 | - echo "File $url not found !!!\n\n"; |
|
448 | + echo "file $url not found !!!\n\n"; |
|
449 | 449 | } |
450 | 450 | else |
451 | 451 | { |
@@ -761,7 +761,7 @@ discard block |
||
761 | 761 | } |
762 | 762 | if (!($from_fp = fopen($from,'r'))) |
763 | 763 | { |
764 | - die("File $from not found!\n"); |
|
764 | + die("file $from not found!\n"); |
|
765 | 765 | } |
766 | 766 | if (!($to_fp = fopen($to,'w'))) |
767 | 767 | { |
@@ -280,7 +280,7 @@ |
||
280 | 280 | } |
281 | 281 | |
282 | 282 | // set the search parameters |
283 | - $search_params = Array |
|
283 | + $search_params = array |
|
284 | 284 | ( |
285 | 285 | 'offset' => $arguments['entryOffset'] ? (int) $arguments['entryOffset'] : false, |
286 | 286 | 'order' => 'cal_start ASC', |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | { |
33 | 33 | $GLOBALS['egw_setup']->oProc->query("SELECT account_id FROM $acctstbl WHERE account_lid='".$owner[$i]."'"); |
34 | 34 | $GLOBALS['egw_setup']->oProc->next_record(); |
35 | - $GLOBALS['egw_setup']->oProc->query("UPDATE $table SET $field=".$GLOBALS['egw_setup']->oProc->f('account_id')." WHERE $field='".$owner[$i]."'"); |
|
35 | + $GLOBALS['egw_setup']->oProc->query("update $table SET $field=".$GLOBALS['egw_setup']->oProc->f('account_id')." WHERE $field='".$owner[$i]."'"); |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | $GLOBALS['egw_setup']->oProc->AlterColumn($table, $field, array('type' => 'int', 'precision' => 4, 'nullable' => false, 'default' => 0)); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $db2 = clone($GLOBALS['egw_setup']->db); |
189 | 189 | |
190 | 190 | $GLOBALS['egw_setup']->oProc->CreateTable('calendar_entry', |
191 | - Array( |
|
191 | + array( |
|
192 | 192 | 'fd' => array( |
193 | 193 | 'cal_id' => array('type' => 'auto', 'nullable' => false), |
194 | 194 | 'cal_owner' => array('type' => 'int', 'precision' => 4, 'nullable' => false, 'default' => '0'), |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | $GLOBALS['egw_setup']->oProc->DropTable('webcal_entry'); |
239 | 239 | |
240 | 240 | $GLOBALS['egw_setup']->oProc->CreateTable('calendar_entry_user', |
241 | - Array( |
|
241 | + array( |
|
242 | 242 | 'fd' => array( |
243 | 243 | 'cal_id' => array('type' => 'int', 'precision' => 4, 'nullable' => false, 'default' => '0'), |
244 | 244 | 'cal_login' => array('type' => 'int', 'precision' => 4, 'nullable' => false, 'default' => '0'), |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | $GLOBALS['egw_setup']->oProc->DropTable('webcal_entry_user'); |
269 | 269 | |
270 | 270 | $GLOBALS['egw_setup']->oProc->CreateTable('calendar_entry_repeats', |
271 | - Array( |
|
271 | + array( |
|
272 | 272 | 'fd' => array( |
273 | 273 | 'cal_id' => array('type' => 'int', 'precision' => 4, 'default' => '0', 'nullable' => false), |
274 | 274 | 'cal_type' => array('type' => 'varchar', 'precision' => 20, 'default' => 'daily', 'nullable' => false), |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | } |
311 | 311 | |
312 | 312 | $GLOBALS['egw_setup']->oProc->DropTable('webcal_entry_repeats'); |
313 | - $GLOBALS['egw_setup']->oProc->query("UPDATE {$GLOBALS['egw_setup']->applications_table} SET app_tables='calendar_entry,calendar_entry_user,calendar_entry_repeats' WHERE app_name='calendar'",__LINE__,__FILE__); |
|
313 | + $GLOBALS['egw_setup']->oProc->query("update {$GLOBALS['egw_setup']->applications_table} SET app_tables='calendar_entry,calendar_entry_user,calendar_entry_repeats' WHERE app_name='calendar'",__LINE__,__FILE__); |
|
314 | 314 | |
315 | 315 | $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.7pre2'; |
316 | 316 | return $GLOBALS['setup_info']['calendar']['currentver']; |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | |
603 | 603 | // calendar_entry => phpgw_cal |
604 | 604 | $GLOBALS['egw_setup']->oProc->CreateTable('phpgw_cal', |
605 | - Array( |
|
605 | + array( |
|
606 | 606 | 'fd' => array( |
607 | 607 | 'cal_id' => array('type' => 'auto', 'nullable' => False), |
608 | 608 | 'owner' => array('type' => 'int', 'precision' => 8, 'nullable' => False), |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | |
659 | 659 | // calendar_entry_repeats => phpgw_cal_repeats |
660 | 660 | $GLOBALS['egw_setup']->oProc->CreateTable('phpgw_cal_repeats', |
661 | - Array( |
|
661 | + array( |
|
662 | 662 | 'fd' => array( |
663 | 663 | 'cal_id' => array('type' => 'int', 'precision' => 8,'nullable' => False), |
664 | 664 | 'recur_type' => array('type' => 'int', 'precision' => 8,'nullable' => False), |
@@ -731,7 +731,7 @@ discard block |
||
731 | 731 | function calendar_upgrade0_9_11_003() |
732 | 732 | { |
733 | 733 | $GLOBALS['egw_setup']->oProc->CreateTable('phpgw_cal_holidays', |
734 | - Array( |
|
734 | + array( |
|
735 | 735 | 'fd' => array( |
736 | 736 | 'locale' => array('type' => 'char', 'precision' => 2,'nullable' => False), |
737 | 737 | 'name' => array('type' => 'varchar', 'precision' => 50,'nullable' => False), |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | { |
768 | 768 | $GLOBALS['egw_setup']->oProc->DropTable('phpgw_cal_holidays'); |
769 | 769 | $GLOBALS['egw_setup']->oProc->CreateTable('phpgw_cal_holidays', |
770 | - Array( |
|
770 | + array( |
|
771 | 771 | 'fd' => array( |
772 | 772 | 'hol_id' => array('type' => 'auto','nullable' => False), |
773 | 773 | 'locale' => array('type' => 'char', 'precision' => 2,'nullable' => False), |
@@ -854,7 +854,7 @@ discard block |
||
854 | 854 | function calendar_upgrade0_9_13_003() |
855 | 855 | { |
856 | 856 | $GLOBALS['egw_setup']->oProc->CreateTable('phpgw_cal_alarm', |
857 | - Array( |
|
857 | + array( |
|
858 | 858 | 'fd' => array( |
859 | 859 | 'alarm_id' => array('type' => 'auto','nullable' => False), |
860 | 860 | 'cal_id' => array('type' => 'int', 'precision' => 8, 'nullable' => False), |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | |
889 | 889 | function calendar_upgrade0_9_13_005() |
890 | 890 | { |
891 | - $calendar_data = Array(); |
|
891 | + $calendar_data = array(); |
|
892 | 892 | $GLOBALS['egw_setup']->oProc->query('SELECT cal_id, category FROM phpgw_cal',__LINE__,__FILE__); |
893 | 893 | while($GLOBALS['egw_setup']->oProc->next_record()) |
894 | 894 | { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $this->role_map = array_flip($this->bo->roles); |
58 | 58 | |
59 | 59 | $this->lookups = array( |
60 | - 'priority' => Array( |
|
60 | + 'priority' => array( |
|
61 | 61 | 0 => lang('None'), |
62 | 62 | 1 => lang('Low'), |
63 | 63 | 2 => lang('Normal'), |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | * |
238 | 238 | * @return boolean |
239 | 239 | */ |
240 | - protected function exists(importexport_iface_egw_record &$record, Array &$condition, &$records = array()) |
|
240 | + protected function exists(importexport_iface_egw_record &$record, array &$condition, &$records = array()) |
|
241 | 241 | { |
242 | 242 | if($record->__get($condition['string']) && $condition['string'] == 'id') { |
243 | 243 | $event = $this->bo->read($record->__get($condition['string'])); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | * |
62 | 62 | * @var array |
63 | 63 | */ |
64 | - static public $types = Array( |
|
64 | + static public $types = array( |
|
65 | 65 | self::NONE => 'None', |
66 | 66 | self::DAILY => 'Daily', |
67 | 67 | self::WEEKLY => 'Weekly', |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | /** |
123 | 123 | * @var array recur_types translates MCAL recur-types to verbose labels |
124 | 124 | */ |
125 | - var $recur_types = Array( |
|
125 | + var $recur_types = array( |
|
126 | 126 | MCAL_RECUR_NONE => 'No recurrence', |
127 | 127 | MCAL_RECUR_DAILY => 'Daily', |
128 | 128 | MCAL_RECUR_WEEKLY => 'Weekly', |
@@ -1897,7 +1897,7 @@ discard block |
||
1897 | 1897 | * @param string $pattern pattern to search |
1898 | 1898 | * @return array with cal_id - title pairs of the matching entries |
1899 | 1899 | */ |
1900 | - function link_query($pattern, Array &$options = array()) |
|
1900 | + function link_query($pattern, array &$options = array()) |
|
1901 | 1901 | { |
1902 | 1902 | $result = array(); |
1903 | 1903 | $query = array( |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | */ |
367 | 367 | protected function get_selects() |
368 | 368 | { |
369 | - $this->selects['priority'] = Array( |
|
369 | + $this->selects['priority'] = array( |
|
370 | 370 | 0 => lang('None'), |
371 | 371 | 1 => lang('Low'), |
372 | 372 | 2 => lang('Normal'), |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | /** |
395 | 395 | * Adjust automatically generated field filters |
396 | 396 | */ |
397 | - public function get_filter_fields(Array &$filters) |
|
397 | + public function get_filter_fields(array &$filters) |
|
398 | 398 | { |
399 | 399 | |
400 | 400 | // Calendar SO doesn't support filtering by column, so we have to remove pretty much everything |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | " CASE WHEN recur_type IS NULL THEN egw_cal.range_start ELSE cal_start END AS cal_start,\n". |
253 | 253 | " CASE WHEN recur_type IS NULL THEN egw_cal.range_end ELSE cal_end END AS cal_end\n". |
254 | 254 | // using time-limited range view, instead of complete table, give a big performance plus |
255 | - "FROM $egw_cal\n". |
|
255 | + "from $egw_cal\n". |
|
256 | 256 | "JOIN egw_cal_user ON egw_cal_user.cal_id=egw_cal.cal_id\n". |
257 | 257 | // need to left join dates, as egw_cal_user.recur_date is null for non-recuring event |
258 | 258 | "LEFT JOIN egw_cal_dates ON egw_cal_user.cal_id=egw_cal_dates.cal_id AND egw_cal_dates.cal_start=egw_cal_user.cal_recur_date\n". |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | $where[] = 'cal_start >= '.(int)$recur_date; |
346 | 346 | $group_by = 'GROUP BY '.$cols; |
347 | 347 | $cols .= ',MIN(cal_start) AS cal_start,MIN(cal_end) AS cal_end'; |
348 | - $join = "JOIN $this->dates_table ON $this->cal_table.cal_id=$this->dates_table.cal_id $join"; |
|
348 | + $join = "join $this->dates_table ON $this->cal_table.cal_id=$this->dates_table.cal_id $join"; |
|
349 | 349 | } |
350 | 350 | else |
351 | 351 | { |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | $cal_table = $this->cal_range_view($start, $end, null, $filter == 'everything' ? null : $filter != 'deleted'); |
871 | 871 | $cal_table_def = $this->db->get_table_definitions('calendar', $this->cal_table); |
872 | 872 | |
873 | - $join = "JOIN $this->user_table ON $this->cal_table.cal_id=$this->user_table.cal_id ". |
|
873 | + $join = "join $this->user_table ON $this->cal_table.cal_id=$this->user_table.cal_id ". |
|
874 | 874 | "LEFT JOIN $this->repeats_table ON $this->cal_table.cal_id=$this->repeats_table.cal_id ". |
875 | 875 | $rejected_by_user_join; |
876 | 876 | // dates table join only needed to enum recuring events, we use a time-range limited view here too |
@@ -946,7 +946,7 @@ discard block |
||
946 | 946 | // we only select cal_table.cal_id (and not cal_table.*) to be able to use DISTINCT (eg. MsSQL does not allow it for text-columns) |
947 | 947 | foreach(array_keys($selects) as $key) |
948 | 948 | { |
949 | - $selects[$key]['cols'] = "DISTINCT $this->repeats_table.recur_type,range_end AS recur_enddate,$this->repeats_table.recur_interval,$this->repeats_table.recur_data,".$this->db->to_varchar($this->cal_table.'.cal_id').",cal_start,cal_end,$this->user_table.cal_recur_date"; |
|
949 | + $selects[$key]['cols'] = "distinct $this->repeats_table.recur_type,range_end AS recur_enddate,$this->repeats_table.recur_interval,$this->repeats_table.recur_data,".$this->db->to_varchar($this->cal_table.'.cal_id').",cal_start,cal_end,$this->user_table.cal_recur_date"; |
|
950 | 950 | if (!$params['enum_recuring']) |
951 | 951 | { |
952 | 952 | $selects[$key]['cols'] = str_replace(array('cal_start','cal_end'), |
@@ -1397,7 +1397,7 @@ discard block |
||
1397 | 1397 | { |
1398 | 1398 | $old_repeats = $this->db->select($this->repeats_table, "$this->repeats_table.*,range_end AS recur_enddate", |
1399 | 1399 | "$this->repeats_table.cal_id=".(int)$cal_id, __LINE__, __FILE__, |
1400 | - false, '', 'calendar', 0, "JOIN $this->cal_table ON $this->repeats_table.cal_id=$this->cal_table.cal_id")->fetch(); |
|
1400 | + false, '', 'calendar', 0, "join $this->cal_table ON $this->repeats_table.cal_id=$this->cal_table.cal_id")->fetch(); |
|
1401 | 1401 | } |
1402 | 1402 | $where = array('cal_id' => $cal_id); |
1403 | 1403 | // read only timezone id, to check if it is changed |
@@ -1762,13 +1762,13 @@ discard block |
||
1762 | 1762 | if ($move_start) |
1763 | 1763 | { |
1764 | 1764 | // move the recur-date of the participants |
1765 | - $this->db->query("UPDATE $this->user_table SET cal_recur_date=cal_recur_date+$move_start WHERE $where AND cal_recur_date ". |
|
1765 | + $this->db->query("update $this->user_table SET cal_recur_date=cal_recur_date+$move_start WHERE $where AND cal_recur_date ". |
|
1766 | 1766 | ((int)$change_since ? '>= '.(int)$change_since : '!= 0'),__LINE__,__FILE__); |
1767 | 1767 | } |
1768 | 1768 | if ($move_start || $move_end) |
1769 | 1769 | { |
1770 | 1770 | // move the event and it's recurrences |
1771 | - $this->db->query("UPDATE $this->dates_table SET cal_start=cal_start+$move_start,cal_end=cal_end+$move_end WHERE $where". |
|
1771 | + $this->db->query("update $this->dates_table SET cal_start=cal_start+$move_start,cal_end=cal_end+$move_end WHERE $where". |
|
1772 | 1772 | ((int) $change_since ? ' AND cal_start >= '.(int) $change_since : ''),__LINE__,__FILE__); |
1773 | 1773 | } |
1774 | 1774 | return $this->db->affected_rows(); |
@@ -2468,7 +2468,7 @@ discard block |
||
2468 | 2468 | ),__LINE__,__FILE__,'calendar'); |
2469 | 2469 | |
2470 | 2470 | // delete calendar entries without participants (can happen if the deleted user is the only participants, but not the owner) |
2471 | - foreach($this->db->select($this->cal_table,"DISTINCT $this->cal_table.cal_id",'cal_user_id IS NULL',__LINE__,__FILE__, |
|
2471 | + foreach($this->db->select($this->cal_table,"distinct $this->cal_table.cal_id",'cal_user_id IS NULL',__LINE__,__FILE__, |
|
2472 | 2472 | False,'','calendar',0,"LEFT JOIN $this->user_table ON $this->cal_table.cal_id=$this->user_table.cal_id") as $row) |
2473 | 2473 | { |
2474 | 2474 | $this->delete($row['cal_id']); |