Passed
Pull Request — master (#46)
by Neo
33:01
created
api/src/Accounts/Ldap.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -962,7 +962,7 @@
 block discarded – undo
962 962
 			'account_fullname' => 'cn',
963 963
 		);
964 964
 		if (!isset($to_ldap[$which]) || $account_type === 'g') {
965
-		    return False;
965
+			return False;
966 966
 		}
967 967
 
968 968
 		$sri = ldap_search($this->ds, $this->user_context, '(&('.$to_ldap[$which].'=' . $name . ')(objectclass=posixaccount))', array('uidNumber'));
Please login to merge, or discard this patch.
api/src/Mail/Cache.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	const LEVEL = Api\Cache::INSTANCE;
31 31
 
32
-    /**
33
-     * Retrieve cached data.
34
-     *
35
-     * @param string $key        Object ID to query.
36
-     * @param integer $lifetime  Lifetime of the object in seconds.
37
-     *
38
-     * @return mixed  Cached data, or false if none was found.
39
-     */
40
-    public function get($key, $lifetime = 0)
32
+	/**
33
+	 * Retrieve cached data.
34
+	 *
35
+	 * @param string $key        Object ID to query.
36
+	 * @param integer $lifetime  Lifetime of the object in seconds.
37
+	 *
38
+	 * @return mixed  Cached data, or false if none was found.
39
+	 */
40
+	public function get($key, $lifetime = 0)
41 41
 	{
42 42
 		unset($lifetime);	// not (yet) used, but required by function signature
43 43
 
@@ -46,54 +46,54 @@  discard block
 block discarded – undo
46 46
 		return !is_null($ret) ? $ret : false;
47 47
 	}
48 48
 
49
-    /**
50
-     * Store an object in the cache.
51
-     *
52
-     * @param string $key        Object ID used as the caching key.
53
-     * @param mixed $data        Data to store in the cache.
54
-     * @param integer $lifetime  Object lifetime - i.e. the time before the
55
-     *                           data becomes available for garbage
56
-     *                           collection. If 0 will not be GC'd.
57
-     */
58
-    public function set($key, $data, $lifetime = 0)
49
+	/**
50
+	 * Store an object in the cache.
51
+	 *
52
+	 * @param string $key        Object ID used as the caching key.
53
+	 * @param mixed $data        Data to store in the cache.
54
+	 * @param integer $lifetime  Object lifetime - i.e. the time before the
55
+	 *                           data becomes available for garbage
56
+	 *                           collection. If 0 will not be GC'd.
57
+	 */
58
+	public function set($key, $data, $lifetime = 0)
59 59
 	{
60 60
 		Api\Cache::setCache(self::LEVEL, 'mail', $key, $data, $lifetime);
61 61
 	}
62 62
 
63
-    /**
64
-     * Checks if a given key exists in the cache, valid for the given
65
-     * lifetime.
66
-     *
67
-     * @param string $key        Cache key to check.
68
-     * @param integer $lifetime  Lifetime of the key in seconds.
69
-     *
70
-     * @return boolean  Existence.
71
-     */
72
-    public function exists($key, $lifetime = 0)
63
+	/**
64
+	 * Checks if a given key exists in the cache, valid for the given
65
+	 * lifetime.
66
+	 *
67
+	 * @param string $key        Cache key to check.
68
+	 * @param integer $lifetime  Lifetime of the key in seconds.
69
+	 *
70
+	 * @return boolean  Existence.
71
+	 */
72
+	public function exists($key, $lifetime = 0)
73 73
 	{
74 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
 	}
78 78
 
79
-    /**
80
-     * Expire any existing data for the given key.
81
-     *
82
-     * @param string $key  Cache key to expire.
83
-     *
84
-     * @return boolean  Success or failure.
85
-     */
86
-    public function expire($key)
79
+	/**
80
+	 * Expire any existing data for the given key.
81
+	 *
82
+	 * @param string $key  Cache key to expire.
83
+	 *
84
+	 * @return boolean  Success or failure.
85
+	 */
86
+	public function expire($key)
87 87
 	{
88 88
 		Api\Cache::unsetCache(self::LEVEL, 'mail', $key);
89 89
 	}
