@@ -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'] = |
@@ -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 | |
@@ -27,51 +27,51 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @param egw_record $_definition |
| 29 | 29 | */ |
| 30 | - public function export( $_stream, importexport_definition $_definition) { |
|
| 30 | + public function export($_stream, importexport_definition $_definition) { |
|
| 31 | 31 | $options = $_definition->plugin_options; |
| 32 | 32 | |
| 33 | 33 | $this->ui = new timesheet_ui(); |
| 34 | 34 | $selection = array(); |
| 35 | 35 | |
| 36 | - if($options['selection'] == 'search') { |
|
| 37 | - $query = $GLOBALS['egw']->session->appsession('index',TIMESHEET_APP); |
|
| 38 | - $query['num_rows'] = -1; // all records |
|
| 39 | - $query['csv_export'] = true; // so get_rows method _can_ produce different content or not store state in the session |
|
| 40 | - $this->ui->get_rows($query,$selection,$readonlys,true); // true = only return the id's |
|
| 41 | - } elseif($options['selection'] == 'all') { |
|
| 36 | + if ($options['selection'] == 'search') { |
|
| 37 | + $query = $GLOBALS['egw']->session->appsession('index', TIMESHEET_APP); |
|
| 38 | + $query['num_rows'] = -1; // all records |
|
| 39 | + $query['csv_export'] = true; // so get_rows method _can_ produce different content or not store state in the session |
|
| 40 | + $this->ui->get_rows($query, $selection, $readonlys, true); // true = only return the id's |
|
| 41 | + } elseif ($options['selection'] == 'all') { |
|
| 42 | 42 | $query = array( |
| 43 | 43 | 'num_rows' => -1, |
| 44 | - 'csv_export' => true, // so get_rows method _can_ produce different content or not store state in the session |
|
| 44 | + 'csv_export' => true, // so get_rows method _can_ produce different content or not store state in the session |
|
| 45 | 45 | ); |
| 46 | - $this->ui->get_rows($query,$selection,$readonlys,true); // true = only return the id's |
|
| 46 | + $this->ui->get_rows($query, $selection, $readonlys, true); // true = only return the id's |
|
| 47 | 47 | } |
| 48 | - else if($options['selection'] == 'filter') |
|
| 48 | + else if ($options['selection'] == 'filter') |
|
| 49 | 49 | { |
| 50 | 50 | $fields = importexport_helper_functions::get_filter_fields($_definition->application, $this); |
| 51 | 51 | $filter = $_definition->filter; |
| 52 | 52 | $query = array( |
| 53 | 53 | 'num_rows' => -1, |
| 54 | - 'csv_export' => true, // so get_rows method _can_ produce different content or not store state in the session |
|
| 54 | + 'csv_export' => true, // so get_rows method _can_ produce different content or not store state in the session |
|
| 55 | 55 | 'col_filter' => array() |
| 56 | 56 | ); |
| 57 | 57 | |
| 58 | 58 | // Handle ranges |
| 59 | - foreach($filter as $field => $value) |
|
| 59 | + foreach ($filter as $field => $value) |
|
| 60 | 60 | { |
| 61 | - if($field == 'cat_id') |
|
| 61 | + if ($field == 'cat_id') |
|
| 62 | 62 | { |
| 63 | 63 | $query['cat_id'] = $value; |
| 64 | 64 | continue; |
| 65 | 65 | } |
| 66 | 66 | $query['col_filter'][$field] = $value; |
| 67 | - if(!is_array($value) || (!$value['from'] && !$value['to'])) continue; |
|
| 67 | + if (!is_array($value) || (!$value['from'] && !$value['to'])) continue; |
|
| 68 | 68 | |
| 69 | 69 | // Ranges are inclusive, so should be provided that way (from 2 to 10 includes 2 and 10) |
| 70 | - if($value['from']) $query['col_filter'][] = "$field >= " . (int)$value['from']; |
|
| 71 | - if($value['to']) $query['col_filter'][] = "$field <= " . (int)$value['to']; |
|
| 70 | + if ($value['from']) $query['col_filter'][] = "$field >= ".(int)$value['from']; |
|
| 71 | + if ($value['to']) $query['col_filter'][] = "$field <= ".(int)$value['to']; |
|
| 72 | 72 | unset($query['col_filter'][$field]); |
| 73 | 73 | } |
| 74 | - $this->ui->get_rows($query,$selection,$readonlys,true); // true = only return the id's |
|
| 74 | + $this->ui->get_rows($query, $selection, $readonlys, true); // true = only return the id's |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | |
@@ -83,12 +83,12 @@ discard block |
||
| 83 | 83 | // support other selectors atm. |
| 84 | 84 | foreach ($selection as $identifier) { |
| 85 | 85 | $record = new timesheet_egw_record($identifier); |
| 86 | - if($options['convert']) { |
|
| 86 | + if ($options['convert']) { |
|
| 87 | 87 | importexport_export_csv::convert($record, timesheet_egw_record::$types, 'timesheet', $this->selects); |
| 88 | 88 | } else { |
| 89 | 89 | // Implode arrays, so they don't say 'Array' |
| 90 | - foreach($record->get_record_array() as $key => $value) { |
|
| 91 | - if(is_array($value)) $record->$key = implode(',', $value); |
|
| 90 | + foreach ($record->get_record_array() as $key => $value) { |
|
| 91 | + if (is_array($value)) $record->$key = implode(',', $value); |
|
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | $export_object->export_record($record); |
@@ -151,10 +151,10 @@ discard block |
||
| 151 | 151 | public function get_selects() |
| 152 | 152 | { |
| 153 | 153 | $this->selects = array( |
| 154 | - 'ts_status' => $this->ui->status_labels+array(lang('No status')) |
|
| 154 | + 'ts_status' => $this->ui->status_labels + array(lang('No status')) |
|
| 155 | 155 | ); |
| 156 | - foreach($this->selects['ts_status'] as &$status) { |
|
| 157 | - $status = str_replace(' ','',$status); // Remove |
|
| 156 | + foreach ($this->selects['ts_status'] as &$status) { |
|
| 157 | + $status = str_replace(' ', '', $status); // Remove |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | } |
@@ -163,9 +163,9 @@ discard block |
||
| 163 | 163 | */ |
| 164 | 164 | public function get_filter_fields(Array &$filters) |
| 165 | 165 | { |
| 166 | - foreach($filters as $field_name => &$settings) |
|
| 166 | + foreach ($filters as $field_name => &$settings) |
|
| 167 | 167 | { |
| 168 | - if($this->selects[$field_name]) $settings['values'] = $this->selects[$field_name]; |
|
| 168 | + if ($this->selects[$field_name]) $settings['values'] = $this->selects[$field_name]; |
|
| 169 | 169 | } |
| 170 | 170 | } |
| 171 | 171 | |
@@ -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 | { |
@@ -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 | |
@@ -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 | ); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | function notifications_upgrade0_5() |
| 14 | 14 | { |
| 15 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup','account_id',array( |
|
| 15 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup', 'account_id', array( |
|
| 16 | 16 | 'type' => 'int', |
| 17 | 17 | 'precision' => '20', |
| 18 | 18 | 'nullable' => False |
@@ -41,16 +41,16 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | function notifications_upgrade1_8() |
| 43 | 43 | { |
| 44 | - $GLOBALS['egw_setup']->oProc->DropColumn('egw_notificationpopup',array( |
|
| 44 | + $GLOBALS['egw_setup']->oProc->DropColumn('egw_notificationpopup', array( |
|
| 45 | 45 | 'fd' => array( |
| 46 | - 'account_id' => array('type' => 'int','precision' => '20','nullable' => False), |
|
| 46 | + 'account_id' => array('type' => 'int', 'precision' => '20', 'nullable' => False), |
|
| 47 | 47 | 'message' => array('type' => 'longtext') |
| 48 | 48 | ), |
| 49 | 49 | 'pk' => array(), |
| 50 | 50 | 'fk' => array(), |
| 51 | 51 | 'ix' => array('account_id'), |
| 52 | 52 | 'uc' => array() |
| 53 | - ),'session_id'); |
|
| 53 | + ), 'session_id'); |
|
| 54 | 54 | |
| 55 | 55 | return $GLOBALS['setup_info']['notifications']['currentver'] = '1.9.001'; |
| 56 | 56 | } |
@@ -71,18 +71,18 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | function notifications_upgrade1_9_002() |
| 73 | 73 | { |
| 74 | - $GLOBALS['egw_setup']->oProc->RefreshTable('egw_notificationpopup',array( |
|
| 74 | + $GLOBALS['egw_setup']->oProc->RefreshTable('egw_notificationpopup', array( |
|
| 75 | 75 | 'fd' => array( |
| 76 | - 'notify_id' => array('type' => 'auto','nullable' => False,'comment' => 'primary key'), |
|
| 77 | - 'account_id' => array('type' => 'int','precision' => '20','nullable' => False,'comment' => 'user to notify'), |
|
| 78 | - 'notify_message' => array('type' => 'text','comment' => 'notification message'), |
|
| 79 | - 'notify_created' => array('type' => 'timestamp','default' => 'current_timestamp','comment' => 'creation time of notification') |
|
| 76 | + 'notify_id' => array('type' => 'auto', 'nullable' => False, 'comment' => 'primary key'), |
|
| 77 | + 'account_id' => array('type' => 'int', 'precision' => '20', 'nullable' => False, 'comment' => 'user to notify'), |
|
| 78 | + 'notify_message' => array('type' => 'text', 'comment' => 'notification message'), |
|
| 79 | + 'notify_created' => array('type' => 'timestamp', 'default' => 'current_timestamp', 'comment' => 'creation time of notification') |
|
| 80 | 80 | ), |
| 81 | 81 | 'pk' => array('notify_id'), |
| 82 | 82 | 'fk' => array(), |
| 83 | - 'ix' => array('account_id','notify_created'), |
|
| 83 | + 'ix' => array('account_id', 'notify_created'), |
|
| 84 | 84 | 'uc' => array() |
| 85 | - ),array( |
|
| 85 | + ), array( |
|
| 86 | 86 | 'notify_message' => 'message', |
| 87 | 87 | )); |
| 88 | 88 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | function notifications_upgrade1_9_003() |
| 94 | 94 | { |
| 95 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_notificationpopup','notify_type',array( |
|
| 95 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_notificationpopup', 'notify_type', array( |
|
| 96 | 96 | 'type' => 'varchar', |
| 97 | 97 | 'precision' => '32', |
| 98 | 98 | 'comment' => 'notification type' |
@@ -109,12 +109,12 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | function notifications_upgrade14_1() |
| 111 | 111 | { |
| 112 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup','notify_message',array( |
|
| 112 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup', 'notify_message', array( |
|
| 113 | 113 | 'type' => 'varchar', |
| 114 | 114 | 'precision' => '16384', |
| 115 | 115 | 'comment' => 'notification message' |
| 116 | 116 | )); |
| 117 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup','notify_type',array( |
|
| 117 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup', 'notify_type', array( |
|
| 118 | 118 | 'type' => 'ascii', |
| 119 | 119 | 'precision' => '32', |
| 120 | 120 | 'comment' => 'notification type' |