Completed
Push — master ( aa44e9...fa84e5 )
by Ralf
90:14 queued 73:21
created
notifications/setup/tables_current.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@
 block discarded – undo
12 12
 $phpgw_baseline = array(
13 13
 	'egw_notificationpopup' => array(
14 14
 		'fd' => array(
15
-			'notify_id' => array('type' => 'auto','nullable' => False,'comment' => 'primary key'),
16
-			'account_id' => array('type' => 'int','meta' => 'user','precision' => '20','nullable' => False,'comment' => 'user to notify'),
17
-			'notify_message' => array('type' => 'varchar','precision' => '16384','comment' => 'notification message'),
18
-			'notify_created' => array('type' => 'timestamp','meta' => 'timestamp','default' => 'current_timestamp','comment' => 'creation time of notification'),
19
-			'notify_type' => array('type' => 'ascii','precision' => '32','comment' => 'notification type')
15
+			'notify_id' => array('type' => 'auto', 'nullable' => False, 'comment' => 'primary key'),
16
+			'account_id' => array('type' => 'int', 'meta' => 'user', 'precision' => '20', 'nullable' => False, 'comment' => 'user to notify'),
17
+			'notify_message' => array('type' => 'varchar', 'precision' => '16384', 'comment' => 'notification message'),
18
+			'notify_created' => array('type' => 'timestamp', 'meta' => 'timestamp', 'default' => 'current_timestamp', 'comment' => 'creation time of notification'),
19
+			'notify_type' => array('type' => 'ascii', 'precision' => '32', 'comment' => 'notification type')
20 20
 		),
21 21
 		'pk' => array('notify_id'),
22 22
 		'fk' => array(),
23
-		'ix' => array('account_id','notify_created'),
23
+		'ix' => array('account_id', 'notify_created'),
24 24
 		'uc' => array()
25 25
 	)
26 26
 );