90 90
 
91
-    /**
92
-     * Clears all data from the cache.
93
-     *
94
-     * @throws Horde_Cache_Exception
95
-     */
96
-    public function clear()
91
+	/**
92
+	 * Clears all data from the cache.
93
+	 *
94
+	 * @throws Horde_Cache_Exception
95
+	 */
96
+	public function clear()
97 97
 	{
98 98
 		Api\Cache::flush(self::LEVEL, self::APP);
99 99
 	}
Please login to merge, or discard this patch.
api/src/Mail/Sieve.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -37,28 +37,28 @@  discard block
 block discarded – undo
37 37
 	var $icServer;
38 38
 
39 39
 	/**
40
-	* @var string name of active script queried from Sieve server
41
-	*/
40
+	 * @var string name of active script queried from Sieve server
41
+	 */
42 42
 	var $scriptName;
43 43
 
44 44
 	/**
45
-	* @var $rules containing the rules
46
-	*/
45
+	 * @var $rules containing the rules
46
+	 */
47 47
 	var $rules;
48 48
 
49 49
 	/**
50
-	* @var $vacation containing the vacation
51
-	*/
50
+	 * @var $vacation containing the vacation
51
+	 */
52 52
 	var $vacation;
53 53
 
54 54
 	/**
55
-	* @var $emailNotification containing the emailNotification
56
-	*/
55
+	 * @var $emailNotification containing the emailNotification
56
+	 */
57 57
 	var $emailNotification;
58 58
 
59 59
 	/**
60
-	* @var object $error the last PEAR error object
61
-	*/
60
+	 * @var object $error the last PEAR error object
61
+	 */
62 62
 	var $error;
63 63
 
64 64
 	/**
@@ -170,11 +170,11 @@  discard block
 block discarded – undo
170 170
 	function setEmailNotification(array $_emailNotification, $_scriptName=null)
171 171
 	{
172 172
 		if ($_emailNotification['externalEmail'] == '' || !preg_match("/\@/",$_emailNotification['externalEmail'])) {
173
-    		$_emailNotification['status'] = 'off';
174
-    		$_emailNotification['externalEmail'] = '';
175
-    	}
173
+			$_emailNotification['status'] = 'off';
174
+			$_emailNotification['externalEmail'] = '';
175
+		}
176 176
 
177
-    	$script = $this->retrieveRules($_scriptName);
177
+		$script = $this->retrieveRules($_scriptName);
178 178
    		$script->emailNotification = $_emailNotification;
179 179
 		$ret = $script->updateScript($this);
180 180
 		$this->error = $script->errstr;
Please login to merge, or discard this patch.
api/src/Mail/Hooks.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
 		}
33 33
 	}
34 34
 
35
-    /**
36
-     * Hook called before an account get deleted
37
-     *
38
-     * @param array $data
39
-     * @param int $data['account_id'] numerical id
40
-     * @param string $data['account_lid'] account-name
41
-     * @param int $data['new_owner'] account-id of new owner, or false if data should get deleted
42
-     */
35
+	/**
36
+	 * Hook called before an account get deleted
37
+	 *
38
+	 * @param array $data
39
+	 * @param int $data['account_id'] numerical id
40
+	 * @param string $data['account_lid'] account-name
41
+	 * @param int $data['new_owner'] account-id of new owner, or false if data should get deleted
42
+	 */
43 43
 	static function deleteaccount(array $data)
44 44
 	{
45 45
 		self::run_plugin_hooks('deleteAccount', $data);
@@ -48,25 +48,25 @@  discard block
 block discarded – undo
48 48
 		Account::delete(0, $data['account_id']);
49 49
 	}
50 50
 
51
-    /**
52
-     * Hook called before a group get deleted
53
-     *
54
-     * @param array $data
55
-     * @param int $data['account_id'] numerical id
56
-     * @param string $data['account_name'] account-name
57
-     */
51
+	/**
52
+	 * Hook called before a group get deleted
53
+	 *
54
+	 * @param array $data
55
+	 * @param int $data['account_id'] numerical id
56
+	 * @param string $data['account_name'] account-name
57
+	 */
58 58
 	static function deletegroup(array $data)
