Completed
Push — master ( aa44e9...fa84e5 )
by Ralf
90:14 queued 73:21
created
remote.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 {
35 35
 	if (isset($_GET['auth']))
36 36
 	{
37
-		list($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']) = explode(':',base64_decode($_GET['auth']),2);
37
+		list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode($_GET['auth']), 2);
38 38
 	}
39 39
 	return Api\Header\Authenticate::autocreate_session_callback($account);
40 40
 }
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 		'noheader'  => True,
46 46
 		'currentapp' => preg_match('|/remote.php/webdav/apps/([A-Za-z0-9_-]+)/|', $_SERVER['REQUEST_URI'], $matches) ? $matches[1] : 'filemanager',
47 47
 		'autocreate_session_callback' => 'check_access',
48
-		'no_exception_handler' => 'basic_auth',	// we use a basic auth exception handler (sends exception message as basic auth realm)
49
-		'auth_realm' => 'EGroupware WebDAV server',	// cant use Vfs\WebDAV::REALM as autoloading and include path not yet setup!
48
+		'no_exception_handler' => 'basic_auth', // we use a basic auth exception handler (sends exception message as basic auth realm)
49
+		'auth_realm' => 'EGroupware WebDAV server', // cant use Vfs\WebDAV::REALM as autoloading and include path not yet setup!
50 50
 	)
51 51
 );
52 52
 
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
 
75 75
 // temporary mount ownCloud default /clientsync as /home/$user, if not explicitly mounted
76 76
 // so ownCloud dir contains users home-dir by default
77
-if (strpos($_SERVER['REQUEST_URI'],'/remote.php/webdav/clientsync') !== false &&
78
-	($fstab=Vfs::mount()) && !isset($fstab['/clientsync']))
77
+if (strpos($_SERVER['REQUEST_URI'], '/remote.php/webdav/clientsync') !== false &&
78
+	($fstab = Vfs::mount()) && !isset($fstab['/clientsync']))
79 79
 {
80 80
 	$is_root_backup = Vfs::$is_root;
81 81
 	Vfs::$is_root = true;
82
-	$ok = Vfs::mount($url='vfs://default/home/$user', $clientsync='/clientsync', null, false);
82
+	$ok = Vfs::mount($url = 'vfs://default/home/$user', $clientsync = '/clientsync', null, false);
83 83
 	Vfs::$is_root = $is_root_backup;
84 84
 	//error_log("mounting ownCloud default '$clientsync' as '$url' ".($ok ? 'successful' : 'failed!'));
85 85
 }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
  * Create a session or if the user has no account return authenticate header and 401 Unauthorized
32 32
  *
33 33
  * @param array &$account
34
- * @return int session-id
34
+ * @return string session-id
35 35
  */
36 36
 function check_access(&$account)
37 37
 {
Please login to merge, or discard this patch.
index.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
 // or an uncoditional redirect to this file or copy groupdav.htaccess to your docroot as .htaccess
20 20
 if ($_SERVER['REQUEST_METHOD'] == 'PROPFIND' || $_SERVER['REQUEST_METHOD'] == 'OPTIONS')
21 21
 {
22
-        header('Location: groupdav.php/');
23
-        exit;
22
+		header('Location: groupdav.php/');
23
+		exit;
24 24
 }
25 25
 
26 26
 // forward for not existing or empty header to setup
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
 }
25 25
 
26 26
 // forward for not existing or empty header to setup
27
-if(!file_exists('header.inc.php') || !filesize('header.inc.php'))
27
+if (!file_exists('header.inc.php') || !filesize('header.inc.php'))
28 28
 {
29 29
 	Header('Location: setup/index.php');
30 30
 	exit;
31 31
 }
32 32
 
33
-if(isset($_GET['hasupdates']) && $_GET['hasupdates'] == 'yes')
33
+if (isset($_GET['hasupdates']) && $_GET['hasupdates'] == 'yes')
34 34
 {
35 35
 	$hasupdates = True;
36 36
 }
@@ -38,20 +38,20 @@  discard block
 block discarded – undo
38 38
 /*
39 39
 	This is the menuaction driver for the multi-layered design
40 40
 */
