Test Setup Failed
Push — master ( 12c298...4a14e0 )
by Ralf
22:03
created
api/src/Mail/Cache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function get($key, $lifetime = 0)
41 41
 	{
42
-		unset($lifetime);	// not (yet) used, but required by function signature
42
+		unset($lifetime); // not (yet) used, but required by function signature
43 43
 
44 44
 		$ret = Api\Cache::getCache(self::LEVEL, 'mail', $key);
45 45
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function exists($key, $lifetime = 0)
73 73
 	{
74
-		unset($lifetime);	// not (yet) used, but required by function signature
74
+		unset($lifetime); // not (yet) used, but required by function signature
75 75
 
76 76
 		return !is_null(Api\Cache::getCache(self::LEVEL, 'mail', $key));
77 77
 	}
Please login to merge, or discard this patch.
api/src/Mail/Smtp/Ads.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 */
134 134
 	protected function getLdapConnection()
135 135
 	{
136
-		static $ldap=null;
136
+		static $ldap = null;
137 137
 
138 138
 		if (is_null($ldap))
139 139
 		{
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 *
152 152
 	 * @param string $defaultDomain =null
153 153
 	 */
154
-	function __construct($defaultDomain=null)
154
+	function __construct($defaultDomain = null)
155 155
 	{
156 156
 		parent::__construct($defaultDomain);
157 157
 
Please login to merge, or discard this patch.
api/src/Mail/Smtp/Oldqmailuser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 	/**
46 46
 	 * Primary mail address required as an alias too: true or false
47 47
 	 */
48
-	const REQUIRE_MAIL_AS_ALIAS=false;
48
+	const REQUIRE_MAIL_AS_ALIAS = false;
49 49
 
50 50
 	/**
51 51
 	 * Attribute for forwards OR false if not possible
Please login to merge, or discard this patch.
api/src/Mail/Smtp/Univention.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	/**
51 51
 	 * Primary mail address required as an alias too: true or false
52 52
 	 */
53
-	const REQUIRE_MAIL_AS_ALIAS=false;
53
+	const REQUIRE_MAIL_AS_ALIAS = false;
54 54
 
55 55
 	/**
56 56
 	 * Attribute for forwards OR false if not possible
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	function addAccountExtra(array $_hookValues, array $allValues, array &$newData)
97 97
 	{
98
-		unset($_hookValues);	// not used, but required by function signature
98
+		unset($_hookValues); // not used, but required by function signature
99 99
 
100 100
 		if (empty($allValues['univentionmailhomeserver'][0]) && $newData[self::MAIL_ENABLE_ATTR])
101 101
 		{
Please login to merge, or discard this patch.
api/src/Mail/Hooks.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	protected static function run_plugin_hooks($method, array $data)
84 84
 	{
85
-		foreach(Account::search((int)$data['account_id'], 'params') as $params)
85
+		foreach (Account::search((int)$data['account_id'], 'params') as $params)
86 86
 		{
87
-			if (!Account::is_multiple($params)) continue;	// no need to waste time on personal accounts
87
+			if (!Account::is_multiple($params)) continue; // no need to waste time on personal accounts
88 88
 
89 89
 			try {
90 90
 				$account = new Account($params);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 					$imap->$method($data);
101 101
 				}
102 102
 			}
103
-			catch(\Exception $e) {
103
+			catch (\Exception $e) {
104 104
 				_egw_log_exception($e);
105 105
 				// ignore exception, without stalling other hooks
106 106
 			}
Please login to merge, or discard this patch.
api/src/Mail/Types.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 	 *
26 26
 	 * @return array classname => label pairs
27 27
 	 */
28
-	static public function getSMTPServerTypes($extended=true)
28
+	static public function getSMTPServerTypes($extended = true)
29 29
 	{
30 30
 		$retData = self::server_types(false, $extended);
31
-		foreach(Api\Hooks::process(array(
31
+		foreach (Api\Hooks::process(array(
32 32
 			'location' => 'smtp_server_types',
33 33
 			'extended' => $extended,
34 34
 		), array('managementserver'), true) as $app => $data)
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 	 * @param boolean $extended =true
56 56
 	 * @return array classname => label pairs
57 57
 	 */
58
-	static public function getIMAPServerTypes($extended=true)
58
+	static public function getIMAPServerTypes($extended = true)
59 59
 	{
60 60
 		$retData = self::server_types(true, $extended);
61
-		foreach(Api\Hooks::process(array(
61
+		foreach (Api\Hooks::process(array(
62 62
 			'location' => 'imap_server_types',
63 63
 			'extended' => $extended,
64 64
 		), array('managementserver'), true) as $app => $data)
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 	 * @param boolean $extended =false
85 85
 	 * @return array
86 86
 	 */
87
-	protected static function server_types($imap=true, $extended=false)
87
+	protected static function server_types($imap = true, $extended = false)
88 88
 	{
89 89
 		$types = array();
90 90
 		$prefix = $imap ? 'Imap' : 'Smtp';
91
-		foreach(scandir($dir=__DIR__.'/'.$prefix) as $file)
91
+		foreach (scandir($dir = __DIR__.'/'.$prefix) as $file)
92 92
 		{
93 93
 			if ($file == '..')
94 94
 			{
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 			$type = array(
108 108
 				'classname' => $class_name,
109
-				'description' => is_callable($function=$class_name.'::description') ? call_user_func($function) : $class_name,
109
+				'description' => is_callable($function = $class_name.'::description') ? call_user_func($function) : $class_name,
110 110
 			);
111 111
 			if ($imap) $type['protocol'] = 'imap';
112 112
 
Please login to merge, or discard this patch.
api/src/Mail/Notifications.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 * @param boolean $return_empty_marker =false should we return null
53 53
 	 * @return array with values for "notify_folders", "notify_use_default"
54 54
 	 */
55
-	public static function read($acc_id, $account_id=null, $return_empty_marker=false)
55
+	public static function read($acc_id, $account_id = null, $return_empty_marker = false)
56 56
 	{
57 57
 		if (is_null($account_id))
58 58
 		{
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 			//error_log(__METHOD__."($acc_id, ".array2string($account_id).") nothing in cache");
72 72
 		}
73 73
 		$account_specific = 0;
74
-		foreach($rows as $row)
74
+		foreach ($rows as $row)
75 75
 		{
76 76
 			if ($row['account_id'])
77 77
 			{
@@ -109,19 +109,19 @@  discard block
 block discarded – undo
109 109
 	{
110 110
 		if (!is_numeric($account_id) || !($account_id >= 0))
111 111
 		{
112
-			return 0;	// nothing to save, happens eg. in setup
112
+			return 0; // nothing to save, happens eg. in setup
113 113
 		}
114 114
 
115 115
 		if ($account_id && !$folders && ($default = self::read($acc_id, 0)) && $default['notify_folders'])
116 116
 		{
117
-			$folders[] = null;	// we need to write a marker, that user wants no notifications!
117
+			$folders[] = null; // we need to write a marker, that user wants no notifications!
118 118
 		}
119
-		$old = self::read($acc_id, $account_id, true);	// true = return empty marker
120
-		if ($account_id && !$old['notify_account_id']) $old['notify_folders'] = array();	// ignore returned default
119
+		$old = self::read($acc_id, $account_id, true); // true = return empty marker
120
+		if ($account_id && !$old['notify_account_id']) $old['notify_folders'] = array(); // ignore returned default
121 121
 
122 122
 		$changed = 0;
123 123
 		// insert newly added ones
124
-		foreach(array_diff($folders, $old['notify_folders']) as $folder)
124
+		foreach (array_diff($folders, $old['notify_folders']) as $folder)
125 125
 		{
126 126
 			self::$db->insert(self::TABLE, array(
127 127
 				'acc_id' => $acc_id,
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 * @param int|array $account_id =null
157 157
 	 * @return int number of rows deleted
158 158
 	 */
159
-	public static function delete($acc_id, $account_id=null)
159
+	public static function delete($acc_id, $account_id = null)
160 160
 	{
161 161
 		if (!($acc_id > 0) && !isset($account_id))
162 162
 		{
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 		self::$db->delete(self::TABLE, $where, __LINE__, __FILE__, self::APP);
170 170
 
171 171
 		// invalidate cache: we allways unset everything about an account to simplify cache handling
172
-		foreach($acc_id > 0 ? (array)$acc_id : array_keys(self::$cache) as $acc_id)
172
+		foreach ($acc_id > 0 ? (array)$acc_id : array_keys(self::$cache) as $acc_id)
173 173
 		{
174 174
 			unset(self::$cache[$acc_id]);
175 175
 		}
Please login to merge, or discard this patch.
api/config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 $etag = '"'.md5($config.$link_registry).'"';
33 33
 
34 34
 // headers to allow caching, egw_framework specifies etag on url to force reload, even with Expires header
35
-Api\Session::cache_control(86400);	// cache for one day
35
+Api\Session::cache_control(86400); // cache for one day
36 36
 Header('Content-Type: text/javascript; charset=utf-8');
37 37
 Header('ETag: '.$etag);
38 38
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 $content .= 'egw.set_link_registry('.$link_registry.", undefined, egw && egw.window !== window);\n";
48 48
 
49 49
 // we run our own gzip compression, to set a correct Content-Length of the encoded content
50
-if (in_array('gzip', explode(',',$_SERVER['HTTP_ACCEPT_ENCODING'])) && function_exists('gzencode'))
50
+if (in_array('gzip', explode(',', $_SERVER['HTTP_ACCEPT_ENCODING'])) && function_exists('gzencode'))
51 51
 {
52 52
 	$content = gzencode($content);
53 53
 	header('Content-Encoding: gzip');
Please login to merge, or discard this patch.
api/js/etemplate/test/test.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,18 +16,18 @@
 block discarded – undo
16 16
 
17 17
 use EGroupware\Api;
18 18
 
19
-Api\Framework::includeJS('.','etemplate2','etemplate');
20
-Api\Framework::includeJS('jquery','jquery.tools.min','phpgwapi'); // Not needed once JS require works for files like this
21
-Api\Framework::includeJS('jquery','jquery.html5_upload','phpgwapi'); // Not needed once JS require works for files like this
19
+Api\Framework::includeJS('.', 'etemplate2', 'etemplate');
20
+Api\Framework::includeJS('jquery', 'jquery.tools.min', 'phpgwapi'); // Not needed once JS require works for files like this
21
+Api\Framework::includeJS('jquery', 'jquery.html5_upload', 'phpgwapi'); // Not needed once JS require works for files like this
22 22
 Api\Framework::includeCSS('/api/js/etemplate/test/test.css');
23 23
 
24 24
 /*
25 25
 * Test using any actual template
26 26
 */
27 27
 	$template = 'etemplate.et2_test_file_upload';
28
-	if($template) {
28
+	if ($template) {
29 29
 		$etemplate = new Api\Etemplate('etemplate.et2_test_file_upload');
30
-		$etemplate->exec('',array());
30
+		$etemplate->exec('', array());
31 31
 		return;
32 32
 	}
33 33
 	echo $GLOBALS['egw']->framework->header();
Please login to merge, or discard this patch.