59 59
 	{
60 60
 		Account::delete(0, $data['account_id']);
61 61
 	}
62 62
 
63 63
 	/**
64
-     * Hook called when an account get added or edited
65
-     *
66
-     * @param array $data
67
-     * @param int $data['account_id'] numerical id
68
-     * @param string $data['account_lid'] account-name
69
-     * @param string $data['account_email'] email
64
+	 * Hook called when an account get added or edited
65
+	 *
66
+	 * @param array $data
67
+	 * @param int $data['account_id'] numerical id
68
+	 * @param string $data['account_lid'] account-name
69
+	 * @param string $data['account_email'] email
70 70
 	 */
71 71
 	static function addaccount(array $data)
72 72
 	{
Please login to merge, or discard this patch.
api/src/Html.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -425,20 +425,20 @@  discard block
 block discarded – undo
425 425
 	}
426 426
 
427 427
 	/**
428
-	* this static function is a wrapper for fckEditor to create some reuseable layouts
429
-	*
430
-	* @param string $_name name and id of the input-field
431
-	* @param string $_content of the tinymce (will be run through htmlspecialchars !!!), default ''
432
-	* @param string $_mode display mode of the tinymce editor can be: simple, extended or advanced
433
-	* @param array  $_options (toolbar_expanded true/false)
434
-	* @param string $_height ='400px'
435
-	* @param string $_width ='100%'
436
-	* @param string $_start_path ='' if passed activates the browser for image at absolute path passed
437
-	* @param boolean $_purify =true run $_content through htmlpurifier before handing it to fckEditor
438
-	* @param mixed (boolean/string) $_focusToBody=false USED only for CKEDIOR true means yes, focus on top, you may specify TOP or BOTTOM (to focus on the end of the editor area)
439
-	* @param string $_executeJSAfterInit ='' Javascript to be executed after InstanceReady of CKEditor
440
-	* @return string the necessary html for the textarea
441
-	*/
428
+	 * this static function is a wrapper for fckEditor to create some reuseable layouts
429
+	 *
430
+	 * @param string $_name name and id of the input-field
431
+	 * @param string $_content of the tinymce (will be run through htmlspecialchars !!!), default ''
432
+	 * @param string $_mode display mode of the tinymce editor can be: simple, extended or advanced
433
+	 * @param array  $_options (toolbar_expanded true/false)
434
+	 * @param string $_height ='400px'
435
+	 * @param string $_width ='100%'
436
+	 * @param string $_start_path ='' if passed activates the browser for image at absolute path passed
437
+	 * @param boolean $_purify =true run $_content through htmlpurifier before handing it to fckEditor
438
+	 * @param mixed (boolean/string) $_focusToBody=false USED only for CKEDIOR true means yes, focus on top, you may specify TOP or BOTTOM (to focus on the end of the editor area)
439
+	 * @param string $_executeJSAfterInit ='' Javascript to be executed after InstanceReady of CKEditor
440
+	 * @return string the necessary html for the textarea
441
+	 */
442 442
 	static function fckEditor($_name, $_content, $_mode, $_options=array('toolbar_expanded' =>'true'),
443 443
 		$_height='400px', $_width='100%',$_start_path='',$_purify=true, $_focusToBody=false, $_executeJSAfterInit='')
444 444
 	{
@@ -509,21 +509,21 @@  discard block
 block discarded – undo
509 509
 	}
510 510
 