41
-if(isset($_GET['menuaction']) && preg_match('/^[A-Za-z0-9_]+\.[A-Za-z0-9_\\\\]+\.[A-Za-z0-9_]+$/',$_GET['menuaction']))
41
+if (isset($_GET['menuaction']) && preg_match('/^[A-Za-z0-9_]+\.[A-Za-z0-9_\\\\]+\.[A-Za-z0-9_]+$/', $_GET['menuaction']))
42 42
 {
43
-	list($app,$class,$method) = explode('.',$_GET['menuaction']);
43
+	list($app, $class, $method) = explode('.', $_GET['menuaction']);
44 44
 
45 45
 	// check if autoloadable class belongs to given app
46 46
 	if (substr($class, 0, 11) == 'EGroupware\\')
47 47
 	{
48 48
 		list(,$app_from_class) = explode('\\', strtolower($class));
49 49
 	}
50
-	elseif(strpos($class, '_') !== false)
50
+	elseif (strpos($class, '_') !== false)
51 51
 	{
52 52
 		list($app_from_class) = explode('_', $class);
53 53
 	}
54
-	if(!$app || !$class || !$method || isset($app_from_class) &&
54
+	if (!$app || !$class || !$method || isset($app_from_class) &&
55 55
 		isset($GLOBALS['egw_info']['apps'][$app_from_class]) && $app_from_class != $app)
56 56
 	{
57 57
 		$invalid_data = True;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	$invalid_data = True;
64 64
 }
65 65
 //error_log(__METHOD__."$app,$class,$method");
66
-if($app == 'phpgwapi')
66
+if ($app == 'phpgwapi')
67 67
 {
68 68
 	$app = 'api';
69 69
 	$api_requested = True;
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 // user changed timezone
82 82
 if (isset($_GET['tz']))
83 83
 {
84
-	Api\DateTime::setUserPrefs($_GET['tz']);	// throws exception, if tz is invalid
84
+	Api\DateTime::setUserPrefs($_GET['tz']); // throws exception, if tz is invalid
85 85
 
86
-	$GLOBALS['egw']->preferences->add('common','tz',$_GET['tz']);
86
+	$GLOBALS['egw']->preferences->add('common', 'tz', $_GET['tz']);
87 87
 	$GLOBALS['egw']->preferences->save_repository();
88 88
 
89 89
 	if (($referer = Api\Header\Referer::get()))
@@ -94,30 +94,30 @@  discard block
 block discarded – undo
94 94
 
95 95
 // 	Check if we are using windows or normal webpage
96 96
 $windowed = false;
97
-$tpl_info = EGW_SERVER_ROOT . '/phpgwapi/templates/' . basename($GLOBALS['egw_info']['user']['preferences']['common']['template_set']) . '/setup/setup.inc.php';
97
+$tpl_info = EGW_SERVER_ROOT.'/phpgwapi/templates/'.basename($GLOBALS['egw_info']['user']['preferences']['common']['template_set']).'/setup/setup.inc.php';
98 98
 if (!file_exists($tpl_info))
99 99
 {
100
-	$tpl_info = EGW_SERVER_ROOT.'/'.basename($GLOBALS['egw_info']['user']['preferences']['common']['template_set']) . '/setup/setup.inc.php';
100
+	$tpl_info = EGW_SERVER_ROOT.'/'.basename($GLOBALS['egw_info']['user']['preferences']['common']['template_set']).'/setup/setup.inc.php';
101 101
 }
102
-if(@file_exists($tpl_info))
102
+if (@file_exists($tpl_info))
103 103
 {
104 104
 	include_once($tpl_info);
105
-	if($GLOBALS['egw_info']['template'][$GLOBALS['egw_info']['user']['preferences']['common']['template_set']]['windowed'])
105
+	if ($GLOBALS['egw_info']['template'][$GLOBALS['egw_info']['user']['preferences']['common']['template_set']]['windowed'])
106 106
 	{
107 107
 		$windowed = true;
108 108
 	}
109 109
 }
110 110
 
111 111
 
112
-if($app == 'api' && !$class && !$api_requested && !($windowed && $_GET['cd'] == 'yes' && !Api\Header\UserAgent::mobile()) && $GLOBALS['egw_info']['user']['preferences']['common']['template_set'] == 'idots')
112
+if ($app == 'api' && !$class && !$api_requested && !($windowed && $_GET['cd'] == 'yes' && !Api\Header\UserAgent::mobile()) && $GLOBALS['egw_info']['user']['preferences']['common']['template_set'] == 'idots')
113 113
 {
114 114
 	if ($GLOBALS['egw_info']['server']['force_default_app'] && $GLOBALS['egw_info']['server']['force_default_app'] != 'user_choice')
115 115
 	{
116 116
 		$GLOBALS['egw_info']['user']['preferences']['common']['default_app'] = $GLOBALS['egw_info']['server']['force_default_app'];
117 117
 	}
118
-	if($GLOBALS['egw_info']['user']['preferences']['common']['default_app'] && !$hasupdates)
118
+	if ($GLOBALS['egw_info']['user']['preferences']['common']['default_app'] && !$hasupdates)
119 119
 	{
120
-		Egw::redirect(Framework::index($GLOBALS['egw_info']['user']['preferences']['common']['default_app']),$GLOBALS['egw_info']['user']['preferences']['common']['default_app']);
120
+		Egw::redirect(Framework::index($GLOBALS['egw_info']['user']['preferences']['common']['default_app']), $GLOBALS['egw_info']['user']['preferences']['common']['default_app']);
121 121
 	}
122 122
 	else
123 123
 	{
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	}
126 126
 }
127 127
 
128
-if($windowed && $_GET['cd'] == 'yes')
128
+if ($windowed && $_GET['cd'] == 'yes')
129 129
 {
130 130
 	$GLOBALS['egw_info']['flags'] = array(
131 131
 		'noheader'   => False,
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 }
138 138
 else
139 139
 {
140
-	if($api_requested)
140
+	if ($api_requested)
141 141
 	{
142 142
 		$app = 'phpgwapi';
143 143
 	}
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	{
151 151
 		$obj = CreateObject($app.'.'.$class);
152 152
 	}
153
-	if((is_array($obj->public_functions) && $obj->public_functions[$method]) && !$invalid_data)
153
+	if ((is_array($obj->public_functions) && $obj->public_functions[$method]) && !$invalid_data)
154 154
 	{
155 155
 		$obj->$method();
156 156
 		unset($app);
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
 	}
162 162
 	else
163 163
 	{
164
-		if(!$app || !$class || !$method || $invalid_data)
164
+		if (!$app || !$class || !$method || $invalid_data)
165 165
 		{
166
-			if(@is_object($GLOBALS['egw']->log))
166
+			if (@is_object($GLOBALS['egw']->log))
167 167
 			{
168 168
 				$GLOBALS['egw']->log->message(array(
169 169
 					'text' => 'W-BadmenuactionVariable, menuaction missing or corrupt: %1',
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
 			}
175 175
 		}
176 176
 
177
-		if(!is_array($GLOBALS[$class]->public_functions) || !$GLOBALS[$class]->public_functions[$method] && $method)
177
+		if (!is_array($GLOBALS[$class]->public_functions) || !$GLOBALS[$class]->public_functions[$method] && $method)
178 178
 		{
179
-			if(@is_object($GLOBALS['egw']->log))
179
+			if (@is_object($GLOBALS['egw']->log))
180 180
 			{
181 181
 				$GLOBALS['egw']->log->message(array(
182 182
 					'text' => 'W-BadmenuactionVariable, attempted to access private method: %1',
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 				));
187 187
 			}
188 188
 		}
189
-		if(@is_object($GLOBALS['egw']->log))
189
+		if (@is_object($GLOBALS['egw']->log))
190 190
 		{
191 191
 			$GLOBALS['egw']->log->commit();
192 192
 		}
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 		$GLOBALS['egw']->redirect_link('/home/index.php');
195 195
 	}
196 196
 
197
-	if(!isset($GLOBALS['egw_info']['nofooter']))
197
+	if (!isset($GLOBALS['egw_info']['nofooter']))
198 198
 	{
199 199
 		echo $GLOBALS['egw']->framework->footer();
200 200
 	}
Please login to merge, or discard this patch.
groupdav.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 
23 23
 // switching off output compression for Lighttpd and HTTPS, as it makes problems with TB Lightning
24 24
 if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' &&
25
-	strpos($_SERVER['SERVER_SOFTWARE'],'lighttpd/1.4') === 0 &&
26
-	strpos($_SERVER['HTTP_USER_AGENT'],'Lightning') !== false)
25
+	strpos($_SERVER['SERVER_SOFTWARE'], 'lighttpd/1.4') === 0 &&
26
+	strpos($_SERVER['HTTP_USER_AGENT'], 'Lightning') !== false)
27 27
 {
28
-	ini_set('zlib.output_compression',0);
28
+	ini_set('zlib.output_compression', 0);
29 29
 }
30 30
 //error_log("HTTPS='$_SERVER[HTTPS]', SERVER_SOFTWARE='$_SERVER[SERVER_SOFTWARE]', HTTP_USER_AGENT='$_SERVER[HTTP_USER_AGENT]', REQUEST_METHOD='$_SERVER[REQUEST_METHOD]' --> zlib.output_compression=".ini_get('zlib.output_compression'));
31 31
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	'flags' => array(
36 36
 		'noheader'  => True,
37 37
 		'currentapp' => 'groupdav',
38
-		'no_exception_handler' => 'basic_auth',	// we use a basic auth exception handler (sends exception message as basic auth realm)
38
+		'no_exception_handler' => 'basic_auth', // we use a basic auth exception handler (sends exception message as basic auth realm)
39 39
 		'autocreate_session_callback' => 'EGroupware\\Api\\Header\\Authenticate::autocreate_session_callback',
40
-		'auth_realm' => 'EGroupware CalDAV/CardDAV/GroupDAV server',	// cant use groupdav::REALM as autoloading and include path not yet setup!
40
+		'auth_realm' => 'EGroupware CalDAV/CardDAV/GroupDAV server', // cant use groupdav::REALM as autoloading and include path not yet setup!
41 41
 	)
42 42
 );
43 43
 // if you move this file somewhere else, you need to adapt the path to the header!
Please login to merge, or discard this patch.
infolog/setup/setup.inc.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,16 +14,16 @@
 block discarded – undo
14 14
 $setup_info['infolog']['name']      = 'infolog';
15 15
 $setup_info['infolog']['version']   = '16.1';
16 16
 $setup_info['infolog']['app_order'] = 5;
17
-$setup_info['infolog']['tables']    = array('egw_infolog','egw_infolog_extra');
17
+$setup_info['infolog']['tables']    = array('egw_infolog', 'egw_infolog_extra');
18 18
 $setup_info['infolog']['enable']    = 1;
19
-$setup_info['infolog']['index']    = 'infolog.infolog_ui.index&ajax=true';
19
+$setup_info['infolog']['index'] = 'infolog.infolog_ui.index&ajax=true';
20 20
 
21 21
 $setup_info['infolog']['author'] =
22 22
 $setup_info['infolog']['maintainer'] = array(
23 23
 	'name'  => 'Ralf Becker',
24 24
 	'email' => '[email protected]'
25 25
 );
26
-$setup_info['infolog']['license']  = 'GPL';
26
+$setup_info['infolog']['license'] = 'GPL';
27 27
 $setup_info['infolog']['description'] =
28 28
 	'<p><b>CRM</b> (customer-relation-management) type app using Addressbook providing
29 29
 	Todo List, Notes and Phonelog. <b>InfoLog</b> is orininaly based on eGroupWare\'s
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,5 +27,5 @@
 block discarded – undo
27 27
 /* Dependencies for this app to work */
28 28
 $setup_info['home']['depends'][] = array(
29 29
 	'appname' => 'api',
30
-	'versions' => Array('16.1')
30
+	'versions' => array('16.1')
31 31
 );
Please login to merge, or discard this patch.
infolog/setup/tables_current.inc.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -14,53 +14,53 @@
 block discarded – undo
14 14
 $phpgw_baseline = array(
15 15
 	'egw_infolog' => array(
16 16
 		'fd' => array(
17
-			'info_id' => array('type' => 'auto','nullable' => False,'comment' => 'id of the infolog-entry'),
18
-			'info_type' => array('type' => 'varchar','precision' => '40','nullable' => False,'default' => 'task','comment' => 'infolog-type e.g. task, phone, email or note'),
19
-			'info_from' => array('type' => 'varchar','precision' => '255','comment' => 'text of the primary link'),
20
-			'info_addr' => array('type' => 'varchar','precision' => '255','comment' => 'textfield for phone-number or email of the primary contact'),
21
-			'info_subject' => array('type' => 'varchar','precision' => '255','comment' => 'title of the infolog-entry'),
22
-			'info_des' => array('type' => 'text','comment' => 'desciption of the infolog-entry'),
23
-			'info_owner' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False,'comment' => 'owner of the entry, can be account or group'),
24
-			'info_responsible' => array('type' => 'ascii','meta' => 'account-commasep','precision' => '255','nullable' => False,'default' => '0','comment' => 'responsible users or groups (multiple)'),
25
-			'info_access' => array('type' => 'ascii','precision' => '10','default' => 'public','comment' => 'public or privat'),
26
-			'info_cat' => array('type' => 'int','meta' => 'category','precision' => '4','nullable' => False,'default' => '0','comment' => 'category id'),
27
-			'info_datemodified' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False,'comment' => 'timestamp of the last mofification'),
28
-			'info_startdate' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False,'default' => '0','comment' => 'timestamp of the startdate'),
29
-			'info_enddate' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False,'default' => '0','comment' => 'timestamp of the enddate'),
30
-			'info_id_parent' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0','comment' => 'id of the parent infolog'),
31
-			'info_planned_time' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0','comment' => 'pm-field: planned time'),
32
-			'info_replanned_time' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0','comment' => 'pm-field: replanned time'),
33
-			'info_used_time' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0','comment' => 'pm-field: used time'),
34
-			'info_status' => array('type' => 'varchar','precision' => '40','default' => 'done','comment' => 'status e.g. ongoing, done ...'),
35
-			'info_confirm' => array('type' => 'ascii','precision' => '10','default' => 'not'),
36
-			'info_modifier' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'default' => '0','comment' => 'account id of the last modifier'),
37
-			'info_link_id' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0','comment' => 'id of the primary link'),
38
-			'info_priority' => array('type' => 'int','precision' => '2','default' => '1','comment' => '0=Low, 1=Normal, 2=High, 3=Urgent'),
39
-			'pl_id' => array('type' => 'int','precision' => '4','comment' => 'pm-field: id of the pricelist'),
40
-			'info_price' => array('type' => 'float','precision' => '8','comment' => 'pm-field: price-field'),
41
-			'info_percent' => array('type' => 'int','meta' => 'percent','precision' => '2','default' => '0','comment' => 'percentage of completion'),
42
-			'info_datecompleted' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'timestamp of completion'),
43
-			'info_location' => array('type' => 'varchar','precision' => '255','comment' => 'textfield location'),
44
-			'info_custom_from' => array('type' => 'int','precision' => '1','comment' => 'tick-box to show infolog_from'),
45
-			'info_uid' => array('type' => 'ascii','precision' => '128','comment' => 'unique id of the infolog-entry'),
46
-			'info_cc' => array('type' => 'varchar','precision' => '255','comment' => 'textfield for email-adress to be notified via email of changes'),
47
-			'caldav_name' => array('type' => 'ascii','precision' => '128','comment' => 'name part of CalDAV URL, if specified by client'),
48
-			'info_etag' => array('type' => 'int','precision' => '4','default' => '0','comment' => 'etag, not yet used'),
49
-			'info_created' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'timestamp of the creation date'),
50
-			'info_creator' => array('type' => 'int','meta' => 'user','precision' => '4','comment' => 'account id of the creator')
17
+			'info_id' => array('type' => 'auto', 'nullable' => False, 'comment' => 'id of the infolog-entry'),
18
+			'info_type' => array('type' => 'varchar', 'precision' => '40', 'nullable' => False, 'default' => 'task', 'comment' => 'infolog-type e.g. task, phone, email or note'),
19
+			'info_from' => array('type' => 'varchar', 'precision' => '255', 'comment' => 'text of the primary link'),
20
+			'info_addr' => array('type' => 'varchar', 'precision' => '255', 'comment' => 'textfield for phone-number or email of the primary contact'),
21
+			'info_subject' => array('type' => 'varchar', 'precision' => '255', 'comment' => 'title of the infolog-entry'),
22
+			'info_des' => array('type' => 'text', 'comment' => 'desciption of the infolog-entry'),
23
+			'info_owner' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False, 'comment' => 'owner of the entry, can be account or group'),
24
+			'info_responsible' => array('type' => 'ascii', 'meta' => 'account-commasep', 'precision' => '255', 'nullable' => False, 'default' => '0', 'comment' => 'responsible users or groups (multiple)'),
25
+			'info_access' => array('type' => 'ascii', 'precision' => '10', 'default' => 'public', 'comment' => 'public or privat'),
26
+			'info_cat' => array('type' => 'int', 'meta' => 'category', 'precision' => '4', 'nullable' => False, 'default' => '0', 'comment' => 'category id'),
27
+			'info_datemodified' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'nullable' => False, 'comment' => 'timestamp of the last mofification'),
28
+			'info_startdate' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'nullable' => False, 'default' => '0', 'comment' => 'timestamp of the startdate'),
29
+			'info_enddate' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'nullable' => False, 'default' => '0', 'comment' => 'timestamp of the enddate'),
30
+			'info_id_parent' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0', 'comment' => 'id of the parent infolog'),
31
+			'info_planned_time' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0', 'comment' => 'pm-field: planned time'),
32
+			'info_replanned_time' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0', 'comment' => 'pm-field: replanned time'),
33
+			'info_used_time' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0', 'comment' => 'pm-field: used time'),
34
+			'info_status' => array('type' => 'varchar', 'precision' => '40', 'default' => 'done', 'comment' => 'status e.g. ongoing, done ...'),
35
+			'info_confirm' => array('type' => 'ascii', 'precision' => '10', 'default' => 'not'),
36
+			'info_modifier' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False, 'default' => '0', 'comment' => 'account id of the last modifier'),
37
+			'info_link_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0', 'comment' => 'id of the primary link'),
38
+			'info_priority' => array('type' => 'int', 'precision' => '2', 'default' => '1', 'comment' => '0=Low, 1=Normal, 2=High, 3=Urgent'),
39
+			'pl_id' => array('type' => 'int', 'precision' => '4', 'comment' => 'pm-field: id of the pricelist'),
40
+			'info_price' => array('type' => 'float', 'precision' => '8', 'comment' => 'pm-field: price-field'),
41
+			'info_percent' => array('type' => 'int', 'meta' => 'percent', 'precision' => '2', 'default' => '0', 'comment' => 'percentage of completion'),
42
+			'info_datecompleted' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'comment' => 'timestamp of completion'),
43
+			'info_location' => array('type' => 'varchar', 'precision' => '255', 'comment' => 'textfield location'),
44
+			'info_custom_from' => array('type' => 'int', 'precision' => '1', 'comment' => 'tick-box to show infolog_from'),
45
+			'info_uid' => array('type' => 'ascii', 'precision' => '128', 'comment' => 'unique id of the infolog-entry'),
46
+			'info_cc' => array('type' => 'varchar', 'precision' => '255', 'comment' => 'textfield for email-adress to be notified via email of changes'),
47
+			'caldav_name' => array('type' => 'ascii', 'precision' => '128', 'comment' => 'name part of CalDAV URL, if specified by client'),
48
+			'info_etag' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'comment' => 'etag, not yet used'),
49
+			'info_created' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'comment' => 'timestamp of the creation date'),
50
+			'info_creator' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'comment' => 'account id of the creator')
51 51
 		),