Please login to merge, or discard this patch.
notifications/setup/tables_update.inc.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 function notifications_upgrade0_5()
14 14
 {
15
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup','account_id',array(
15
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup', 'account_id', array(
16 16
 		'type' => 'int',
17 17
 		'precision' => '20',
18 18
 		'nullable' => False
@@ -41,16 +41,16 @@  discard block
 block discarded – undo
41 41
 
42 42
 function notifications_upgrade1_8()
43 43
 {
44
-	$GLOBALS['egw_setup']->oProc->DropColumn('egw_notificationpopup',array(
44
+	$GLOBALS['egw_setup']->oProc->DropColumn('egw_notificationpopup', array(
45 45
 		'fd' => array(
46
-			'account_id' => array('type' => 'int','precision' => '20','nullable' => False),
46
+			'account_id' => array('type' => 'int', 'precision' => '20', 'nullable' => False),
47 47
 			'message' => array('type' => 'longtext')
48 48
 		),
49 49
 		'pk' => array(),
50 50
 		'fk' => array(),
51 51
 		'ix' => array('account_id'),
52 52
 		'uc' => array()
53
-	),'session_id');
53
+	), 'session_id');
54 54
 
55 55
 	return $GLOBALS['setup_info']['notifications']['currentver'] = '1.9.001';
56 56
 }
@@ -71,18 +71,18 @@  discard block
 block discarded – undo
71 71
  */
72 72
 function notifications_upgrade1_9_002()
73 73
 {
74
-	$GLOBALS['egw_setup']->oProc->RefreshTable('egw_notificationpopup',array(
74
+	$GLOBALS['egw_setup']->oProc->RefreshTable('egw_notificationpopup', array(
75 75
 		'fd' => array(
76
-			'notify_id' => array('type' => 'auto','nullable' => False,'comment' => 'primary key'),
77
-			'account_id' => array('type' => 'int','precision' => '20','nullable' => False,'comment' => 'user to notify'),
78
-			'notify_message' => array('type' => 'text','comment' => 'notification message'),
79
-			'notify_created' => array('type' => 'timestamp','default' => 'current_timestamp','comment' => 'creation time of notification')
76
+			'notify_id' => array('type' => 'auto', 'nullable' => False, 'comment' => 'primary key'),
77
+			'account_id' => array('type' => 'int', 'precision' => '20', 'nullable' => False, 'comment' => 'user to notify'),
78
+			'notify_message' => array('type' => 'text', 'comment' => 'notification message'),
79
+			'notify_created' => array('type' => 'timestamp', 'default' => 'current_timestamp', 'comment' => 'creation time of notification')
80 80
 		),
81 81
 		'pk' => array('notify_id'),
82 82
 		'fk' => array(),
83
-		'ix' => array('account_id','notify_created'),
83
+		'ix' => array('account_id', 'notify_created'),
84 84
 		'uc' => array()
85
-	),array(
85
+	), array(
86 86
 		'notify_message' => 'message',
87 87
 	));
88 88
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
 function notifications_upgrade1_9_003()
94 94
 {
95
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_notificationpopup','notify_type',array(
95
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_notificationpopup', 'notify_type', array(
96 96
 		'type' => 'varchar',
97 97
 		'precision' => '32',
98 98
 		'comment' => 'notification type'
@@ -109,12 +109,12 @@  discard block
 block discarded – undo
109 109
 
110 110
 function notifications_upgrade14_1()
111 111
 {
112
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup','notify_message',array(
112
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup', 'notify_message', array(
113 113
 		'type' => 'varchar',
114 114
 		'precision' => '16384',
115 115
 		'comment' => 'notification message'
116 116
 	));
117
-	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup','notify_type',array(
117
+	$GLOBALS['egw_setup']->oProc->AlterColumn('egw_notificationpopup', 'notify_type', array(
118 118
 		'type' => 'ascii',
119 119
 		'precision' => '32',
120 120
 		'comment' => 'notification type'
Please login to merge, or discard this patch.
notifications/inc/hook_after_navbar.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,16 +20,16 @@
 block discarded – undo
20 20
 	$notification_config = Api\Config::read('notifications');
21 21
 	Api\Translation::add_app('notifications');
22 22
 	$popup_poll_interval = empty($notification_config['popup_poll_interval']) ? 60 : $notification_config['popup_poll_interval'];
23
-	echo '<script src="'. $GLOBALS['egw_info']['server']['webserver_url']. '/notifications/js/notificationajaxpopup.js?'.
24
-		filemtime(EGW_SERVER_ROOT.'/notifications/js/notificationajaxpopup.js'). '" type="text/javascript" id="notifications_script_id" data-poll-interval="'.$popup_poll_interval.'"></script>';
23
+	echo '<script src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/notifications/js/notificationajaxpopup.js?'.
24
+		filemtime(EGW_SERVER_ROOT.'/notifications/js/notificationajaxpopup.js').'" type="text/javascript" id="notifications_script_id" data-poll-interval="'.$popup_poll_interval.'"></script>';
25 25
 	echo '
26 26
 		<div id="egwpopup" style="display: none; z-index: 999;">
27
-			<div id="egwpopup_header">'.lang('Notification'). '<span style="float:right;">'.
28
-				Api\Html::submit_button('egwpopup_close_button', 'X', '', true, 'id="egwpopup_close_button"', 'close.button') .
27
+			<div id="egwpopup_header">'.lang('Notification').'<span style="float:right;">'.
28
+				Api\Html::submit_button('egwpopup_close_button', 'X', '', true, 'id="egwpopup_close_button"', 'close.button').
29 29
 			'</span></div>
30 30
 			<div id="egwpopup_message"></div>
31 31
 			<div id="egwpopup_footer">
32
-				<input id="egwpopup_ok_button" type="button" value="'. lang('ok'). '">
32
+				<input id="egwpopup_ok_button" type="button" value="'. lang('ok').'">
33 33
 			</div>
34 34
 		</div>
35 35
 	';
Please login to merge, or discard this patch.
notifications/inc/class.notifications_push.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
 	public static function get()
41 41
 	{
42
-		$already_send =& Api\Cache::getSession(__CLASS__, 'already_send');
42
+		$already_send = & Api\Cache::getSession(__CLASS__, 'already_send');
43 43
 		$max_id = Api\Cache::getInstance(__CLASS__, 'max_id');
44 44
 
45 45
 		if (!isset($already_send))
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		{
58 58
 			$response = Json\Response::get();
59 59
 
60
-			foreach(self::$db->select(self::TABLE, '*', array(
60
+			foreach (self::$db->select(self::TABLE, '*', array(
61 61
 				'account_id' => array(0, $GLOBALS['egw_info']['user']['account_id']),
62 62
 				'notify_type' => self::TYPE,
63 63
 				'notify_id > '.(int)$already_send,
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public static function init_static()
123 123
 	{
124
-		self::$db =& $GLOBALS['egw']->db;
124
+		self::$db = & $GLOBALS['egw']->db;
125 125
 	}
126 126
 }
127 127
 notifications_push::init_static();
Please login to merge, or discard this patch.
notifications/inc/class.notifications_ajax.inc.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -140,11 +140,11 @@  discard block
 block discarded – undo
140 140
 	{
141 141
 		if ($notify_id)
142 142
 		{
143
-			$this->db->delete(self::_notification_table,array(
143
+			$this->db->delete(self::_notification_table, array(
144 144
 				'notify_id' => $notify_id,
145 145
 				'account_id' => $this->recipient->account_id,
146 146
 				'notify_type' => self::_type
147
-			),__LINE__,__FILE__,self::_appname);
147
+			), __LINE__, __FILE__, self::_appname);
148 148
 		}
149 149
 	}
150 150
 
@@ -159,27 +159,27 @@  discard block
 block discarded – undo
159 159
 				'account_id' => $this->recipient->account_id,
160 160
 				'notify_type' => self::_type
161 161
 			),
162
-			__LINE__,__FILE__,false,'',self::_appname);
163
-		if ($rs->NumRows() > 0)	{
162
+			__LINE__, __FILE__, false, '', self::_appname);
163
+		if ($rs->NumRows() > 0) {
164 164
 			foreach ($rs as $notification) {
165 165
 				$message = null;
166
-				if($browserNotify)
166
+				if ($browserNotify)
167 167
 				{
168 168
 					$message = $notification['notify_message'];
169 169
 
170 170
 					// Check for a link - doesn't work in notification
171
-					if(strpos($message, lang('Linked entries:')))
171
+					if (strpos($message, lang('Linked entries:')))
172 172
 					{
173 173
 						$message = substr_replace($message, '', strpos($message, lang('Linked entries:')));
174 174
 					}
175
-					$message2 = preg_replace('#</?a[^>]*>#is','',$message);
175
+					$message2 = preg_replace('#</?a[^>]*>#is', '', $message);
176 176
 
177
-					$message3 = 'data:text/html;charset=' . Api\Translation::charset() .';base64,'.base64_encode($message2);
177
+					$message3 = 'data:text/html;charset='.Api\Translation::charset().';base64,'.base64_encode($message2);
178 178
 				}
179
-				$this->response->apply('app.notifications.append',array($notification['notify_id'],$notification['notify_message'],$message3));
179
+				$this->response->apply('app.notifications.append', array($notification['notify_id'], $notification['notify_message'], $message3));
180 180
 			}
181 181
 
182
-			switch($this->preferences[self::_appname]['egwpopup_verbosity']) {
182
+			switch ($this->preferences[self::_appname]['egwpopup_verbosity']) {
183 183
 				case 'low':
184 184
 					$this->response->apply('app.notifications.bell', array('active'));
185 185
 					break;
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
 	 * @return boolean true
203 203
 	 */
204 204
 	private function restore_session_data() {
205
-		$session_data = $GLOBALS['egw']->session->appsession('session_data',self::_appname);
206
-		if(is_array($session_data)) {
205
+		$session_data = $GLOBALS['egw']->session->appsession('session_data', self::_appname);
206
+		if (is_array($session_data)) {
207 207
 			$this->session_data = $session_data;
208 208
 		} else {
209 209
 			$this->session_data = $this->session_data_defaults;
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	 * @return boolean true
219 219
 	 */
220 220
 	private function save_session_data() {
221
-		$GLOBALS['egw']->session->appsession('session_data',self::_appname,$this->session_data);
221
+		$GLOBALS['egw']->session->appsession('session_data', self::_appname, $this->session_data);
222 222
 		return true;
223 223
 	}
224 224
 }
Please login to merge, or discard this patch.
Braces   +21 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,7 +15,8 @@  discard block
 block discarded – undo
15 15
 /**
16 16
  * Ajax methods for notifications
17 17
  */
18
-class notifications_ajax {
18
+class notifications_ajax
19
+{
19 20
 	/**
20 21
 	 * Appname
21 22
 	 */
@@ -91,7 +92,8 @@  discard block
 block discarded – undo
91 92
 	 * constructor
92 93
 	 *
93 94
 	 */
94
-	public function __construct() {
95
+	public function __construct()
96
+	{
95 97
 		$this->response = Api\Json\Response::get();
96 98
 		$this->recipient = (object)$GLOBALS['egw']->accounts->read($GLOBALS['egw_info']['user']['account_id']);
97 99
 
@@ -153,15 +155,18 @@  discard block
 block discarded – undo
153 155
 	 *
154 156
 	 * @return boolean true or false
155 157
 	 */
156
-	private function get_egwpopup($browserNotify = false) {
158
+	private function get_egwpopup($browserNotify = false)
159
+	{
157 160
 		$message = '';
158 161
 		$rs = $this->db->select(self::_notification_table, '*', array(
159 162
 				'account_id' => $this->recipient->account_id,
160 163
 				'notify_type' => self::_type
161 164
 			),
162 165
 			__LINE__,__FILE__,false,'',self::_appname);
163
-		if ($rs->NumRows() > 0)	{
164
-			foreach ($rs as $notification) {
166
+		if ($rs->NumRows() > 0)
167
+		{
168
+			foreach ($rs as $notification)
169
+			{
165 170
 				$message = null;
166 171
 				if($browserNotify)
167 172
 				{
@@ -179,7 +184,8 @@  discard block
 block discarded – undo
179 184
 				$this->response->apply('app.notifications.append',array($notification['notify_id'],$notification['notify_message'],$message3));
180 185
 			}
181 186
 
182
-			switch($this->preferences[self::_appname]['egwpopup_verbosity']) {
187
+			switch($this->preferences[self::_appname]['egwpopup_verbosity'])
188
+			{
183 189
 				case 'low':
184 190
 					$this->response->apply('app.notifications.bell', array('active'));
185 191
 					break;
@@ -201,11 +207,15 @@  discard block
 block discarded – undo
201 207
 	 *
202 208
 	 * @return boolean true
203 209
 	 */
204
-	private function restore_session_data() {
210
+	private function restore_session_data()
211
+	{
205 212
 		$session_data = $GLOBALS['egw']->session->appsession('session_data',self::_appname);
206
-		if(is_array($session_data)) {
213
+		if(is_array($session_data))
214
+		{
207 215
 			$this->session_data = $session_data;
208
-		} else {
216
+		}
217
+		else
218
+		{
209 219
 			$this->session_data = $this->session_data_defaults;
210 220
 		}
211 221
 
@@ -217,7 +227,8 @@  discard block
 block discarded – undo
217 227
 	 *
218 228
 	 * @return boolean true
219 229
 	 */
220
-	private function save_session_data() {
230
+	private function save_session_data()
231
+	{
221 232
 		$GLOBALS['egw']->session->appsession('session_data',self::_appname,$this->session_data);
222 233
 		return true;
223 234
 	}
Please login to merge, or discard this patch.
notifications/inc/class.notifications_jdesk_ajax.inc.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
 	{
134 134
 		if ($notify_id)
135 135
 		{
136
-			$this->db->delete(self::_notification_table,array(
136
+			$this->db->delete(self::_notification_table, array(
137 137
 				'notify_id' => $notify_id,
138 138
 				'account_id' => $this->recipient->account_id,
139 139
 				'notify_type' => self::_type
140
-			),__LINE__,__FILE__,self::_appname);
140
+			), __LINE__, __FILE__, self::_appname);
141 141
 		}
142 142
 	}
143 143
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	 */
149 149
 	private function get_egwpopup($browserNotify = false)
150 150
 	{
151
-		unset($browserNotify);	// not used
151
+		unset($browserNotify); // not used
152 152
 
153 153
 		$message = '';
154 154
 
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
 				'account_id' => $this->recipient->account_id,
157 157
 				'notify_type' => self::_type
158 158
 			),
159
-			__LINE__,__FILE__,false,'',self::_appname);
159
+			__LINE__, __FILE__, false, '', self::_appname);
160 160
 
161
-		if( $rs->NumRows() > 0 )
161
+		if ($rs->NumRows() > 0)
162 162
 		{
163 163
 			foreach ($rs as $notification)
164 164
 			{
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 				$this->response->data($jmessage);
171 171
 			}
172 172
 
173
-			switch( $this->preferences[self::_appname]['egwpopup_verbosity'] )
173
+			switch ($this->preferences[self::_appname]['egwpopup_verbosity'])
174 174
 			{
175 175
 				case 'low':
176 176
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,8 @@  discard block
 block discarded – undo
14 14
 /**
15 15
  * jdesk Json methods for notifications
16 16
  */
17
-class notifications_jdesk_ajax {
17
+class notifications_jdesk_ajax
18
+{
18 19
 
19 20
 	public $public_functions = array(
20 21
 		'get_notification'	=> true
@@ -92,7 +93,9 @@  discard block
 block discarded – undo
92 93
 	 * destructor
93 94
 	 *
94 95
 	 */
95
-	public function __destruct() {}
96
+	public function __destruct()
97
+	{
98
+}
96 99
 
97 100
 	/**
98 101
 	 * public AJAX trigger function to be called by the JavaScript client
Please login to merge, or discard this patch.
notifications/inc/hook_admin.inc.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
 
12 12
 use EGroupware\Api\Egw;
13 13
 
14
-$file = Array(	'Site Configuration' => Egw::link('/index.php', array(
14
+$file = Array('Site Configuration' => Egw::link('/index.php', array(
15 15
 	'menuaction'	=> 'admin.admin_config.index',
16 16
 	'appname'		=> $appname,
17 17
 	'ajax'          => 'true',
18 18
 )));
19
-display_section($appname,$file);
19
+display_section($appname, $file);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 use EGroupware\Api\Egw;
13 13
 
14
-$file = Array(	'Site Configuration' => Egw::link('/index.php', array(
14
+$file = array(	'Site Configuration' => Egw::link('/index.php', array(
15 15
 	'menuaction'	=> 'admin.admin_config.index',
16 16
 	'appname'		=> $appname,
17 17
 	'ajax'          => 'true',
Please login to merge, or discard this patch.
status.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
  * @version $Id$
15 15
  */
16 16
 // forward for not existing or empty header to setup
17
-if(!file_exists('header.inc.php') || !filesize('header.inc.php'))
17
+if (!file_exists('header.inc.php') || !filesize('header.inc.php'))
18 18
 {
19 19
 	Header('Location: setup/index.php');
20 20
 	exit;
Please login to merge, or discard this patch.
mail/profile.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 Header('Content-Type: application/json; charset=utf-8');
63 63
 echo json_encode($times, JSON_PRETTY_PRINT);
64 64
 
65
-function php_times($account, array &$times, $prefix='php_')
65
+function php_times($account, array &$times, $prefix = 'php_')
66 66
 {
67 67
 	$starttime = microtime(true);
68
-	switch($account->acc_imap_ssl & ~emailadmin_account::SSL_VERIFY)
68
+	switch ($account->acc_imap_ssl&~emailadmin_account::SSL_VERIFY)
69 69
 	{
70 70
 		case emailadmin_account::SSL_SSL:
71 71
 			$schema = 'ssl';
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 	$error_number = $error_string = null;
82 82
 	$stream = stream_socket_client(
83
-		$schema . '://' . $account->acc_imap_host . ':' . $account->acc_imap_port,
83
+		$schema.'://'.$account->acc_imap_host.':'.$account->acc_imap_port,
84 84
 		$error_number,
85 85
 		$error_string,
86 86
 		20,
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	$connect_response = fgets($stream);
99 99
 
100 100
 	// starttls (untested)
101
-	if ($stream && ($account->acc_imap_ssl & ~emailadmin_account::SSL_VERIFY) == emailadmin_account::SSL_STARTTLS)
101
+	if ($stream && ($account->acc_imap_ssl&~emailadmin_account::SSL_VERIFY) == emailadmin_account::SSL_STARTTLS)
102 102
 	{
103 103
 		fwrite($stream, "10 STARTTLS\r\n");
104 104
 		stream_socket_enable_crypto($stream, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	unset($connect_response, $starttls_response, $login_response, $error_number, $error_string);
129 129
 }
130 130
 
131
-function mail_times($acc_id, array &$times, $prefix='mail_')
131
+function mail_times($acc_id, array &$times, $prefix = 'mail_')
132 132
 {
133 133
 	global $cache;
134 134
 	$starttime = microtime(true);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	$mail_ui->mail_bo->icServer->logout();
184 184
 }
185 185
 
186
-function horde_times(emailadmin_account $account, array &$times, $prefix='horde_')
186
+function horde_times(emailadmin_account $account, array &$times, $prefix = 'horde_')
187 187
 {
188 188
 	$starttime = microtime(true);
189 189
 	$imap = $account->imapServer();
@@ -215,12 +215,12 @@  discard block
 block discarded – undo
215 215
 	$imap->logout();
216 216
 }
217 217
 
218
-function horde_fetch(Horde_Imap_Client_Socket $client, $mailbox='INBOX')
218
+function horde_fetch(Horde_Imap_Client_Socket $client, $mailbox = 'INBOX')
219 219
 {
220 220
 	$squery = new Horde_Imap_Client_Search_Query();
221 221
 	// using a date filter to limit returned uids, gives huge speed improvement on big mailboxes, because less uids returned
222 222
 	//$squery->dateSearch(new DateTime('-30days'), Horde_Imap_Client_Search_Query::DATE_SINCE, false, false);
223
-	$squery->flag('DELETED', $set=false);
223
+	$squery->flag('DELETED', $set = false);
224 224
 	$sorted = $client->search($mailbox, $squery, array(
225 225
 		'sort' => array(Horde_Imap_Client::SORT_REVERSE, Horde_Imap_Client::SORT_SEQUENCE),
226 226
 	));
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	$first20uids->add(array_slice($sorted['match']->ids, 0, 20));
230 230
 
231 231
 	$fquery = new Horde_Imap_Client_Fetch_Query();
232
-	$fquery->headers('headers', array('Subject', 'From', 'To', 'Cc', 'Date'), array('peek' => true,'cache' => true));
232
+	$fquery->headers('headers', array('Subject', 'From', 'To', 'Cc', 'Date'), array('peek' => true, 'cache' => true));
233 233
 	$fquery->structure();
234 234
 	$fquery->flags();
235 235
 	$fquery->imapDate();
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,10 @@  discard block
 block discarded – undo
43 43
 // switching off caching by default
44 44
 // if caching is enabled mail_times will always provit from previous running horde_times!
45 45
 $cache = isset($_GET['cache']) && $_GET['cache'];
46
-if (!$cache) unset(emailadmin_imap::$default_params['cache']);
46
+if (!$cache)
47
+{
48
+	unset(emailadmin_imap::$default_params['cache']);
49
+}
47 50
 
48 51
 $accounttime = microtime(true);
49 52
 
@@ -106,7 +109,8 @@  discard block
 block discarded – undo
106 109
 	}
107 110
 	stream_set_timeout($stream, 20);
108 111
 
109
-	if (function_exists('stream_set_read_buffer')) {
112
+	if (function_exists('stream_set_read_buffer'))
113
+	{
110 114
 		stream_set_read_buffer($stream, 0);
111 115
 	}
112 116
 	stream_set_write_buffer($stream, 0);
Please login to merge, or discard this patch.