511 511
 	/**
512
-	* this static function is a wrapper for tinymce to create some reuseable layouts
513
-	*
514
-	* Please note: if you did not run init_tinymce already you this static function need to be called before the call to phpgw_header() !!!
515
-	*
516
-	* @param string $_name name and id of the input-field
517
-	* @param string $_mode display mode of the tinymce editor can be: simple, extended or advanced
518
-	* @param string $_content ='' of the tinymce (will be run through htmlspecialchars !!!), default ''
519
-	* @param string $_height ='400px'
520
-	* @param string $_width ='100%'
521
-	* @param boolean $_purify =true
522
-	* @param string $_border ='0px' NOT used for CKEditor
523
-	* @param mixed (boolean/string) $_focusToBody=false USED only for CKEDIOR true means yes, focus on top, you may specify TOP or BOTTOM (to focus on the end of the editor area)
524
-	* @param string $_executeJSAfterInit ='' Javascript to be executed after InstanceReady of CKEditor
525
-	* @return string the necessary html for the textarea
526
-	*/
512
+	 * this static function is a wrapper for tinymce to create some reuseable layouts
513
+	 *
514
+	 * Please note: if you did not run init_tinymce already you this static function need to be called before the call to phpgw_header() !!!
515
+	 *
516
+	 * @param string $_name name and id of the input-field
517
+	 * @param string $_mode display mode of the tinymce editor can be: simple, extended or advanced
518
+	 * @param string $_content ='' of the tinymce (will be run through htmlspecialchars !!!), default ''
519
+	 * @param string $_height ='400px'
520
+	 * @param string $_width ='100%'
521
+	 * @param boolean $_purify =true
522
+	 * @param string $_border ='0px' NOT used for CKEditor
523
+	 * @param mixed (boolean/string) $_focusToBody=false USED only for CKEDIOR true means yes, focus on top, you may specify TOP or BOTTOM (to focus on the end of the editor area)
524
+	 * @param string $_executeJSAfterInit ='' Javascript to be executed after InstanceReady of CKEditor
525
+	 * @return string the necessary html for the textarea
526
+	 */
527 527
 	static function fckEditorQuick($_name, $_mode, $_content='', $_height='400px', $_width='100%',$_purify=true, $_border='0px',$_focusToBody=false,$_executeJSAfterInit='')