52 52
 		'pk' => array('info_id'),
53 53
 		'fk' => array(),
54
-		'ix' => array('caldav_name',array('info_owner','info_responsible','info_status','info_startdate'),array('info_id_parent','info_owner','info_responsible','info_status','info_startdate')),
54
+		'ix' => array('caldav_name', array('info_owner', 'info_responsible', 'info_status', 'info_startdate'), array('info_id_parent', 'info_owner', 'info_responsible', 'info_status', 'info_startdate')),
55 55
 		'uc' => array()
56 56
 	),
57 57
 	'egw_infolog_extra' => array(
58 58
 		'fd' => array(
59
-			'info_id' => array('type' => 'int','precision' => '4','nullable' => False),
60
-			'info_extra_name' => array('type' => 'varchar','meta' => 'cfname','precision' => '64','nullable' => False),
61
-			'info_extra_value' => array('type' => 'varchar','meta' => 'cfvalue','precision' => '16384','nullable' => False)
59
+			'info_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
60
+			'info_extra_name' => array('type' => 'varchar', 'meta' => 'cfname', 'precision' => '64', 'nullable' => False),
61
+			'info_extra_value' => array('type' => 'varchar', 'meta' => 'cfvalue', 'precision' => '16384', 'nullable' => False)
62 62
 		),
63
-		'pk' => array('info_id','info_extra_name'),
63
+		'pk' => array('info_id', 'info_extra_name'),
64 64
 		'fk' => array(),
65 65
 		'ix' => array(),
66 66
 		'uc' => array()
Please login to merge, or discard this patch.
infolog/setup/tables_update.inc.php 1 patch
Spacing   +209 added lines, -209 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@  discard block
 block discarded – undo
13 13
 
14 14
 function infolog_upgrade0_9_11()
15 15
 {
16
-	$GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_infolog','info_datecreated','info_datemodified');
17
-	$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog','info_event_id',array(
16
+	$GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_infolog', 'info_datecreated', 'info_datemodified');
17
+	$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog', 'info_event_id', array(
18 18
 		'type' => 'int',
19 19
 		'precision' => '4',
20 20
 		'default' => '0',
@@ -27,16 +27,16 @@  discard block
 block discarded – undo
27 27
 
28 28
 function infolog_upgrade0_9_15_001()
29 29
 {
30
-	$GLOBALS['egw_setup']->oProc->CreateTable('phpgw_links',array(
30
+	$GLOBALS['egw_setup']->oProc->CreateTable('phpgw_links', array(
31 31
 		'fd' => array(
32
-			'link_id' => array('type' => 'auto','nullable' => False),
33
-			'link_app1' => array('type' => 'varchar','precision' => '25','nullable' => False),
34
-			'link_id1' => array('type' => 'varchar','precision' => '50','nullable' => False),
35
-			'link_app2' => array('type' => 'varchar','precision' => '25','nullable' => False),
36
-			'link_id2' => array('type' => 'varchar','precision' => '50','nullable' => False),
37
-			'link_remark' => array('type' => 'varchar','precision' => '50','nullable' => True),
38
-			'link_lastmod' => array('type' => 'int','precision' => '4','nullable' => False),
39
-			'link_owner' => array('type' => 'int','precision' => '4','nullable' => False)
32
+			'link_id' => array('type' => 'auto', 'nullable' => False),
33
+			'link_app1' => array('type' => 'varchar', 'precision' => '25', 'nullable' => False),
34
+			'link_id1' => array('type' => 'varchar', 'precision' => '50', 'nullable' => False),
35
+			'link_app2' => array('type' => 'varchar', 'precision' => '25', 'nullable' => False),
36
+			'link_id2' => array('type' => 'varchar', 'precision' => '50', 'nullable' => False),
37
+			'link_remark' => array('type' => 'varchar', 'precision' => '50', 'nullable' => True),
38
+			'link_lastmod' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
39
+			'link_owner' => array('type' => 'int', 'precision' => '4', 'nullable' => False)
40 40
 		),
41 41
 		'pk' => array('link_id'),
42 42
 		'fk' => array(),
@@ -62,90 +62,90 @@  discard block
 block discarded – undo
62 62
 	//echo "<p>copying calendar-links: $insert.$select</p>\n";
63 63
 	$GLOBALS['egw_setup']->oProc->query($insert.$select3);
64 64
 
65
-	$GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog',array(
65
+	$GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog', array(
66 66
 		'fd' => array(
67
-			'info_id' => array('type' => 'auto','nullable' => False),
68
-			'info_type' => array('type' => 'varchar','precision' => '255','default' => 'task','nullable' => False),
69
-			'info_proj_id' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
70
-			'info_from' => array('type' => 'varchar','precision' => '64','nullable' => True),
71
-			'info_addr' => array('type' => 'varchar','precision' => '64','nullable' => True),
72
-			'info_subject' => array('type' => 'varchar','precision' => '64','nullable' => True),
73
-			'info_des' => array('type' => 'text','nullable' => True),
74
-			'info_owner' => array('type' => 'int','precision' => '4','nullable' => False),
75
-			'info_responsible' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
76
-			'info_access' => array('type' => 'varchar','precision' => '10','nullable' => True,'default' => 'public'),
77
-			'info_cat' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
78
-			'info_datemodified' => array('type' => 'int','precision' => '4','nullable' => False),
79
-			'info_startdate' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
80
-			'info_enddate' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
81
-			'info_id_parent' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
82
-			'info_pri' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'normal'),
83
-			'info_time' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
84
-			'info_bill_cat' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
85
-			'info_status' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'done'),
86
-			'info_confirm' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'not'),
87
-			'info_event_id' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False)
67
+			'info_id' => array('type' => 'auto', 'nullable' => False),
68
+			'info_type' => array('type' => 'varchar', 'precision' => '255', 'default' => 'task', 'nullable' => False),
69
+			'info_proj_id' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
70
+			'info_from' => array('type' => 'varchar', 'precision' => '64', 'nullable' => True),
71
+			'info_addr' => array('type' => 'varchar', 'precision' => '64', 'nullable' => True),
72
+			'info_subject' => array('type' => 'varchar', 'precision' => '64', 'nullable' => True),
73
+			'info_des' => array('type' => 'text', 'nullable' => True),
74
+			'info_owner' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
75
+			'info_responsible' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
76
+			'info_access' => array('type' => 'varchar', 'precision' => '10', 'nullable' => True, 'default' => 'public'),
77
+			'info_cat' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
78
+			'info_datemodified' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
79
+			'info_startdate' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
80
+			'info_enddate' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
81
+			'info_id_parent' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
82
+			'info_pri' => array('type' => 'varchar', 'precision' => '255', 'nullable' => True, 'default' => 'normal'),
83
+			'info_time' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
84
+			'info_bill_cat' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
85
+			'info_status' => array('type' => 'varchar', 'precision' => '255', 'nullable' => True, 'default' => 'done'),
86
+			'info_confirm' => array('type' => 'varchar', 'precision' => '255', 'nullable' => True, 'default' => 'not'),
87
+			'info_event_id' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False)
88 88
 		),
89 89
 		'pk' => array('info_id'),
90 90
 		'fk' => array(),
91 91
 		'ix' => array(),
92 92
 		'uc' => array()
93
-	),'info_addr_id');
94
-	$GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog',array(
93
+	), 'info_addr_id');
94
+	$GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog', array(
95 95
 		'fd' => array(
96
-			'info_id' => array('type' => 'auto','nullable' => False),
97
-			'info_type' => array('type' => 'varchar','precision' => '255','default' => 'task','nullable' => False),
98
-			'info_from' => array('type' => 'varchar','precision' => '64','nullable' => True),
99
-			'info_addr' => array('type' => 'varchar','precision' => '64','nullable' => True),
100
-			'info_subject' => array('type' => 'varchar','precision' => '64','nullable' => True),
101
-			'info_des' => array('type' => 'text','nullable' => True),
102
-			'info_owner' => array('type' => 'int','precision' => '4','nullable' => False),
103
-			'info_responsible' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
104
-			'info_access' => array('type' => 'varchar','precision' => '10','nullable' => True,'default' => 'public'),
105
-			'info_cat' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
106
-			'info_datemodified' => array('type' => 'int','precision' => '4','nullable' => False),
107
-			'info_startdate' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
108
-			'info_enddate' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
109
-			'info_id_parent' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
110
-			'info_pri' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'normal'),
111
-			'info_time' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
112
-			'info_bill_cat' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
113
-			'info_status' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'done'),
114
-			'info_confirm' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'not'),
115
-			'info_event_id' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False)
96
+			'info_id' => array('type' => 'auto', 'nullable' => False),
97
+			'info_type' => array('type' => 'varchar', 'precision' => '255', 'default' => 'task', 'nullable' => False),
98
+			'info_from' => array('type' => 'varchar', 'precision' => '64', 'nullable' => True),
99
+			'info_addr' => array('type' => 'varchar', 'precision' => '64', 'nullable' => True),
100
+			'info_subject' => array('type' => 'varchar', 'precision' => '64', 'nullable' => True),
101
+			'info_des' => array('type' => 'text', 'nullable' => True),
102
+			'info_owner' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
103
+			'info_responsible' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
104
+			'info_access' => array('type' => 'varchar', 'precision' => '10', 'nullable' => True, 'default' => 'public'),
105
+			'info_cat' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
106
+			'info_datemodified' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
107
+			'info_startdate' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
108
+			'info_enddate' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
109
+			'info_id_parent' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
110
+			'info_pri' => array('type' => 'varchar', 'precision' => '255', 'nullable' => True, 'default' => 'normal'),
111
+			'info_time' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
112
+			'info_bill_cat' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
113
+			'info_status' => array('type' => 'varchar', 'precision' => '255', 'nullable' => True, 'default' => 'done'),
114
+			'info_confirm' => array('type' => 'varchar', 'precision' => '255', 'nullable' => True, 'default' => 'not'),
115
+			'info_event_id' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False)
116 116
 		),
