@@ -59,7 +59,7 @@ |
||
59 | 59 | function wizard_step50(&$content, &$sel_options, &$readonlys, &$preserv) |
60 | 60 | { |
61 | 61 | $result = parent::wizard_step50($content, $sel_options, $readonlys, $preserv); |
62 | - $content['msg'] .= "\n*" ; |
|
62 | + $content['msg'] .= "\n*"; |
|
63 | 63 | |
64 | 64 | return $result; |
65 | 65 | } |
@@ -13,13 +13,13 @@ discard block |
||
13 | 13 | |
14 | 14 | if (!defined('TIMESHEET_APP')) |
15 | 15 | { |
16 | - define('TIMESHEET_APP','timesheet'); |
|
16 | + define('TIMESHEET_APP', 'timesheet'); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | $setup_info[TIMESHEET_APP]['name'] = TIMESHEET_APP; |
20 | 20 | $setup_info[TIMESHEET_APP]['version'] = '16.1'; |
21 | 21 | $setup_info[TIMESHEET_APP]['app_order'] = 5; |
22 | -$setup_info[TIMESHEET_APP]['tables'] = array('egw_timesheet','egw_timesheet_extra'); |
|
22 | +$setup_info[TIMESHEET_APP]['tables'] = array('egw_timesheet', 'egw_timesheet_extra'); |
|
23 | 23 | $setup_info[TIMESHEET_APP]['enable'] = 1; |
24 | 24 | $setup_info[TIMESHEET_APP]['index'] = 'timesheet.timesheet_ui.index&ajax=true'; |
25 | 25 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | 'name' => 'Ralf Becker', |
29 | 29 | 'email' => '[email protected]' |
30 | 30 | ); |
31 | -$setup_info[TIMESHEET_APP]['license'] = 'GPL'; |
|
31 | +$setup_info[TIMESHEET_APP]['license'] = 'GPL'; |
|
32 | 32 | $setup_info[TIMESHEET_APP]['description'] = |
33 | 33 | 'Tracking times and other activities for the Projectmanager.'; |
34 | 34 | $setup_info[TIMESHEET_APP]['note'] = |
@@ -37,11 +37,11 @@ |
||
37 | 37 | /* Dependencies for this app to work */ |
38 | 38 | $setup_info['importexport']['depends'][] = array( |
39 | 39 | 'appname' => 'phpgwapi', |
40 | - 'versions' => Array('14.1') |
|
40 | + 'versions' => array('14.1') |
|
41 | 41 | ); |
42 | 42 | $setup_info['importexport']['depends'][] = array( |
43 | 43 | 'appname' => 'etemplate', |
44 | - 'versions' => Array('14.1') |
|
44 | + 'versions' => array('14.1') |
|
45 | 45 | ); |
46 | 46 | |
47 | 47 | // installation checks for importexport |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | function timesheet_upgrade0_1_001() |
17 | 17 | { |
18 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_timesheet','pl_id',array( |
|
18 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_timesheet', 'pl_id', array( |
|
19 | 19 | 'type' => 'int', |
20 | 20 | 'precision' => '4', |
21 | 21 | 'default' => '0' |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | |
28 | 28 | function timesheet_upgrade0_2_001() |
29 | 29 | { |
30 | - $GLOBALS['egw_setup']->oProc->CreateTable('egw_timesheet_extra',array( |
|
30 | + $GLOBALS['egw_setup']->oProc->CreateTable('egw_timesheet_extra', array( |
|
31 | 31 | 'fd' => array( |
32 | - 'ts_id' => array('type' => 'int','precision' => '4','nullable' => False), |
|
33 | - 'ts_extra_name' => array('type' => 'varchar','precision' => '32','nullable' => False), |
|
34 | - 'ts_extra_value' => array('type' => 'varchar','precision' => '255','nullable' => False,'default' => '') |
|
32 | + 'ts_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False), |
|
33 | + 'ts_extra_name' => array('type' => 'varchar', 'precision' => '32', 'nullable' => False), |
|
34 | + 'ts_extra_value' => array('type' => 'varchar', 'precision' => '255', 'nullable' => False, 'default' => '') |
|
35 | 35 | ), |
36 | - 'pk' => array('ts_id','ts_extra_name'), |
|
36 | + 'pk' => array('ts_id', 'ts_extra_name'), |
|
37 | 37 | 'fk' => array(), |
38 | 38 | 'ix' => array(), |
39 | 39 | 'uc' => array() |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | function timesheet_upgrade1_4() |
53 | 53 | { |
54 | 54 | // delete empty cf's generated by 1.4 |
55 | - $GLOBALS['egw_setup']->db->delete('egw_timesheet_extra',"ts_extra_value=''",__LINE__,__FILE__,'timesheet'); |
|
55 | + $GLOBALS['egw_setup']->db->delete('egw_timesheet_extra', "ts_extra_value=''", __LINE__, __FILE__, 'timesheet'); |
|
56 | 56 | |
57 | 57 | return $GLOBALS['setup_info']['timesheet']['currentver'] = '1.6'; |
58 | 58 | } |
@@ -60,12 +60,12 @@ discard block |
||
60 | 60 | |
61 | 61 | function timesheet_upgrade1_6() |
62 | 62 | { |
63 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_timesheet','ts_status',array( |
|
63 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_timesheet', 'ts_status', array( |
|
64 | 64 | 'type' => 'int', |
65 | 65 | 'precision' => '4' |
66 | 66 | )); |
67 | 67 | |
68 | - $GLOBALS['egw_setup']->oProc->CreateIndex('egw_timesheet','ts_status'); |
|
68 | + $GLOBALS['egw_setup']->oProc->CreateIndex('egw_timesheet', 'ts_status'); |
|
69 | 69 | |
70 | 70 | return $GLOBALS['setup_info']['timesheet']['currentver'] = '1.7.001'; |
71 | 71 | } |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | */ |
93 | 93 | function timesheet_upgrade1_9_001() |
94 | 94 | { |
95 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_timesheet','ts_project',array( |
|
95 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_timesheet', 'ts_project', array( |
|
96 | 96 | 'type' => 'varchar', |
97 | 97 | 'precision' => '255', |
98 | 98 | 'comment' => 'project title' |
99 | 99 | )); |
100 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_timesheet','ts_title',array( |
|
100 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_timesheet', 'ts_title', array( |
|
101 | 101 | 'type' => 'varchar', |
102 | 102 | 'precision' => '255', |
103 | 103 | 'nullable' => False, |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | // returns NULL, if there are no rows! |
109 | 109 | if ((int)$max_description_length <= 16384 && $GLOBALS['egw_setup']->oProc->max_varchar_length >= 16384) |
110 | 110 | { |
111 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_timesheet','ts_description',array( |
|
111 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_timesheet', 'ts_description', array( |
|
112 | 112 | 'type' => 'varchar', |
113 | 113 | 'precision' => '16384', |
114 | 114 | 'comment' => 'description of the timesheet entry' |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * @version $Id$ |
10 | 10 | */ |
11 | 11 | |
12 | -foreach(array( |
|
12 | +foreach (array( |
|
13 | 13 | 'history' => 'history', |
14 | 14 | ) as $name => $value) |
15 | 15 | { |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | 'config_app' => 'timesheet', |
20 | 20 | 'config_name' => $name, |
21 | 21 | 'config_value' => $value, |
22 | - ),array( |
|
22 | + ), array( |
|
23 | 23 | 'config_app' => 'timesheet', |
24 | 24 | 'config_name' => $name, |
25 | - ),__LINE__,__FILE__ |
|
25 | + ), __LINE__, __FILE__ |
|
26 | 26 | ); |
27 | 27 | } |
28 | 28 |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | $this->mapping_fields = array('ts_id' => lang('Timesheet ID')) + $bo->field2label; |
36 | 36 | |
37 | 37 | // These aren't in the list |
38 | - $this->mapping_fields += array( |
|
39 | - 'ts_modified' => lang('Modified'), |
|
40 | - ); |
|
38 | + $this->mapping_fields += array( |
|
39 | + 'ts_modified' => lang('Modified'), |
|
40 | + ); |
|
41 | 41 | |
42 | 42 | // List each custom field |
43 | 43 | unset($this->mapping_fields['customfields']); |
@@ -113,9 +113,9 @@ discard block |
||
113 | 113 | ); |
114 | 114 | } |
115 | 115 | $sel_options = array( |
116 | - 'translate_status' => $options + array($set_to => $ui->status_labels), |
|
117 | - 'translate_cat_id' => $options + array($set_to => $cat_list), |
|
118 | - ); |
|
116 | + 'translate_status' => $options + array($set_to => $ui->status_labels), |
|
117 | + 'translate_cat_id' => $options + array($set_to => $cat_list), |
|
118 | + ); |
|
119 | 119 | $preserv = $content; |
120 | 120 | foreach($sel_options as $field => $options) { |
121 | 121 | if(!array_key_exists($field,$content)) $content[$field] = $content['plugin_options'][$field]; |
@@ -42,7 +42,8 @@ discard block |
||
42 | 42 | // List each custom field |
43 | 43 | unset($this->mapping_fields['customfields']); |
44 | 44 | $custom = Api\Storage\Customfields::get('timesheet'); |
45 | - foreach($custom as $name => $data) { |
|
45 | + foreach($custom as $name => $data) |
|
46 | + { |
|
46 | 47 | $this->mapping_fields['#'.$name] = $data['label']; |
47 | 48 | } |
48 | 49 | |
@@ -72,7 +73,10 @@ discard block |
||
72 | 73 | |
73 | 74 | function wizard_step45(&$content, &$sel_options, &$readonlys, &$preserv) |
74 | 75 | { |
75 | - if($this->debug) error_log(__METHOD__.'->$content '.print_r($content,true)); |
|
76 | + if($this->debug) |
|
77 | + { |
|
78 | + error_log(__METHOD__.'->$content '.print_r($content,true)); |
|
79 | + } |
|
76 | 80 | |
77 | 81 | // return from step45 |
78 | 82 | if ($content['step'] == 'wizard_step45') |
@@ -104,7 +108,8 @@ discard block |
||
104 | 108 | $set_to = lang('Set to') . ':'; |
105 | 109 | $categories = new Api\Categories('','timesheet'); |
106 | 110 | $cat_list = array(); |
107 | - foreach((array)$categories->return_sorted_array(0,False,'','','',true) as $cat) { |
|
111 | + foreach((array)$categories->return_sorted_array(0,False,'','','',true) as $cat) |
|
112 | + { |
|
108 | 113 | $s = str_repeat(' ',$cat['level']) . stripslashes($cat['name']); |
109 | 114 | |
110 | 115 | $cat_list[$cat['id']] = empty($cat['description']) ? $s : array( |
@@ -117,8 +122,12 @@ discard block |
||
117 | 122 | 'translate_cat_id' => $options + array($set_to => $cat_list), |
118 | 123 | ); |
119 | 124 | $preserv = $content; |
120 | - foreach($sel_options as $field => $options) { |
|
121 | - if(!array_key_exists($field,$content)) $content[$field] = $content['plugin_options'][$field]; |
|
125 | + foreach($sel_options as $field => $options) |
|
126 | + { |
|
127 | + if(!array_key_exists($field,$content)) |
|
128 | + { |
|
129 | + $content[$field] = $content['plugin_options'][$field]; |
|
130 | + } |
|
122 | 131 | } |
123 | 132 | unset ($preserv['button']); |
124 | 133 | return $this->step_templates['wizard_step45']; |
@@ -134,7 +143,10 @@ discard block |
||
134 | 143 | |
135 | 144 | function wizard_step60(&$content, &$sel_options, &$readonlys, &$preserv) |
136 | 145 | { |
137 | - if($this->debug) error_log(__METHOD__.'->$content '.print_r($content,true)); |
|
146 | + if($this->debug) |
|
147 | + { |
|
148 | + error_log(__METHOD__.'->$content '.print_r($content,true)); |
|
149 | + } |
|
138 | 150 | unset($content['no_owner_map']); |
139 | 151 | |
140 | 152 | // return from step60 |
@@ -158,17 +170,21 @@ discard block |
||
158 | 170 | $content['msg'] = $this->steps['wizard_step60']; |
159 | 171 | $content['step'] = 'wizard_step60'; |
160 | 172 | $preserv = $content; |
161 | - if(!array_key_exists($content['record_owner']) && $content['plugin_options']) { |
|
173 | + if(!array_key_exists($content['record_owner']) && $content['plugin_options']) |
|
174 | + { |
|
162 | 175 | $content['record_owner'] = $content['plugin_options']['record_owner']; |
163 | 176 | } |
164 | - if(!array_key_exists($content['owner_from_csv']) && $content['plugin_options']) { |
|
177 | + if(!array_key_exists($content['owner_from_csv']) && $content['plugin_options']) |
|
178 | + { |
|
165 | 179 | $content['owner_from_csv'] = $content['plugin_options']['owner_from_csv']; |
166 | 180 | } |
167 | - if(!array_key_exists($content['change_owner']) && $content['plugin_options']) { |
|
181 | + if(!array_key_exists($content['change_owner']) && $content['plugin_options']) |
|
182 | + { |
|
168 | 183 | $content['change_owner'] = $content['plugin_options']['change_owner']; |
169 | 184 | } |
170 | 185 | |
171 | - if(!in_array('ts_owner', $content['field_mapping'])) { |
|
186 | + if(!in_array('ts_owner', $content['field_mapping'])) |
|
187 | + { |
|
172 | 188 | $content['no_owner_map'] = true; |
173 | 189 | } |
174 | 190 |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | // List each custom field |
41 | 41 | unset($this->mapping_fields['customfields']); |
42 | 42 | $custom = config::get_customfields('timesheet'); |
43 | - foreach($custom as $name => $data) { |
|
43 | + foreach ($custom as $name => $data) { |
|
44 | 44 | $this->mapping_fields['#'.$name] = $data['label']; |
45 | 45 | } |
46 | 46 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | function wizard_step45(&$content, &$sel_options, &$readonlys, &$preserv) |
72 | 72 | { |
73 | - if($this->debug) error_log(__METHOD__.'->$content '.print_r($content,true)); |
|
73 | + if ($this->debug) error_log(__METHOD__.'->$content '.print_r($content, true)); |
|
74 | 74 | |
75 | 75 | // return from step45 |
76 | 76 | if ($content['step'] == 'wizard_step45') |
@@ -78,13 +78,13 @@ discard block |
||
78 | 78 | switch (array_search('pressed', $content['button'])) |
79 | 79 | { |
80 | 80 | case 'next': |
81 | - return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'],1); |
|
81 | + return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'], 1); |
|
82 | 82 | case 'previous' : |
83 | - return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'],-1); |
|
83 | + return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'], -1); |
|
84 | 84 | case 'finish': |
85 | 85 | return 'wizard_finish'; |
86 | 86 | default : |
87 | - return $this->wizard_step45($content,$sel_options,$readonlys,$preserv); |
|
87 | + return $this->wizard_step45($content, $sel_options, $readonlys, $preserv); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | // init step45 |
@@ -99,11 +99,11 @@ discard block |
||
99 | 99 | '~skip~' => lang('Skip record'), |
100 | 100 | 'add' => lang('Add'), |
101 | 101 | ); |
102 | - $set_to = lang('Set to') . ':'; |
|
103 | - $categories = new categories('','timesheet'); |
|
102 | + $set_to = lang('Set to').':'; |
|
103 | + $categories = new categories('', 'timesheet'); |
|
104 | 104 | $cat_list = array(); |
105 | - foreach((array)$categories->return_sorted_array(0,False,'','','',true) as $cat) { |
|
106 | - $s = str_repeat(' ',$cat['level']) . stripslashes($cat['name']); |
|
105 | + foreach ((array)$categories->return_sorted_array(0, False, '', '', '', true) as $cat) { |
|
106 | + $s = str_repeat(' ', $cat['level']).stripslashes($cat['name']); |
|
107 | 107 | |
108 | 108 | $cat_list[$cat['id']] = empty($cat['description']) ? $s : array( |
109 | 109 | 'label' => $s, |
@@ -115,8 +115,8 @@ discard block |
||
115 | 115 | 'translate_cat_id' => $options + array($set_to => $cat_list), |
116 | 116 | ); |
117 | 117 | $preserv = $content; |
118 | - foreach($sel_options as $field => $options) { |
|
119 | - if(!array_key_exists($field,$content)) $content[$field] = $content['plugin_options'][$field]; |
|
118 | + foreach ($sel_options as $field => $options) { |
|
119 | + if (!array_key_exists($field, $content)) $content[$field] = $content['plugin_options'][$field]; |
|
120 | 120 | } |
121 | 121 | unset ($preserv['button']); |
122 | 122 | return $this->step_templates['wizard_step45']; |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | function wizard_step60(&$content, &$sel_options, &$readonlys, &$preserv) |
134 | 134 | { |
135 | - if($this->debug) error_log(__METHOD__.'->$content '.print_r($content,true)); |
|
135 | + if ($this->debug) error_log(__METHOD__.'->$content '.print_r($content, true)); |
|
136 | 136 | unset($content['no_owner_map']); |
137 | 137 | |
138 | 138 | // return from step60 |
@@ -141,13 +141,13 @@ discard block |
||
141 | 141 | switch (array_search('pressed', $content['button'])) |
142 | 142 | { |
143 | 143 | case 'next': |
144 | - return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'],1); |
|
144 | + return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'], 1); |
|
145 | 145 | case 'previous' : |
146 | - return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'],-1); |
|
146 | + return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'], -1); |
|
147 | 147 | case 'finish': |
148 | 148 | return 'wizard_finish'; |
149 | 149 | default : |
150 | - return $this->wizard_step60($content,$sel_options,$readonlys,$preserv); |
|
150 | + return $this->wizard_step60($content, $sel_options, $readonlys, $preserv); |
|
151 | 151 | } |
152 | 152 | } |
153 | 153 | // init step60 |
@@ -156,17 +156,17 @@ discard block |
||
156 | 156 | $content['msg'] = $this->steps['wizard_step60']; |
157 | 157 | $content['step'] = 'wizard_step60'; |
158 | 158 | $preserv = $content; |
159 | - if(!array_key_exists($content['record_owner']) && $content['plugin_options']) { |
|
159 | + if (!array_key_exists($content['record_owner']) && $content['plugin_options']) { |
|
160 | 160 | $content['record_owner'] = $content['plugin_options']['record_owner']; |
161 | 161 | } |
162 | - if(!array_key_exists($content['owner_from_csv']) && $content['plugin_options']) { |
|
162 | + if (!array_key_exists($content['owner_from_csv']) && $content['plugin_options']) { |
|
163 | 163 | $content['owner_from_csv'] = $content['plugin_options']['owner_from_csv']; |
164 | 164 | } |
165 | - if(!array_key_exists($content['change_owner']) && $content['plugin_options']) { |
|
165 | + if (!array_key_exists($content['change_owner']) && $content['plugin_options']) { |
|
166 | 166 | $content['change_owner'] = $content['plugin_options']['change_owner']; |
167 | 167 | } |
168 | 168 | |
169 | - if(!in_array('ts_owner', $content['field_mapping'])) { |
|
169 | + if (!in_array('ts_owner', $content['field_mapping'])) { |
|
170 | 170 | $content['no_owner_map'] = true; |
171 | 171 | } |
172 | 172 |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | |
74 | 74 | //set fields for tracking |
75 | 75 | $this->field2history = array_keys($this->bo->db_cols); |
76 | - $this->field2history = array_diff(array_combine($this->field2history,$this->field2history),array('ts_modified')); |
|
77 | - $this->field2history += array('customfields' => '#c'); // to display old customfield data in history |
|
76 | + $this->field2history = array_diff(array_combine($this->field2history, $this->field2history), array('ts_modified')); |
|
77 | + $this->field2history += array('customfields' => '#c'); // to display old customfield data in history |
|
78 | 78 | |
79 | 79 | // custom fields are now handled by parent::__construct('tracker') |
80 | 80 | parent::__construct('timesheet'); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * @param array $old =null old/last state of the entry or null for a new entry |
92 | 92 | * @return mixed |
93 | 93 | */ |
94 | - function get_config($name,$data,$old=null) |
|
94 | + function get_config($name, $data, $old = null) |
|
95 | 95 | { |
96 | 96 | $timesheet = $data['ts_id']; |
97 | 97 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * @param array $old |
110 | 110 | * @return string |
111 | 111 | */ |
112 | - function get_subject($data,$old) |
|
112 | + function get_subject($data, $old) |
|
113 | 113 | { |
114 | 114 | return '#'.$data['ts_id'].' - '.$data['ts_title']; |
115 | 115 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | * @param array $old |
122 | 122 | * @return string |
123 | 123 | */ |
124 | - function get_message($data,$old) |
|
124 | + function get_message($data, $old) |
|
125 | 125 | { |
126 | 126 | if (!$data['ts_modified'] || !$old) |
127 | 127 | { |
@@ -62,7 +62,6 @@ discard block |
||
62 | 62 | /** |
63 | 63 | * Constructor |
64 | 64 | * |
65 | - * @param timesheet_bo $botimesheet |
|
66 | 65 | * @return timesheet_tracking |
67 | 66 | */ |
68 | 67 | function __construct(timesheet_bo $bo) |
@@ -81,12 +80,7 @@ discard block |
||
81 | 80 | /** |
82 | 81 | * Get a notification-config value |
83 | 82 | * |
84 | - * @param string $what |
|
85 | - * - 'copy' array of email addresses notifications should be copied too, can depend on $data |
|
86 | - * - 'lang' string lang code for copy mail |
|
87 | - * - 'sender' string send email address |
|
88 | 83 | * @param array $data current entry |
89 | - * @param array $old=null old/last state of the entry or null for a new entry |
|
90 | 84 | * @return mixed |
91 | 85 | */ |
92 | 86 | function get_config($name,$data,$old=null) |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | ) |
21 | 21 | ); |
22 | 22 | |
23 | -ini_set('zlib.output_compression',0); |
|
23 | +ini_set('zlib.output_compression', 0); |
|
24 | 24 | include('../header.inc.php'); |
25 | 25 | |
26 | 26 | ob_start(); |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | check_load_extension('zip', true); |
29 | 29 | |
30 | 30 | $document = EGW_SERVER_ROOT.'/notifications/java/full-eGwNotifier.jar'; |
31 | -$archive = tempnam($GLOBALS['egw_info']['server']['temp_dir'], basename($document,'.jar').'-').'.jar'; |
|
32 | -$ret=copy($document, $archive); |
|
31 | +$archive = tempnam($GLOBALS['egw_info']['server']['temp_dir'], basename($document, '.jar').'-').'.jar'; |
|
32 | +$ret = copy($document, $archive); |
|
33 | 33 | error_log("copy('$document', '$archive' returned ".array2string($ret)); |
34 | 34 | $document = 'zip://'.$archive.'#'.($config_file = 'lib/conf/egwnotifier.const.xml'); |
35 | 35 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | function replace_callback($matches) |
40 | 40 | { |
41 | 41 | $replacement = $matches[3]; |
42 | - switch($matches[1]) |
|
42 | + switch ($matches[1]) |
|
43 | 43 | { |
44 | 44 | case 'egw_dc_url': |
45 | 45 | $replacement = $GLOBALS['egw_info']['server']['webserver_url']; |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | case 'egw_debuging_level': |
61 | 61 | break; |
62 | 62 | default: |
63 | - $replacement = lang($r=$replacement); |
|
63 | + $replacement = lang($r = $replacement); |
|
64 | 64 | /* uncomment this to have missing translations add to en langfile |
65 | 65 | // if no translation found, check if en langfile is writable and add phrase, if not already there |
66 | 66 | if ($r === $replacement) |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | if (is_string($htmlscflags)) |
91 | 91 | { |
92 | - $htmlscflags = 16; // #define ENT_XML1 16 |
|
92 | + $htmlscflags = 16; // #define ENT_XML1 16 |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | return '<'.$matches[1].'>'.htmlspecialchars($replacement, $htmlscflags, Api\Translation::charset()).'</'.$matches[1].'>'; |
@@ -118,6 +118,6 @@ discard block |
||
118 | 118 | ob_end_clean(); |
119 | 119 | |
120 | 120 | Api\Header\Content::type('egroupware-notifier-'.$GLOBALS['egw_info']['user']['account_lid'].'.jar', 'application/x-java-archive', filesize($archive)); |
121 | -readfile($archive,'rb'); |
|
121 | +readfile($archive, 'rb'); |
|
122 | 122 | |
123 | 123 | @unlink($archive); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | if (!defined('NOTIFICATION_APP')) |
13 | 13 | { |
14 | - define('NOTIFICATION_APP','notifications'); |
|
14 | + define('NOTIFICATION_APP', 'notifications'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | $setup_info[NOTIFICATION_APP]['name'] = NOTIFICATION_APP; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | 'name' => 'eGroupware coreteam', |
26 | 26 | 'email' => '[email protected]' |
27 | 27 | ); |
28 | -$setup_info[NOTIFICATION_APP]['license'] = 'GPL'; |
|
28 | +$setup_info[NOTIFICATION_APP]['license'] = 'GPL'; |
|
29 | 29 | $setup_info[NOTIFICATION_APP]['description'] = |
30 | 30 | 'Instant notification of users via various channels.'; |
31 | 31 |
@@ -37,11 +37,11 @@ |
||
37 | 37 | /* Dependencies for this app to work */ |
38 | 38 | $setup_info['importexport']['depends'][] = array( |
39 | 39 | 'appname' => 'phpgwapi', |
40 | - 'versions' => Array('14.1') |
|
40 | + 'versions' => array('14.1') |
|
41 | 41 | ); |
42 | 42 | $setup_info['importexport']['depends'][] = array( |
43 | 43 | 'appname' => 'etemplate', |
44 | - 'versions' => Array('14.1') |
|
44 | + 'versions' => array('14.1') |
|
45 | 45 | ); |
46 | 46 | |
47 | 47 | // installation checks for importexport |
@@ -12,15 +12,15 @@ |
||
12 | 12 | $phpgw_baseline = array( |
13 | 13 | 'egw_notificationpopup' => array( |
14 | 14 | 'fd' => array( |
15 | - 'notify_id' => array('type' => 'auto','nullable' => False,'comment' => 'primary key'), |
|
16 | - 'account_id' => array('type' => 'int','meta' => 'user','precision' => '20','nullable' => False,'comment' => 'user to notify'), |
|
17 | - 'notify_message' => array('type' => 'varchar','precision' => '16384','comment' => 'notification message'), |
|
18 | - 'notify_created' => array('type' => 'timestamp','meta' => 'timestamp','default' => 'current_timestamp','comment' => 'creation time of notification'), |
|
19 | - 'notify_type' => array('type' => 'ascii','precision' => '32','comment' => 'notification type') |
|
15 | + 'notify_id' => array('type' => 'auto', 'nullable' => False, 'comment' => 'primary key'), |
|
16 | + 'account_id' => array('type' => 'int', 'meta' => 'user', 'precision' => '20', 'nullable' => False, 'comment' => 'user to notify'), |
|
17 | + 'notify_message' => array('type' => 'varchar', 'precision' => '16384', 'comment' => 'notification message'), |
|
18 | + 'notify_created' => array('type' => 'timestamp', 'meta' => 'timestamp', 'default' => 'current_timestamp', 'comment' => 'creation time of notification'), |
|
19 | + 'notify_type' => array('type' => 'ascii', 'precision' => '32', 'comment' => 'notification type') |
|
20 | 20 | ), |
21 | 21 | 'pk' => array('notify_id'), |
22 | 22 | 'fk' => array(), |
23 | - 'ix' => array('account_id','notify_created'), |
|
23 | + 'ix' => array('account_id', 'notify_created'), |
|
24 | 24 | 'uc' => array() |
25 | 25 | ) |
26 | 26 | ); |