528 528
 	{
529 529
 		if (!self::htmlarea_availible() || $_mode == 'ascii')
Please login to merge, or discard this patch.
api/src/Ldap.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,17 +31,17 @@
 block discarded – undo
31 31
 class Ldap
32 32
 {
33 33
 	/**
34
-	* Holds the LDAP link identifier
35
-	*
36
-	* @var resource $ds
37
-	*/
34
+	 * Holds the LDAP link identifier
35
+	 *
36
+	 * @var resource $ds
37
+	 */
38 38
 	var $ds;
39 39
 
40 40
 	/**
41
-	* Holds the detected information about the connected ldap server
42
-	*
43
-	* @var Ldap\ServerInfo $ldapserverinfo
44
-	*/
41
+	 * Holds the detected information about the connected ldap server
42
+	 *
43
+	 * @var Ldap\ServerInfo $ldapserverinfo
44
+	 */
45 45
 	var $ldapserverinfo;
46 46
 
47 47
 	/**
Please login to merge, or discard this patch.
api/src/Auth.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 	 * @param string $db_val   stored value / hash (from database)
408 408
 	 * @param string &$type    detected crypt type on return
409 409
 	 * @return boolean	 True on successful comparison
410
-	*/
410
+	 */
411 411
 	static function crypt_compare($form_val, $db_val, &$type)
412 412
 	{
413 413
 		// detect type of hash by salt part of $db_val
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
 	 * @param string $form_val user input value for comparison
707 707
 	 * @param string $db_val stored value (from database)
708 708
 	 * @return boolean True on successful comparison
709
-	*/
709
+	 */
710 710
 	static function smd5_compare($form_val,$db_val)
711 711
 	{
712 712
 		/* Start with the first char after {SMD5} */
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
 	 * @param string $form_val user input value for comparison
729 729
 	 * @param string $db_val   stored value (from database)
730 730
 	 * @return boolean True on successful comparison
731
-	*/
731
+	 */
732 732
 	static function sha_compare($form_val,$db_val)
733 733
 	{
734 734
 		/* Start with the first char after {SHA} */
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
 	 * @param string $form_val user input value for comparison
746 746
 	 * @param string $db_val   stored value (from database)
747 747
 	 * @return boolean	 True on successful comparison
748
-	*/
748
+	 */
749 749
 	static function ssha_compare($form_val,$db_val)
750 750
 	{
751 751
 		/* Start with the first char after {SSHA} */
Please login to merge, or discard this patch.
setup/inc/class.setup.inc.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -151,10 +151,10 @@  discard block
 block discarded – undo
151 151
 	}
152 152
 
153 153
 	/**
154
-	* Set the domain used for cookies
155
-	*
156
-	* @return string domain
157
-	*/
154
+	 * Set the domain used for cookies
155
+	 *
156
+	 * @return string domain
157
+	 */
158 158
 	static function cookiedomain()
159 159
 	{
160 160
 		// Use HTTP_X_FORWARDED_HOST if set, which is the case behind a none-transparent proxy
@@ -175,12 +175,12 @@  discard block
 block discarded – undo
175 175
 	}
176 176
 
177 177
 	/**
178
-	* Set a cookie
179
-	*
180
-	* @param string $cookiename name of cookie to be set
181
-	* @param string $cookievalue value to be used, if unset cookie is cleared (optional)
182
-	* @param int $cookietime when cookie should expire, 0 for session only (optional)
183
-	*/
178
+	 * Set a cookie
179
+	 *
180
+	 * @param string $cookiename name of cookie to be set
181
+	 * @param string $cookievalue value to be used, if unset cookie is cleared (optional)
182
+	 * @param int $cookietime when cookie should expire, 0 for session only (optional)
183
+	 */
184 184
 	function set_cookie($cookiename,$cookievalue='',$cookietime=0)
185 185
 	{
186 186
 		if(!isset($this->cookie_domain))
@@ -344,19 +344,19 @@  discard block
 block discarded – undo
344 344
 		return true;
345 345
 	}
346 346
 
347
-    /**
348
-    * check if username and password is valid
349
-    *
350
-    * this function compares the supplied and stored username and password
351
-	* as any of the passwords can be clear text or md5 we convert them to md5
352
-	* internal and compare always the md5 hashs
353
-    *
354
-    * @param string $user the user supplied username
355
-    * @param string $pw the user supplied password
356
-    * @param string $conf_user the configured username
357
-    * @param string $hash hash to check password agains (no {prefix} for plain and md5!)
358
-    * @returns bool true on success
359
-    */
347
+	/**
348
+	 * check if username and password is valid
349
+	 *
350
+	 * this function compares the supplied and stored username and password
351
+	 * as any of the passwords can be clear text or md5 we convert them to md5
352
+	 * internal and compare always the md5 hashs
353
+	 *
354
+	 * @param string $user the user supplied username
355
+	 * @param string $pw the user supplied password
356
+	 * @param string $conf_user the configured username
357
+	 * @param string $hash hash to check password agains (no {prefix} for plain and md5!)
358
+	 * @returns bool true on success
359
+	 */
360 360
 	static function check_auth($user, $pw, $conf_user, $hash)
361 361
 	{
362 362
 		if ($user !== $conf_user)
@@ -728,10 +728,10 @@  discard block
 block discarded – undo
728 728
 	}
729 729
 
730 730
 	/**
731
-	  * call the hooks for a single application
732
-	  *
733
-	  * @param $location hook location - required
734
-	  * @param $appname application name - optional
731
+	 * call the hooks for a single application
732
+	 *
733
+	 * @param $location hook location - required
734
+	 * @param $appname application name - optional
735 735
 	 */
736 736
 	static function hook($location, $appname='')
737 737
 	{
Please login to merge, or discard this patch.
setup/index.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@
 block discarded – undo
222 222
 					. '<br />'.lang('to allow password authentification add the following line to your pg_hba.conf (above all others) AND restart postgres:')
223 223
 					. '<br /><i># TYPE DATABASE USER CIDR-ADDRESS METHOD</i>'
224 224
 					.($info['db_host'] ? "<br /><i><b>host $info[db_name] $info[db_user] $ip/32 password</b></i>" :
225
-					                     "<br /><i><b>local $info[db_name] $info[db_user] password</b></i>"));
225
+										 "<br /><i><b>local $info[db_name] $info[db_user] password</b></i>"));
226 226
 				//$setup_tpl->parse('V_db_stage_1','B_db_stage_1');
227 227
 				//break;
228 228
 			default:
Please login to merge, or discard this patch.