117 117
 		'pk' => array('info_id'),
118 118
 		'fk' => array(),
119 119
 		'ix' => array(),
120 120
 		'uc' => array()
121
-	),'info_proj_id');
122
-	$GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog',array(
121
+	), 'info_proj_id');
122
+	$GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog', array(
123 123
 		'fd' => array(
124
-			'info_id' => array('type' => 'auto','nullable' => False),
125
-			'info_type' => array('type' => 'varchar','precision' => '255','default' => 'task','nullable' => False),
126
-			'info_from' => array('type' => 'varchar','precision' => '64','nullable' => True),
127
-			'info_addr' => array('type' => 'varchar','precision' => '64','nullable' => True),
128
-			'info_subject' => array('type' => 'varchar','precision' => '64','nullable' => True),
129
-			'info_des' => array('type' => 'text','nullable' => True),
130
-			'info_owner' => array('type' => 'int','precision' => '4','nullable' => False),
131
-			'info_responsible' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
132
-			'info_access' => array('type' => 'varchar','precision' => '10','nullable' => True,'default' => 'public'),
133
-			'info_cat' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
134
-			'info_datemodified' => array('type' => 'int','precision' => '4','nullable' => False),
135
-			'info_startdate' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
136
-			'info_enddate' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
137
-			'info_id_parent' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
138
-			'info_pri' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'normal'),
139
-			'info_time' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
140
-			'info_bill_cat' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
141
-			'info_status' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'done'),
142
-			'info_confirm' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'not')
124
+			'info_id' => array('type' => 'auto', 'nullable' => False),
125
+			'info_type' => array('type' => 'varchar', 'precision' => '255', 'default' => 'task', 'nullable' => False),
126
+			'info_from' => array('type' => 'varchar', 'precision' => '64', 'nullable' => True),
127
+			'info_addr' => array('type' => 'varchar', 'precision' => '64', 'nullable' => True),
128
+			'info_subject' => array('type' => 'varchar', 'precision' => '64', 'nullable' => True),
129
+			'info_des' => array('type' => 'text', 'nullable' => True),
130
+			'info_owner' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
131
+			'info_responsible' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
132
+			'info_access' => array('type' => 'varchar', 'precision' => '10', 'nullable' => True, 'default' => 'public'),
133
+			'info_cat' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
134
+			'info_datemodified' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
135
+			'info_startdate' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
136
+			'info_enddate' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
137
+			'info_id_parent' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
138
+			'info_pri' => array('type' => 'varchar', 'precision' => '255', 'nullable' => True, 'default' => 'normal'),
139
+			'info_time' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
140
+			'info_bill_cat' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'nullable' => False),
141
+			'info_status' => array('type' => 'varchar', 'precision' => '255', 'nullable' => True, 'default' => 'done'),
142
+			'info_confirm' => array('type' => 'varchar', 'precision' => '255', 'nullable' => True, 'default' => 'not')
143 143
 		),
144 144
 		'pk' => array('info_id'),
145 145
 		'fk' => array(),
146 146
 		'ix' => array(),
147 147
 		'uc' => array()
148
-	),'info_event_id');
148
+	), 'info_event_id');
149 149
 
150 150
 	return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.003';
151 151
 }
@@ -153,37 +153,37 @@  discard block
 block discarded – undo
153 153
 
154 154
 function infolog_upgrade0_9_15_003()
155 155
 {
156
-	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_type',array(
156
+	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog', 'info_type', array(
157 157
 		'type' => 'varchar',
158 158
 		'precision' => '10',
159 159
 		'nullable' => False,
160 160
 		'default' => 'task'
161 161
 	));
162
-	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_pri',array(
162
+	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog', 'info_pri', array(
163 163
 		'type' => 'varchar',
164 164
 		'precision' => '10',
165 165
 		'nullable' => True,
166 166
 		'default' => 'normal'
167 167
 	));
168
-	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_status',array(
168
+	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog', 'info_status', array(
169 169
 		'type' => 'varchar',
170 170
 		'precision' => '10',
171 171
 		'nullable' => True,
172 172
 		'default' => 'done'
173 173
 	));
174
-	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_confirm',array(
174
+	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog', 'info_confirm', array(
175 175
 		'type' => 'varchar',
176 176
 		'precision' => '10',
177 177
 		'nullable' => True,
178 178
 		'default' => 'not'
179 179
 	));
180
-	$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog','info_modifier',array(
180
+	$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog', 'info_modifier', array(
181 181
 		'type' => 'int',
182 182
 		'precision' => '4',
183 183
 		'nullable' => False,
184 184
 		'default' => '0'
185 185
 	));
186
-	$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog','info_link_id',array(
186
+	$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog', 'info_link_id', array(
187 187
 		'type' => 'int',
188 188
 		'precision' => '4',
189 189
 		'nullable' => False,
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 		$links[$GLOBALS['egw_setup']->oProc->f(1)] = $GLOBALS['egw_setup']->oProc->f(0);
199 199
 	}
200 200
 	reset($links);
201
-	while (list($info_id,$link_id) = each($links))
201
+	while (list($info_id, $link_id) = each($links))
202 202
 	{
203 203
 		$GLOBALS['egw_setup']->oProc->query("UPDATE phpgw_infolog SET info_link_id=$link_id WHERE info_id=$info_id");
204 204
 	}
@@ -211,9 +211,9 @@  discard block
 block discarded – undo
211 211
 {
212 212
 	// this update correctes wrong escapes of ' and " in the past
213 213
 	//
214
-	$db2 = $GLOBALS['egw_setup']->db;	// we need a 2. result-set
214
+	$db2 = $GLOBALS['egw_setup']->db; // we need a 2. result-set
215 215
 
216
-	$to_correct = array('info_from','info_subject','info_des');
216
+	$to_correct = array('info_from', 'info_subject', 'info_des');
217 217
 	foreach ($to_correct as $col)
218 218
 	{
219 219
 		$GLOBALS['egw_setup']->oProc->query("SELECT info_id,$col FROM phpgw_infolog WHERE $col LIKE '%\\'%' OR $col LIKE '%\"%'");
@@ -230,13 +230,13 @@  discard block
 block discarded – undo
230 230
 
231 231
 function infolog_upgrade0_9_15_005()
232 232
 {
233
-	$GLOBALS['egw_setup']->oProc->CreateTable('phpgw_infolog_extra',array(
233
+	$GLOBALS['egw_setup']->oProc->CreateTable('phpgw_infolog_extra', array(
234 234
 		'fd' => array(
235
-			'info_id' => array('type' => 'int','precision' => '4','nullable' => False),
236
-			'info_extra_name' => array('type' => 'varchar','precision' => '32','nullable' => False),
237
-			'info_extra_value' => array('type' => 'varchar','precision' => '255','nullable' => False,'default' => '')
235
+			'info_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
236
+			'info_extra_name' => array('type' => 'varchar', 'precision' => '32', 'nullable' => False),
237
+			'info_extra_value' => array('type' => 'varchar', 'precision' => '255', 'nullable' => False, 'default' => '')
238 238
 		),
239
-		'pk' => array('info_id','info_extra_name'),
239
+		'pk' => array('info_id', 'info_extra_name'),
240 240
 		'fk' => array(),
241 241
 		'ix' => array(),
242 242
 		'uc' => array()
@@ -249,20 +249,20 @@  discard block
 block discarded – undo
249 249
 // the following series of updates add some indices, to speedup the selects
250 250
 function infolog_upgrade0_9_15_006()
251 251
 {
252
-	$GLOBALS['egw_setup']->oProc->RefreshTable('phpgw_links',array(
252
+	$GLOBALS['egw_setup']->oProc->RefreshTable('phpgw_links', array(
253 253
 		'fd' => array(
254
-			'link_id' => array('type' => 'auto','nullable' => False),
255
-			'link_app1' => array('type' => 'varchar','precision' => '25','nullable' => False),
256
-			'link_id1' => array('type' => 'varchar','precision' => '50','nullable' => False),
257
-			'link_app2' => array('type' => 'varchar','precision' => '25','nullable' => False),
258
-			'link_id2' => array('type' => 'varchar','precision' => '50','nullable' => False),
259
-			'link_remark' => array('type' => 'varchar','precision' => '50'),
260
-			'link_lastmod' => array('type' => 'int','precision' => '4','nullable' => False),
261
-			'link_owner' => array('type' => 'int','precision' => '4','nullable' => False)
254
+			'link_id' => array('type' => 'auto', 'nullable' => False),
255
+			'link_app1' => array('type' => 'varchar', 'precision' => '25', 'nullable' => False),
256
+			'link_id1' => array('type' => 'varchar', 'precision' => '50', 'nullable' => False),
257
+			'link_app2' => array('type' => 'varchar', 'precision' => '25', 'nullable' => False),
258
+			'link_id2' => array('type' => 'varchar', 'precision' => '50', 'nullable' => False),
259
+			'link_remark' => array('type' => 'varchar', 'precision' => '50'),
260
+			'link_lastmod' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
261
+			'link_owner' => array('type' => 'int', 'precision' => '4', 'nullable' => False)
262 262
 		),
263 263
 		'pk' => array('link_id'),
264 264
 		'fk' => array(),
265
-		'ix' => array(array('link_app1','link_id1','link_lastmod'),array('link_app2','link_id2','link_lastmod')),
265
+		'ix' => array(array('link_app1', 'link_id1', 'link_lastmod'), array('link_app2', 'link_id2', 'link_lastmod')),
266 266
 		'uc' => array()
267 267
 	));
268 268
 
@@ -272,33 +272,33 @@  discard block
 block discarded – undo
272 272
 
273 273
 function infolog_upgrade0_9_15_007()
274 274
 {
275
-	$GLOBALS['egw_setup']->oProc->RefreshTable('phpgw_infolog',array(
275
+	$GLOBALS['egw_setup']->oProc->RefreshTable('phpgw_infolog', array(
276 276
 		'fd' => array(
277
-			'info_id' => array('type' => 'auto','nullable' => False),
278
-			'info_type' => array('type' => 'varchar','precision' => '10','nullable' => False,'default' => 'task'),
279
-			'info_from' => array('type' => 'varchar','precision' => '64'),
280
-			'info_addr' => array('type' => 'varchar','precision' => '64'),
281
-			'info_subject' => array('type' => 'varchar','precision' => '64'),
277
+			'info_id' => array('type' => 'auto', 'nullable' => False),
278
+			'info_type' => array('type' => 'varchar', 'precision' => '10', 'nullable' => False, 'default' => 'task'),
279
+			'info_from' => array('type' => 'varchar', 'precision' => '64'),
280
+			'info_addr' => array('type' => 'varchar', 'precision' => '64'),
281
+			'info_subject' => array('type' => 'varchar', 'precision' => '64'),
282 282
 			'info_des' => array('type' => 'text'),
283
-			'info_owner' => array('type' => 'int','precision' => '4','nullable' => False),
284
-			'info_responsible' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
285
-			'info_access' => array('type' => 'varchar','precision' => '10','default' => 'public'),
286
-			'info_cat' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
287
-			'info_datemodified' => array('type' => 'int','precision' => '4','nullable' => False),
288
-			'info_startdate' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
289
-			'info_enddate' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
290
-			'info_id_parent' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
291
-			'info_pri' => array('type' => 'varchar','precision' => '10','default' => 'normal'),
292
-			'info_time' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
293
-			'info_bill_cat' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
294
-			'info_status' => array('type' => 'varchar','precision' => '10','default' => 'done'),
295
-			'info_confirm' => array('type' => 'varchar','precision' => '10','default' => 'not'),
296
-			'info_modifier' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
297
-			'info_link_id' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0')
283
+			'info_owner' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
284
+			'info_responsible' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
285
+			'info_access' => array('type' => 'varchar', 'precision' => '10', 'default' => 'public'),
286
+			'info_cat' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
287
+			'info_datemodified' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
288
+			'info_startdate' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
289
+			'info_enddate' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
290
+			'info_id_parent' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
291
+			'info_pri' => array('type' => 'varchar', 'precision' => '10', 'default' => 'normal'),
292
+			'info_time' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
293
+			'info_bill_cat' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
294
+			'info_status' => array('type' => 'varchar', 'precision' => '10', 'default' => 'done'),
295
+			'info_confirm' => array('type' => 'varchar', 'precision' => '10', 'default' => 'not'),
296
+			'info_modifier' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
297
+			'info_link_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0')
298 298
 		),
299 299
 		'pk' => array('info_id'),
300 300
 		'fk' => array(),
301
-		'ix' => array(array('info_owner','info_responsible','info_status','info_startdate'),array('info_id_parent','info_owner','info_responsible','info_status','info_startdate')),
301
+		'ix' => array(array('info_owner', 'info_responsible', 'info_status', 'info_startdate'), array('info_id_parent', 'info_owner', 'info_responsible', 'info_status', 'info_startdate')),
302 302
 		'uc' => array()
303 303
 	));
304 304
 
@@ -310,8 +310,8 @@  discard block
 block discarded – undo
310 310
 function infolog_upgrade0_9_15_008()
311 311
 {
312 312
 	// update the sequenzes for refreshed tables (postgres only)
313
-	$GLOBALS['egw_setup']->oProc->UpdateSequence('phpgw_infolog','info_id');
314
-	$GLOBALS['egw_setup']->oProc->UpdateSequence('phpgw_links','link_id');
313
+	$GLOBALS['egw_setup']->oProc->UpdateSequence('phpgw_infolog', 'info_id');
314
+	$GLOBALS['egw_setup']->oProc->UpdateSequence('phpgw_links', 'link_id');
315 315
 
316 316
 	return $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.0';
317 317
 }
@@ -320,25 +320,25 @@  discard block
 block discarded – undo
320 320
 function infolog_upgrade1_0_0()
321 321
 {
322 322
 	// longer columns to cope with multibyte charsets
323
-	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_type',array(
323
+	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog', 'info_type', array(
324 324
 		'type' => 'varchar',
325 325
 		'precision' => '40',
326 326
 		'nullable' => False,
327 327
 		'default' => 'task'
328 328
 	));
329
-	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_from',array(
329
+	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog', 'info_from', array(
330 330
 		'type' => 'varchar',
331 331
 		'precision' => '255'
332 332
 	));
333
-	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_addr',array(
333
+	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog', 'info_addr', array(
334 334
 		'type' => 'varchar',
335 335
 		'precision' => '255'
336 336
 	));
337
-	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_subject',array(
337
+	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog', 'info_subject', array(
338 338
 		'type' => 'varchar',
339 339
 		'precision' => '255'
340 340
 	));
341
-	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_status',array(
341
+	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog', 'info_status', array(
342 342
 		'type' => 'varchar',
343 343
 		'precision' => '40',
344 344
 		'default' => 'done'
@@ -350,21 +350,21 @@  discard block
 block discarded – undo
350 350
 
351 351
 function infolog_upgrade1_0_0_001()
352 352
 {
353
-	$GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_infolog','info_time','info_planned_time');
354
-	$GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_infolog','info_bill_cat','info_used_time');
353
+	$GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_infolog', 'info_time', 'info_planned_time');
354
+	$GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_infolog', 'info_bill_cat', 'info_used_time');
355 355
 	// timestamps have to be 8byte ints
356
-	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_datemodified',array(
356
+	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog', 'info_datemodified', array(
357 357
 		'type' => 'int',
358 358
 		'precision' => '8',
359 359
 		'nullable' => False
360 360
 	));
361
-	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_startdate',array(
361
+	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog', 'info_startdate', array(
362 362
 		'type' => 'int',
363 363
 		'precision' => '8',
364 364
 		'nullable' => False,
365 365
 		'default' => '0'
366 366
 	));
367
-	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_enddate',array(
367
+	$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog', 'info_enddate', array(
368 368
 		'type' => 'int',
369 369
 		'precision' => '8',
370 370
 		'nullable' => False,
@@ -372,49 +372,49 @@  discard block
 block discarded – undo
372 372
 	));
373 373
 
374 374
 	// setting numerical priority 3=urgent, 2=high, 1=normal, 0=
375
-	$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog','info_priority',array(
375
+	$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog', 'info_priority', array(
376 376
 		'type' => 'int',
377 377
 		'precision' => '2',
378 378
 		'default' => '1'
379 379
 	));
380
-	$GLOBALS['egw_setup']->oProc->query("UPDATE phpgw_infolog SET info_priority=(CASE WHEN info_pri='urgent' THEN 3 WHEN info_pri='high' THEN 2 WHEN info_pri='low' THEN 0 ELSE 1 END)",__LINE__,__FILE__);
380
+	$GLOBALS['egw_setup']->oProc->query("UPDATE phpgw_infolog SET info_priority=(CASE WHEN info_pri='urgent' THEN 3 WHEN info_pri='high' THEN 2 WHEN info_pri='low' THEN 0 ELSE 1 END)", __LINE__, __FILE__);
381 381
 
382
-	$GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog',array(
382
+	$GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog', array(
383 383
 		'fd' => array(
384
-			'info_id' => array('type' => 'auto','nullable' => False),
385
-			'info_type' => array('type' => 'varchar','precision' => '40','nullable' => False,'default' => 'task'),
386
-			'info_from' => array('type' => 'varchar','precision' => '255'),
387
-			'info_addr' => array('type' => 'varchar','precision' => '255'),
388
-			'info_subject' => array('type' => 'varchar','precision' => '255'),
384
+			'info_id' => array('type' => 'auto', 'nullable' => False),
385
+			'info_type' => array('type' => 'varchar', 'precision' => '40', 'nullable' => False, 'default' => 'task'),
386
+			'info_from' => array('type' => 'varchar', 'precision' => '255'),
387
+			'info_addr' => array('type' => 'varchar', 'precision' => '255'),
388
+			'info_subject' => array('type' => 'varchar', 'precision' => '255'),
389 389
 			'info_des' => array('type' => 'text'),
390
-			'info_owner' => array('type' => 'int','precision' => '4','nullable' => False),
391
-			'info_responsible' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
392
-			'info_access' => array('type' => 'varchar','precision' => '10','default' => 'public'),
393
-			'info_cat' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
394
-			'info_datemodified' => array('type' => 'int','precision' => '8','nullable' => False),
395
-			'info_startdate' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0'),
396
-			'info_enddate' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0'),
397
-			'info_id_parent' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
398
-			'info_planned_time' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
399
-			'info_used_time' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
400
-			'info_status' => array('type' => 'varchar','precision' => '40','default' => 'done'),
401
-			'info_confirm' => array('type' => 'varchar','precision' => '10','default' => 'not'),
402
-			'info_modifier' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
403
-			'info_link_id' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
404
-			'info_priority' => array('type' => 'int','precision' => '2','default' => '1')
390
+			'info_owner' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
391
+			'info_responsible' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
392
+			'info_access' => array('type' => 'varchar', 'precision' => '10', 'default' => 'public'),
393
+			'info_cat' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
394
+			'info_datemodified' => array('type' => 'int', 'precision' => '8', 'nullable' => False),
395
+			'info_startdate' => array('type' => 'int', 'precision' => '8', 'nullable' => False, 'default' => '0'),
396
+			'info_enddate' => array('type' => 'int', 'precision' => '8', 'nullable' => False, 'default' => '0'),
397
+			'info_id_parent' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
398
+			'info_planned_time' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
399
+			'info_used_time' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
400
+			'info_status' => array('type' => 'varchar', 'precision' => '40', 'default' => 'done'),
401
+			'info_confirm' => array('type' => 'varchar', 'precision' => '10', 'default' => 'not'),
402
+			'info_modifier' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
403
+			'info_link_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
404
+			'info_priority' => array('type' => 'int', 'precision' => '2', 'default' => '1')
405 405
 		),
406 406
 		'pk' => array('info_id'),
407 407
 		'fk' => array(),
408
-		'ix' => array(array('info_owner','info_responsible','info_status','info_startdate'),array('info_id_parent','info_owner','info_responsible','info_status','info_startdate')),
408
+		'ix' => array(array('info_owner', 'info_responsible', 'info_status', 'info_startdate'), array('info_id_parent', 'info_owner', 'info_responsible', 'info_status', 'info_startdate')),
409 409
 		'uc' => array()
410
-	),'info_pri');
410
+	), 'info_pri');
411 411
 
412
-	$GLOBALS['egw_setup']->oProc->RenameTable('phpgw_infolog','egw_infolog');
413
-	$GLOBALS['egw_setup']->oProc->RenameTable('phpgw_infolog_extra','egw_infolog_extra');
412
+	$GLOBALS['egw_setup']->oProc->RenameTable('phpgw_infolog', 'egw_infolog');
413
+	$GLOBALS['egw_setup']->oProc->RenameTable('phpgw_infolog_extra', 'egw_infolog_extra');
414 414
 	// only rename links table, if it has not been moved into the API and therefor been already renamed by the API update
415 415
 	if ($GLOBALS['egw_setup']->oProc->GetTableDefinition('phpgw_links'))
416 416
 	{
417
-		$GLOBALS['egw_setup']->oProc->RenameTable('phpgw_links','egw_links');
417
+		$GLOBALS['egw_setup']->oProc->RenameTable('phpgw_links', 'egw_links');
418 418
 	}
419 419
 
420 420
 	return $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.1.001';
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 
424 424
 function infolog_upgrade1_0_1_001()
425 425
 {
426
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog','info_responsible',array(
426
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog', 'info_responsible', array(
427 427
 		'type' => 'varchar',
428 428
 		'precision' => '255',
429 429
 		'nullable' => False,
@@ -442,12 +442,12 @@  discard block
 block discarded – undo
442 442
 
443 443
 function infolog_upgrade1_2()
444 444
 {
445
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','pl_id',array(
445
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'pl_id', array(
446 446
 		'type' => 'int',
447 447
 		'precision' => '4'
448 448
 	));
449 449
 
450
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_price',array(
450
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'info_price', array(
451 451
 		'type' => 'float',
452 452
 		'precision' => '8'
453 453
 	));
@@ -458,38 +458,38 @@  discard block
 block discarded – undo
458 458
 
459 459
 function infolog_upgrade1_2_001()
460 460
 {
461
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_percent',array(
461
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'info_percent', array(
462 462
 		'type' => 'int',
463 463
 		'precision' => '2',
464 464
 		'default' => '0'
465 465
 	));
466
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_datecompleted',array(
466
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'info_datecompleted', array(
467 467
 		'type' => 'int',
468 468
 		'precision' => '8'
469 469
 	));
470
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_location',array(
470
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'info_location', array(
471 471
 		'type' => 'varchar',
472 472
 		'precision' => '255'
473 473
 	));
474 474
 
475 475
 	// all not explicit named stati have the default percent 0
476
-	$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_percent=10 WHERE info_status='ongoing'",__LINE__,__FILE__);
477
-	$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_percent=50 WHERE info_status='will-call'",__LINE__,__FILE__);
476
+	$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_percent=10 WHERE info_status='ongoing'", __LINE__, __FILE__);
477
+	$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_percent=50 WHERE info_status='will-call'", __LINE__, __FILE__);
478 478
 
479
-	for($p = 0; $p <= 90; $p += 10)
479
+	for ($p = 0; $p <= 90; $p += 10)
480 480
 	{
481 481
 		$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_percent=$p,info_status='".(!$p ? 'not-started' : 'ongoing').
482
-			"' WHERE info_status = '$p%'",__LINE__,__FILE__);
482
+			"' WHERE info_status = '$p%'", __LINE__, __FILE__);
483 483
 	}
484
-	$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_datecompleted=info_datemodified,info_percent=100 WHERE info_status IN ('done','billed','100%')",__LINE__,__FILE__);
484
+	$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_datecompleted=info_datemodified,info_percent=100 WHERE info_status IN ('done','billed','100%')", __LINE__, __FILE__);
485 485
 
486 486
 	// remove the percentages from the custom stati, if they exist
487
-	$config =& CreateObject('phpgwapi.config','infolog');
487
+	$config = & CreateObject('phpgwapi.config', 'infolog');
488 488
 	$config->read_repository();
489 489
 	if (is_array($config->config_data['status']['task']))
490 490
 	{
491 491
 		$config->config_data['status']['task'] = array_diff($config->config_data['status']['task'],
492
-			array('0%','10%','20%','30%','40%','50%','60%','70%','80%','90%','100%'));
492
+			array('0%', '10%', '20%', '30%', '40%', '50%', '60%', '70%', '80%', '90%', '100%'));
493 493
 		$config->save_repository();
494 494
 	}
495 495
 	return $GLOBALS['setup_info']['infolog']['currentver'] = '1.2.002';
@@ -499,11 +499,11 @@  discard block
 block discarded – undo
499 499
 function infolog_upgrade1_2_002()
500 500
 {
501 501
 	// change the phone-status: call --> not-started, will-call --> ongoing to be able to sync them
502
-	$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_status='not-started' WHERE info_status='call'",__LINE__,__FILE__);
503
-	$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_status='ongoing' WHERE info_status='will-call'",__LINE__,__FILE__);
502
+	$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_status='not-started' WHERE info_status='call'", __LINE__, __FILE__);
503
+	$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_status='ongoing' WHERE info_status='will-call'", __LINE__, __FILE__);
504 504
 
505 505
 	// remove the call and will-call from the custom stati, if they exist
506
-	$config =& CreateObject('phpgwapi.config','infolog');
506
+	$config = & CreateObject('phpgwapi.config', 'infolog');
507 507
 	$config->read_repository();
508 508
 	if (is_array($config->config_data['status']['phone']))
509 509
 	{
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 function infolog_upgrade1_2_003()
520 520
 {
521 521
 	// fix wrong info_responsible='' --> '0'
522
-	$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_responsible='0' WHERE info_responsible=''",__LINE__,__FILE__);
522
+	$GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_responsible='0' WHERE info_responsible=''", __LINE__, __FILE__);
523 523
 
524 524
 	return $GLOBALS['setup_info']['infolog']['currentver'] = '1.2.004';
525 525
 }
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
 function infolog_upgrade1_2_004()
529 529
 {
530 530
 	// column to save if from contains a custom text
531
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_custom_from',array(
531
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'info_custom_from', array(
532 532
 		'type' => 'int',
533 533
 		'precision' => '1',
534 534
 	));
@@ -545,13 +545,13 @@  discard block
 block discarded – undo
545 545
 
546 546
 function infolog_upgrade1_4()
547 547
 {
548
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_uid',array(
548
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'info_uid', array(
549 549
 		'type' => 'varchar',
550 550
 		'precision' => '255'
551 551
 	));
552
-	$GLOBALS['egw_setup']->db->query("SELECT config_value FROM egw_config WHERE config_app='phpgwapi' AND config_name='install_id'",__LINE__,__FILE__);
552
+	$GLOBALS['egw_setup']->db->query("SELECT config_value FROM egw_config WHERE config_app='phpgwapi' AND config_name='install_id'", __LINE__, __FILE__);
553 553
 	$install_id = $GLOBALS['egw_setup']->db->next_record() ? $GLOBALS['egw_setup']->db->f(0) : md5(time());
554
-	$GLOBALS['egw_setup']->db->query('UPDATE egw_infolog SET info_uid='.$GLOBALS['egw_setup']->db->concat("'infolog-'",'info_id',"'-$install_id'"),__LINE__,__FILE__);
554
+	$GLOBALS['egw_setup']->db->query('UPDATE egw_infolog SET info_uid='.$GLOBALS['egw_setup']->db->concat("'infolog-'", 'info_id', "'-$install_id'"), __LINE__, __FILE__);
555 555
 
556 556
 	return $GLOBALS['setup_info']['infolog']['currentver'] = '1.5.001';
557 557
 }
@@ -564,17 +564,17 @@  discard block
 block discarded – undo
564 564
  */
565 565
 function infolog_upgrade1_5_001()
566 566
 {
567
-	foreach($GLOBALS['egw_setup']->db->select('egw_infolog','info_id,info_link_id,org_name,adr_one_locality,n_family,n_given',array(
567
+	foreach ($GLOBALS['egw_setup']->db->select('egw_infolog', 'info_id,info_link_id,org_name,adr_one_locality,n_family,n_given', array(
568 568
 		'info_from' => '',
569 569
 		'info_link_id > 0',
570
-	),__LINE__,__FILE__,false,'','infolog',0,
570
+	), __LINE__, __FILE__, false, '', 'infolog', 0,
571 571
 	" JOIN egw_links ON info_link_id=link_id AND link_app2='addressbook'".
572 572
 	" JOIN egw_addressbook ON contact_id=link_id2") as $row)
573 573
 	{
574 574
 		$from = ($row['org_name'] ? $row['org_name'].', '.$row['adr_one_locality'].': ' : '').
575 575
 			$row['n_family'].($row['n_given'] ? ', '.$row['n_given'] : '');
576
-		$GLOBALS['egw_setup']->db->update('egw_infolog',array('info_from' => $from),
577
-			array('info_id' => $row['info_id']),__LINE__,__FILE__,'infolog');
576
+		$GLOBALS['egw_setup']->db->update('egw_infolog', array('info_from' => $from),
577
+			array('info_id' => $row['info_id']), __LINE__, __FILE__, 'infolog');
578 578
 	}
579 579
 	return $GLOBALS['setup_info']['infolog']['currentver'] = '1.5.002';
580 580
 }
@@ -587,12 +587,12 @@  discard block
 block discarded – undo
587 587
  */
588 588
 function infolog_upgrade1_5_002()
589 589
 {
590
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog_extra','info_extra_name',array(
590
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog_extra', 'info_extra_name', array(
591 591
 		'type' => 'varchar',
592 592
 		'precision' => '64',
593 593
 		'nullable' => False
594 594
 	));
595
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog_extra','info_extra_value',array(
595
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog_extra', 'info_extra_value', array(
596 596
 		'type' => 'text',
597 597
 		'nullable' => False
598 598
 	));
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
  */
609 609
 function infolog_upgrade1_5_003()
610 610
 {
611
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_replanned_time',array(
611
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'info_replanned_time', array(
612 612
 		'type' => 'int',
613 613
 		'precision' => '4',
614 614
 		'nullable' => False,
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 
638 638
 function infolog_upgrade1_8()
639 639
 {
640
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_cc',array(
640
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'info_cc', array(
641 641
 		'type' => 'varchar',
642 642
 		'precision' => '255'
643 643
 	));
@@ -651,29 +651,29 @@  discard block
 block discarded – undo
651 651
  */
652 652
 function infolog_upgrade1_9_001()
653 653
 {
654
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','caldav_name',array(
654
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'caldav_name', array(
655 655
 		'type' => 'varchar',
656 656
 		'precision' => '64',
657 657
 		'comment' => 'name part of CalDAV URL, if specified by client'
658 658
 	));
659 659
 	$GLOBALS['egw_setup']->db->query('UPDATE egw_infolog SET caldav_name='.
660 660
 		$GLOBALS['egw_setup']->db->concat(
661
-			$GLOBALS['egw_setup']->db->to_varchar('info_id'),"'.ics'"),__LINE__,__FILE__);
661
+			$GLOBALS['egw_setup']->db->to_varchar('info_id'), "'.ics'"), __LINE__, __FILE__);
662 662
 
663
-	$GLOBALS['egw_setup']->oProc->CreateIndex('egw_infolog','caldav_name');
663
+	$GLOBALS['egw_setup']->oProc->CreateIndex('egw_infolog', 'caldav_name');
664 664
 
665
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_etag',array(
665
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'info_etag', array(
666 666
 		'type' => 'int',
667 667
 		'precision' => '4',
668 668
 		'default' => '0',
669 669
 		'comment' => 'etag, not yet used'
670 670
 	));
671 671
 
672
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_created',array(
672
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'info_created', array(
673 673
 		'type' => 'int',
674 674
 		'precision' => '8',
675 675
 	));
676
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_creator',array(
676
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog', 'info_creator', array(
677 677
 		'type' => 'int',
678 678
 		'precision' => '4',
679 679
 	));
@@ -688,18 +688,18 @@  discard block
 block discarded – undo
688 688
 function infolog_upgrade1_9_002()
689 689
 {
690 690
 	$ids = array();
691
-	foreach($GLOBALS['egw_setup']->db->query('SELECT sub.info_id
691
+	foreach ($GLOBALS['egw_setup']->db->query('SELECT sub.info_id
692 692
 FROM egw_infolog sub
693 693
 JOIN egw_infolog parent ON sub.info_id_parent=parent.info_id
694
-WHERE parent.caldav_name=sub.caldav_name',__LINE__,__FILE__) as $row)
694
+WHERE parent.caldav_name=sub.caldav_name',__LINE__, __FILE__) as $row)
695 695
 	{
696 696
 		$ids[] = $row['info_id'];
697 697
 	}
698 698
 	if ($ids)
699 699
 	{
700 700
 		$GLOBALS['egw_setup']->db->query('UPDATE egw_infolog SET caldav_name='.
701
-			$GLOBALS['egw_setup']->db->concat('info_id',"'.ics'").
702
-			' WHERE info_id IN ('.implode(',',$ids).')',__LINE__,__FILE__);
701
+			$GLOBALS['egw_setup']->db->concat('info_id', "'.ics'").
702
+			' WHERE info_id IN ('.implode(',', $ids).')', __LINE__, __FILE__);
703 703
 	}
704 704
 	return $GLOBALS['setup_info']['infolog']['currentver'] = '1.9.003';
705 705
 }
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
 
708 708
 function infolog_upgrade1_9_003()
709 709
 {
710
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog','caldav_name',array(
710
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog', 'caldav_name', array(
711 711
 		'type' => 'varchar',
712 712
 		'precision' => '200',
713 713
 		'comment' => 'name part of CalDAV URL, if specified by client'
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
 }
753 753
 function infolog_upgrade14_2()
754 754
 {
755
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog','info_responsible',array(
755
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog', 'info_responsible', array(
756 756
 		'type' => 'ascii',
757 757
 		'meta' => 'account-commasep',
758 758
 		'precision' => '255',
@@ -760,23 +760,23 @@  discard block
 block discarded – undo
760 760
 		'default' => '0',
761 761
 		'comment' => 'responsible users or groups (multiple)'
762 762
 	));
763
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog','info_access',array(
763
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog', 'info_access', array(
764 764
 		'type' => 'ascii',
765 765
 		'precision' => '10',
766 766
 		'default' => 'public',
767 767
 		'comment' => 'public or privat'
768 768
 	));
769
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog','info_confirm',array(
769
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog', 'info_confirm', array(
770 770
 		'type' => 'ascii',
771 771
 		'precision' => '10',
772 772
 		'default' => 'not'
773 773
 	));
774
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog','info_uid',array(
774
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog', 'info_uid', array(
775 775
 		'type' => 'ascii',
776 776
 		'precision' => '128',
777 777
 		'comment' => 'unique id of the infolog-entry'
778 778
 	));
779
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog','caldav_name',array(
779
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog', 'caldav_name', array(
780 780
 		'type' => 'ascii',
781 781
 		'precision' => '128',
782 782
 		'comment' => 'name part of CalDAV URL, if specified by client'
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
 
789 789
 function infolog_upgrade14_2_001()
790 790
 {
791
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog_extra','info_extra_value',array(
791
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog_extra', 'info_extra_value', array(
792 792
 		'type' => 'varchar',
793 793
 		'meta' => 'cfvalue',
794 794
 		'precision' => '16384',
Please login to merge, or discard this patch.
infolog/inc/class.infolog_import_ical.inc.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
  * import ical for infolog
16 16
  * Not a lot of options for this, just uses the ical class
17 17
  */
18
-class infolog_import_ical implements importexport_iface_import_plugin  {
18
+class infolog_import_ical implements importexport_iface_import_plugin {
19 19
 
20 20
 	private static $plugin_options = array(
21
-		'conditions',		/* => array containing condition arrays:
21
+		'conditions', /* => array containing condition arrays:
22 22
 				'type' => exists, // exists
23 23
 				'string' => '#kundennummer',
24 24
 				'true' => array(
@@ -79,19 +79,19 @@  discard block
 block discarded – undo
79 79
 	 * @param string $_charset
80 80
 	 * @param definition $_definition
81 81
 	 */
82
-	public function import( $_stream, importexport_definition $_definition ) {
82
+	public function import($_stream, importexport_definition $_definition) {
83 83
 
84 84
 		$this->definition = $_definition;
85 85
 
86 86
 		// dry run?
87
-		$this->dry_run = isset( $_definition->plugin_options['dry_run'] ) ? $_definition->plugin_options['dry_run'] :  false;
87
+		$this->dry_run = isset($_definition->plugin_options['dry_run']) ? $_definition->plugin_options['dry_run'] : false;
88 88
 
89 89
 		$success = 0;
90 90
 
91 91
 		// Failures
92 92
 		$this->errors = array();
93 93
 
94
-		@set_time_limit(0);     // try switching execution time limit off
94
+		@set_time_limit(0); // try switching execution time limit off
95 95
 
96 96
 		$infolog_ical = new infolog_ical();
97 97
 		if (!$infolog_ical->importVTODO(stream_get_contents($_stream)))
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,8 +104,7 @@
 block discarded – undo
104 104
 	/**
105 105
 	 * imports entries according to given definition object.
106 106
 	 * @param resource $_stream
107
-	 * @param string $_charset
108
-	 * @param definition $_definition
107
+	 * @param importexport_definition $_definition
109 108
 	 */
110 109
 	public function import( $_stream, importexport_definition $_definition ) {
111 110
 		$import_csv = new importexport_import_csv( $_stream, array(
Please login to merge, or discard this patch.
Braces   +20 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,7 +15,8 @@  discard block
 block discarded – undo
15 15
  * import ical for infolog
16 16
  * Not a lot of options for this, just uses the ical class
17 17
  */
18
-class infolog_import_ical implements importexport_iface_import_plugin  {
18
+class infolog_import_ical implements importexport_iface_import_plugin
19
+{
19 20
 
20 21
 	private static $plugin_options = array(
21 22
 		'conditions',		/* => array containing condition arrays:
@@ -79,7 +80,8 @@  discard block
 block discarded – undo
79 80
 	 * @param string $_charset
80 81
 	 * @param definition $_definition
81 82
 	 */
82
-	public function import( $_stream, importexport_definition $_definition ) {
83
+	public function import( $_stream, importexport_definition $_definition )
84
+	{
83 85
 
84 86
 		$this->definition = $_definition;
85 87
 
@@ -113,7 +115,8 @@  discard block
 block discarded – undo
113 115
 	 *
114 116
 	 * @return string name
115 117
 	 */
116
-	public static function get_name() {
118
+	public static function get_name()
119
+	{
117 120
 		return lang('Infolog iCal import');
118 121
 	}
119 122
 
@@ -122,7 +125,8 @@  discard block
 block discarded – undo
122 125
 	 *
123 126
 	 * @return string descriprion
124 127
 	 */
125
-	public static function get_description() {
128
+	public static function get_description()
129
+	{
126 130
 		return lang("Imports TODOs into Infolog from an iCal File.");
127 131
 	}
128 132
 
@@ -131,7 +135,8 @@  discard block
 block discarded – undo
131 135
 	 *
132 136
 	 * @return string suffix (comma seperated)
133 137
 	 */
134
-	public static function get_filesuffix() {
138
+	public static function get_filesuffix()
139
+	{
135 140
 		return 'ics';
136 141
 	}
137 142
 
@@ -147,7 +152,8 @@  discard block
 block discarded – undo
147 152
 	 * 		preserv		=> array,
148 153
 	 * )
149 154
 	 */
150
-	public function get_options_etpl() {
155
+	public function get_options_etpl()
156
+	{
151 157
 		// lets do it!
152 158
 	}
153 159
 
@@ -156,7 +162,8 @@  discard block
 block discarded – undo
156 162
 	 *
157 163
 	 * @return string etemplate name
158 164
 	 */
159
-	public function get_selectors_etpl() {
165
+	public function get_selectors_etpl()
166
+	{
160 167
 		// lets do it!
161 168
 	}
162 169
 
@@ -168,7 +175,8 @@  discard block
 block discarded – undo
168 175
 	 *       record_# => warning message
169 176
 	 *       )
170 177
 	 */
171
-	public function get_warnings() {
178
+	public function get_warnings()
179
+	{
172 180
 		return $this->warnings;
173 181
 	}
174 182
 
@@ -180,7 +188,8 @@  discard block
 block discarded – undo
180 188
 	 *       record_# => error message
181 189
 	 *       )
182 190
 	 */
183
-	public function get_errors() {
191
+	public function get_errors()
192
+	{
184 193
 		return $this->errors;
185 194
 	}
186 195
 
@@ -192,7 +201,8 @@  discard block
 block discarded – undo
192 201
 	 *       action => record count
193 202
 	 * )
194 203
 	 */
195
-	public function get_results() {
204
+	public function get_results()
205
+	{
196 206
 		return $this->results;
197 207
 	}
198 208
 }
Please login to merge, or discard this patch.
infolog/inc/class.infolog_widget.inc.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -79,17 +79,17 @@  discard block
 block discarded – undo
79 79
 
80 80
 	public function get_entry($value, array $attrs)
81 81
 	{
82
-		unset($attrs);	// not used
82
+		unset($attrs); // not used
83 83
 
84 84
 		// Already done
85
-		if (is_array($value) && !(array_key_exists('app',$value) && array_key_exists('id', $value))) return $value;
85
+		if (is_array($value) && !(array_key_exists('app', $value) && array_key_exists('id', $value))) return $value;
86 86
 
87 87
 		// Link entry, already in array format
88
-		if(is_array($value) && array_key_exists('app', $value) && array_key_exists('id', $value)) $value = $value['id'];
88
+		if (is_array($value) && array_key_exists('app', $value) && array_key_exists('id', $value)) $value = $value['id'];
89 89
 
90 90
 		// Link entry, in string format
91
-		if (substr($value,0,8) == 'infolog:') $value = substr($value,8);
92
-		if($value)
91
+		if (substr($value, 0, 8) == 'infolog:') $value = substr($value, 8);
92
+		if ($value)
93 93
 		{
94 94
 			return $this->infolog->read($value);
95 95
 		}
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 	function _get_fields()
100 100
 	{
101
-		static $fields=null;
101
+		static $fields = null;
102 102
 
103 103
 		if (!isset($fields))
104 104
 		{
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	//			'info_confirm' => lang('Confirm'),
136 136
 	//			'info_custom_from' => lang('Custom from'),
137 137
 			);
138
-			foreach(Api\Storage\Customfields::get('infolog') as $name => $data)
138
+			foreach (Api\Storage\Customfields::get('infolog') as $name => $data)
139 139
 			{
140 140
 				$fields['#'.$name] = lang($data['label']);
141 141
 			}
@@ -145,4 +145,4 @@  discard block
 block discarded – undo
145 145
 }
146 146
 
147 147
 // register widgets for etemplate2
148
-Etemplate\Widget::registerWidget('infolog_widget',array('infolog-value', 'infolog-fields'));
149 148
\ No newline at end of file
149
+Etemplate\Widget::registerWidget('infolog_widget', array('infolog-value', 'infolog-fields'));
150 150
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +12 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,13 +82,22 @@
 block discarded – undo
82 82
 		unset($attrs);	// not used
83 83
 
84 84
 		// Already done
85
-		if (is_array($value) && !(array_key_exists('app',$value) && array_key_exists('id', $value))) return $value;
85
+		if (is_array($value) && !(array_key_exists('app',$value) && array_key_exists('id', $value)))
86
+		{
87
+			return $value;
88
+		}
86 89
 
87 90
 		// Link entry, already in array format
88
-		if(is_array($value) && array_key_exists('app', $value) && array_key_exists('id', $value)) $value = $value['id'];
91
+		if(is_array($value) && array_key_exists('app', $value) && array_key_exists('id', $value))
92
+		{
93
+			$value = $value['id'];
94
+		}
89 95
 
90 96
 		// Link entry, in string format
91
-		if (substr($value,0,8) == 'infolog:') $value = substr($value,8);
97
+		if (substr($value,0,8) == 'infolog:')
98
+		{
99
+			$value = substr($value,8);
100
+		}
92 101
 		if($value)
93 102
 		{
94 103
 			return $this->infolog->read($value);
Please login to merge, or discard this patch.
infolog/inc/class.infolog_datasource.inc.php 2 patches
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		{
50 50
 			$GLOBALS['infolog_bo'] = new infolog_bo();
51 51
 		}
52
-		$this->infolog_bo =& $GLOBALS['infolog_bo'];
52
+		$this->infolog_bo = & $GLOBALS['infolog_bo'];
53 53
 	}
54 54
 
55 55
 	/**
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
 	{
63 63
 		if (!is_array($data_id))
64 64
 		{
65
-			$data =& $this->infolog_bo->read((int) $data_id);
65
+			$data = & $this->infolog_bo->read((int)$data_id);
66 66
 
67 67
 			if (!is_array($data)) return false;
68 68
 		}
69 69
 		else
70 70
 		{
71
-			$data =& $data_id;
71
+			$data = & $data_id;
72 72
 		}
73 73
 		return array(
74 74
 			'pe_title'        => $this->infolog_bo->link_title($data),
@@ -99,33 +99,33 @@  discard block
 block discarded – undo
99 99
 	 * @param array $extra =null data of target-project, atm not used by the infolog datasource
100 100
 	 * @return array/boolean array(info_id,link_id) on success, false otherwise
101 101
 	 */
102
-	function copy($element,$target,$extra=null)
102
+	function copy($element, $target, $extra = null)
103 103
 	{
104
-		unset($extra);	// not used, but required by function signature
104
+		unset($extra); // not used, but required by function signature
105 105
 
106
-		$info =& $this->infolog_bo->read((int) $element['pe_app_id']);
106
+		$info = & $this->infolog_bo->read((int)$element['pe_app_id']);
107 107
 
108 108
 		if (!is_array($info)) return false;
109 109
 
110 110
 		// unsetting info_link_id and evtl. info_from
111 111
 		if ($info['info_link_id'])
112 112
 		{
113
-			$this->infolog_bo->link_id2from($info);		// unsets info_from and sets info_link_target
113
+			$this->infolog_bo->link_id2from($info); // unsets info_from and sets info_link_target
114 114
 			unset($info['info_link_id']);
115 115
 		}
116 116
 		// we need to unset a view fields, to get a new entry
117
-		foreach(array('info_id','info_owner','info_modified','info_modifierer') as $key)
117
+		foreach (array('info_id', 'info_owner', 'info_modified', 'info_modifierer') as $key)
118 118
 		{
119 119
 			unset($info[$key]);
120 120
 		}
121
-		if(!($info['info_id'] = $this->infolog_bo->write($info))) return false;
121
+		if (!($info['info_id'] = $this->infolog_bo->write($info))) return false;
122 122
 
123 123
 		// link the new infolog against the project and setting info_link_id and evtl. info_from
124 124
 		$old_link = $info['info_link_id'] ? Link::get_link($info['info_link']) : $info['info_link'];
125
-		$info['info_link_id'] = Link::link('projectmanager',$target,'infolog',$info['info_id'],$element['pe_remark'],0,0,1);
125
+		$info['info_link_id'] = Link::link('projectmanager', $target, 'infolog', $info['info_id'], $element['pe_remark'], 0, 0, 1);
126 126
 		if (!$info['info_from'] || $old_link && $info['info_from'] == $old_link['title'])
127 127
 		{
128
-			$info['info_from'] = Link::title('projectmanager',$target);
128
+			$info['info_from'] = Link::title('projectmanager', $target);
129 129
 		}
130 130
 		if ($info['info_status'] == 'template')
131 131
 		{
@@ -134,22 +134,22 @@  discard block
 block discarded – undo
134 134
 		$this->infolog_bo->write($info);
135 135
 
136 136
 		// creating again all links, beside the one to the source-project
137
-		foreach(Link::get_links('infolog',$element['pe_app_id']) as $link)
137
+		foreach (Link::get_links('infolog', $element['pe_app_id']) as $link)
138 138
 		{
139
-			if ($link['app'] == 'projectmanager' && $link['id'] == $element['pm_id'] ||		// ignoring the source project
139
+			if ($link['app'] == 'projectmanager' && $link['id'] == $element['pm_id'] || // ignoring the source project
140 140
 				$link['app'] == Link::VFS_APPNAME)					// ignoring files attachments for now
141 141
 			{
142 142
 				continue;
143 143
 			}
144
-			Link::link('infolog',$info['info_id'],$link['app'],$link['id'],$link['remark']);
144
+			Link::link('infolog', $info['info_id'], $link['app'], $link['id'], $link['remark']);
145 145
 		}
146
-		$ret = array($info['info_id'],$info['info_link_id']);
146
+		$ret = array($info['info_id'], $info['info_link_id']);
147 147
 
148 148
 		// if we have a parent set, return our callback to modify the parent id, after all entries are copied
149 149
 		if ($info['info_id_parent'])
150 150
 		{
151
-			$ret[] = array($this,'copy_callback');	// callback
152
-			$ret[] = array($info['info_id'],$info['info_id_parent']);	// $param
151
+			$ret[] = array($this, 'copy_callback'); // callback
152
+			$ret[] = array($info['info_id'], $info['info_id_parent']); // $param
153 153
 		}
154 154
 		return $ret;
155 155
 	}
@@ -164,11 +164,11 @@  discard block
 block discarded – undo
164 164
 	public function copy_callback(array $param, array $apps_copied)
165 165
 	{
166 166
 		//error_log(__METHOD__."(".array2string($param).', '.array2string($apps_copied).')');
167
-		list($info_id,$parent_id) = $param;
167
+		list($info_id, $parent_id) = $param;
168 168
 		if (isset($apps_copied['infolog'][$parent_id]) && ($info = $this->infolog_bo->read($info_id)))
169 169
 		{
170 170
 			$info['info_id_parent'] = $apps_copied['infolog'][$parent_id];
171
-			$this->infolog_bo->write($info,false,true,true,true);	// no default and no notification
171
+			$this->infolog_bo->write($info, false, true, true, true); // no default and no notification
172 172
 		}
173 173
 	}
174 174
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 			$GLOBALS['infolog_bo'] = new infolog_bo();
187 187
 		}
188 188
 		// dont delete infolog, which are linked to other elements, but their project
189
-		if (count(Link::get_links('infolog',$id)) > 1)
189
+		if (count(Link::get_links('infolog', $id)) > 1)
190 190
 		{
191 191
 			return false;
192 192
 		}
@@ -200,16 +200,16 @@  discard block
 block discarded – undo
200 200
 	 * @param string $status
201 201
 	 * @return boolean true if status changed, false otherwise
202 202
 	 */
203
-	function change_status($id,$status)
203
+	function change_status($id, $status)
204 204
 	{
205 205
 		//error_log("datasource_infolog::change_status($id,$status)");
206
-		if (($info = $this->infolog_bo->read($id)) && $this->infolog_bo->check_access($info,Acl::EDIT))
206
+		if (($info = $this->infolog_bo->read($id)) && $this->infolog_bo->check_access($info, Acl::EDIT))
207 207
 		{
208
-			if ($status == 'active' && in_array($info['info_status'],array('template','nonactive','archive')))
208
+			if ($status == 'active' && in_array($info['info_status'], array('template', 'nonactive', 'archive')))
209 209
 			{
210 210
 				$status = $this->infolog_bo->activate($info);
211 211
 			}
212
-			if($info['info_status'] != $status && isset($this->infolog_bo->status[$info['info_type']][$status]))
212
+			if ($info['info_status'] != $status && isset($this->infolog_bo->status[$info['info_type']][$status]))
213 213
 			{
214 214
 				//error_log("datasource_infolog::change_status($id,$status) setting status from ".$info['info_status']);
215 215
 				$info['info_status'] = $status;
Please login to merge, or discard this patch.
Braces   +16 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,10 @@  discard block
 block discarded – undo
64 64
 		{
65 65
 			$data =& $this->infolog_bo->read((int) $data_id);
66 66
 
67
-			if (!is_array($data)) return false;
67
+			if (!is_array($data))
68
+			{
69
+				return false;
70
+			}
68 71
 		}
69 72
 		else
70 73
 		{
@@ -105,7 +108,10 @@  discard block
 block discarded – undo
105 108
 
106 109
 		$info =& $this->infolog_bo->read((int) $element['pe_app_id']);
107 110
 
108
-		if (!is_array($info)) return false;
111
+		if (!is_array($info))
112
+		{
113
+			return false;
114
+		}
109 115
 
110 116
 		// unsetting info_link_id and evtl. info_from
111 117
 		if ($info['info_link_id'])
@@ -118,7 +124,10 @@  discard block
 block discarded – undo
118 124
 		{
119 125
 			unset($info[$key]);
120 126
 		}
121
-		if(!($info['info_id'] = $this->infolog_bo->write($info))) return false;
127
+		if(!($info['info_id'] = $this->infolog_bo->write($info)))
128
+		{
129
+			return false;
130
+		}
122 131
 
123 132
 		// link the new infolog against the project and setting info_link_id and evtl. info_from
124 133
 		$old_link = $info['info_link_id'] ? Link::get_link($info['info_link']) : $info['info_link'];
@@ -137,10 +146,13 @@  discard block
 block discarded – undo
137 146
 		foreach(Link::get_links('infolog',$element['pe_app_id']) as $link)
138 147
 		{
139 148
 			if ($link['app'] == 'projectmanager' && $link['id'] == $element['pm_id'] ||		// ignoring the source project
140
-				$link['app'] == Link::VFS_APPNAME)					// ignoring files attachments for now
149
+				$link['app'] == Link::VFS_APPNAME)
150
+			{
151
+				// ignoring files attachments for now
141 152
 			{
142 153
 				continue;
143 154
 			}
155
+			}
144 156
 			Link::link('infolog',$info['info_id'],$link['app'],$link['id'],$link['remark']);
145 157
 		}
146 158
 		$ret = array($info['info_id'],$info['info_link_id']);
Please login to merge, or discard this patch.