Completed
Push — master ( 3281fb...fc273b )
by Hadi
55:41 queued 37:06
created
api/src/Link/Storage.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 			echo "<p>solink.link('$app1',$id1,'$app2',$id2,'$remark',$owner)</p>\n";
67 67
 		}
68 68
 		if ($app1 == $app2 && $id1 == $id2 ||
69
-		    $id1 == '' || $id2 == '' || $app1 == '' || $app2 == '')
69
+			$id1 == '' || $id2 == '' || $app1 == '' || $app2 == '')
70 70
 		{
71 71
 			return False;	// dont link to self or other nosense
72 72
 		}
@@ -412,26 +412,26 @@  discard block
 block discarded – undo
412 412
 			array('table'=>self::TABLE,
413 413
 				'cols'=>'c.*,b.link_app1 AS app3,b.link_id1 AS id3,b.link_id AS link3',
414 414
 				'where'=>'a.link_app1='.self::$db->quote($app).' AND c.link_app2='.self::$db->quote($target_app).
415
-                        		(!$target_id ? '' : self::$db->expression(self::TABLE,' AND c.',array('link_id2' => $target_id))),
416
-                        	'join'=>" a
415
+								(!$target_id ? '' : self::$db->expression(self::TABLE,' AND c.',array('link_id2' => $target_id))),
416
+							'join'=>" a
417 417
                         		JOIN $table b ON a.link_id2=b.link_id1 AND a.link_app2=b.link_app1
418 418
                        			JOIN $table c ON a.link_id1=c.link_id1 AND a.link_app1=c.link_app1 AND a.link_id!=c.link_id AND c.link_app2=b.link_app2 AND c.link_id2=b.link_id2",
419 419
 			),
420 420
 			// retrieve the type of links, where the relation is realized as timesheet->infolog/tracker and projectmanager->timesheet
421 421
 			array('table'=>self::TABLE,
422 422
 				'cols'=>'b.link_id, b.link_app2 as app1, b.link_id2 as id1, b.link_app1 as app2, b.link_id1 as id2, b.link_remark,b.link_lastmod,b.link_owner,b.deleted,c.link_app1 AS app3,c.link_id1 AS id3,c.link_id AS link3',
423
-                       		'where'=>'a.link_app1='.self::$db->quote($app).' AND b.link_app1='.self::$db->quote($target_app).
424
-                        		(!$target_id ? '' : self::$db->expression(self::TABLE,' AND b.',array('link_id1' => $target_id))),
425
-                        	'join'=>" a
423
+					   		'where'=>'a.link_app1='.self::$db->quote($app).' AND b.link_app1='.self::$db->quote($target_app).
424
+								(!$target_id ? '' : self::$db->expression(self::TABLE,' AND b.',array('link_id1' => $target_id))),
425
+							'join'=>" a
426 426
                         		JOIN $table b ON a.link_id1=b.link_id2 AND a.link_app1=b.link_app2
427 427
                         		JOIN $table c ON a.link_id2=c.link_id1 AND a.link_app2=c.link_app1 AND a.link_id!=c.link_id AND c.link_app2=b.link_app1 AND c.link_id2=b.link_id1",
428 428
 			),
429 429
 			// retrieve the type of links, where the relation is realized as timesheet->projectmanager and infolog->timesheet
430 430
 			array('table'=>self::TABLE,
431 431
 				'cols'=>'a.*,c.link_app1 AS app3,c.link_id1 AS id3,c.link_id AS link3',
432
-                     		'where'=>'a.link_app1='.self::$db->quote($app).' AND a.link_app2='.self::$db->quote($target_app).
433
-                        		(!$target_id ? '' : self::$db->expression(self::TABLE,' AND a.',array('link_id2' => $target_id))),
434
-                       		'join'=>" a
432
+					 		'where'=>'a.link_app1='.self::$db->quote($app).' AND a.link_app2='.self::$db->quote($target_app).
433
+								(!$target_id ? '' : self::$db->expression(self::TABLE,' AND a.',array('link_id2' => $target_id))),
434
+					   		'join'=>" a
435 435
                        			JOIN $table b ON a.link_id1=b.link_id2 AND a.link_app1=b.link_app2
436 436
                         		JOIN $table c ON a.link_id2=c.link_id2 AND a.link_app2=c.link_app2 AND a.link_id!=c.link_id AND c.link_app1=b.link_app1 AND c.link_id1=b.link_id1",
437 437
 			),
Please login to merge, or discard this patch.
api/src/Framework.php 1 patch
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -62,16 +62,16 @@  discard block
 block discarded – undo
62 62
 	var $template_dirs = array();
63 63
 
64 64
 	/**
65
-	* true if $this->header() was called
66
-	*
67
-	* @var boolean
68
-	*/
65
+	 * true if $this->header() was called
66
+	 *
67
+	 * @var boolean
68
+	 */
69 69
 	static $header_done = false;
70 70
 	/**
71
-	* true if $this->navbar() was called
72
-	*
73
-	* @var boolean
74
-	*/
71
+	 * true if $this->navbar() was called
72
+	 *
73
+	 * @var boolean
74
+	 */
75 75
 	static $navbar_done = false;
76 76
 
77 77
 	/**
@@ -1044,13 +1044,13 @@  discard block
 block discarded – undo
1044 1044
 	}
1045 1045
 
1046 1046
 	/**
1047
-	* Compile entries for topmenu:
1048
-	* - regular items: links
1049
-	* - info items
1050
-	*
1051
-	* @param array $vars
1052
-	* @param array $apps
1053
-	*/
1047
+	 * Compile entries for topmenu:
1048
+	 * - regular items: links
1049
+	 * - info items
1050
+	 *
1051
+	 * @param array $vars
1052
+	 * @param array $apps
1053
+	 */
1054 1054
 	function topmenu(array $vars,array $apps)
1055 1055
 	{
1056 1056
 		if($GLOBALS['egw_info']['user']['apps']['home'] && isset($apps['home']))
@@ -1154,39 +1154,39 @@  discard block
 block discarded – undo
1154 1154
 	}
1155 1155
 
1156 1156
 	/**
1157
-	* Add menu items to the topmenu template class to be displayed
1158
-	*
1159
-	* @param array $app application data
1160
-	* @param mixed $alt_label string with alternative menu item label default value = null
1161
-	* @param string $urlextra string with alternate additional code inside <a>-tag
1162
-	* @access protected
1163
-	* @return void
1164
-	*/
1157
+	 * Add menu items to the topmenu template class to be displayed
1158
+	 *
1159
+	 * @param array $app application data
1160
+	 * @param mixed $alt_label string with alternative menu item label default value = null
1161
+	 * @param string $urlextra string with alternate additional code inside <a>-tag
1162
+	 * @access protected
1163
+	 * @return void
1164
+	 */
1165 1165
 	abstract function _add_topmenu_item(array $app_data,$alt_label=null);
1166 1166
 
1167 1167
 	/**
1168
-	* Add info items to the topmenu template class to be displayed
1169
-	*
1170
-	* @param string $content Html of item
1171
-	* @param string $id =null
1172
-	* @access protected
1173
-	* @return void
1174
-	*/
1168
+	 * Add info items to the topmenu template class to be displayed
1169
+	 *
1170
+	 * @param string $content Html of item
1171
+	 * @param string $id =null
1172
+	 * @access protected
1173
+	 * @return void
1174
+	 */
1175 1175
 	abstract function _add_topmenu_info_item($content, $id=null);
1176 1176
 
1177 1177
 	static $top_menu_extra = array();
1178 1178
 
1179 1179
 	/**
1180
-	* Called by hooks to add an entry in the topmenu location.
1181
-	* Extra entries will be added just before Logout.
1182
-	*
1183
-	* @param string $id unique element id
1184
-	* @param string $url Address for the entry to link to
1185
-	* @param string $title Text displayed for the entry
1186
-	* @param string $target Optional, so the entry can open in a new page or popup
1187
-	* @access public
1188
-	* @return void
1189
-	*/
1180
+	 * Called by hooks to add an entry in the topmenu location.
1181
+	 * Extra entries will be added just before Logout.
1182
+	 *
1183
+	 * @param string $id unique element id
1184
+	 * @param string $url Address for the entry to link to
1185
+	 * @param string $title Text displayed for the entry
1186
+	 * @param string $target Optional, so the entry can open in a new page or popup
1187
+	 * @access public
1188
+	 * @return void
1189
+	 */
1190 1190
 	public static function add_topmenu_item($id,$url,$title,$target = '')
1191 1191
 	{
1192 1192
 		$entry['name'] = $id;
@@ -1198,16 +1198,16 @@  discard block
 block discarded – undo
1198 1198
 	}
1199 1199
 
1200 1200
 	/**
1201
-	* called by hooks to add an icon in the topmenu info location
1202
-	*
1203
-	* @param string $id unique element id
1204
-	* @param string $icon_src src of the icon image. Make sure this nog height then 18pixels
1205
-	* @param string $iconlink where the icon links to
1206
-	* @param booleon $blink set true to make the icon blink
1207
-	* @param mixed $tooltip string containing the tooltip html, or null of no tooltip
1208
-	* @access public
1209
-	* @return void
1210
-	*/
1201
+	 * called by hooks to add an icon in the topmenu info location
1202
+	 *
1203
+	 * @param string $id unique element id
1204
+	 * @param string $icon_src src of the icon image. Make sure this nog height then 18pixels
1205
+	 * @param string $iconlink where the icon links to
1206
+	 * @param booleon $blink set true to make the icon blink
1207
+	 * @param mixed $tooltip string containing the tooltip html, or null of no tooltip
1208
+	 * @access public
1209
+	 * @return void
1210
+	 */
1211 1211
 	abstract function topmenu_info_icon($id,$icon_src,$iconlink,$blink=false,$tooltip=null);
1212 1212
 
1213 1213
 	/**
@@ -1242,19 +1242,19 @@  discard block
 block discarded – undo
1242 1242
 	protected static $js_include_mgr;
1243 1243
 
1244 1244
 	/**
1245
-	* Checks to make sure a valid package and file name is provided
1246
-	*
1247
-	* Example call syntax:
1248
-	* a) Api\Framework::includeJS('jscalendar','calendar')
1249
-	*    --> /phpgwapi/js/jscalendar/calendar.js
1250
-	* b) Api\Framework::includeJS('/phpgwapi/inc/calendar-setup.js',array('lang'=>'de'))
1251
-	*    --> /phpgwapi/inc/calendar-setup.js?lang=de
1252
-	*
1253
-	* @param string $package package or complete path (relative to EGW_SERVER_ROOT) to be included
1254
-	* @param string|array $file =null file to be included - no ".js" on the end or array with get params
1255
-	* @param string $app ='phpgwapi' application directory to search - default = phpgwapi
1256
-	* @param boolean $append =true should the file be added
1257
-	*/
1245
+	 * Checks to make sure a valid package and file name is provided
1246
+	 *
1247
+	 * Example call syntax:
1248
+	 * a) Api\Framework::includeJS('jscalendar','calendar')
1249
+	 *    --> /phpgwapi/js/jscalendar/calendar.js
1250
+	 * b) Api\Framework::includeJS('/phpgwapi/inc/calendar-setup.js',array('lang'=>'de'))
1251
+	 *    --> /phpgwapi/inc/calendar-setup.js?lang=de
1252
+	 *
1253
+	 * @param string $package package or complete path (relative to EGW_SERVER_ROOT) to be included
1254
+	 * @param string|array $file =null file to be included - no ".js" on the end or array with get params
1255
+	 * @param string $app ='phpgwapi' application directory to search - default = phpgwapi
1256
+	 * @param boolean $append =true should the file be added
1257
+	 */
1258 1258
 	static function includeJS($package, $file=null, $app='phpgwapi')
1259 1259
 	{
1260 1260
 		self::$js_include_mgr->include_js_file($package, $file, $app);
Please login to merge, or discard this patch.
api/src/Storage/Base.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1367,14 +1367,14 @@
 block discarded – undo
1367 1367
 	}
1368 1368
 
1369 1369
 	/**
1370
-	* Get a default list of columns to search
1371
-	* This is to be used as a fallback, for when the extending class does not define
1372
-	* $this->columns_to_search.  All the columns are considered, and any with $skip_columns_with in
1373
-	* their name are discarded because these columns are expected to be foreign keys or other numeric
1374
-	* values with no meaning to the user.
1375
-	*
1376
-	* @return array of column names
1377
-	*/
1370
+	 * Get a default list of columns to search
1371
+	 * This is to be used as a fallback, for when the extending class does not define
1372
+	 * $this->columns_to_search.  All the columns are considered, and any with $skip_columns_with in
1373
+	 * their name are discarded because these columns are expected to be foreign keys or other numeric
1374
+	 * values with no meaning to the user.
1375
+	 *
1376
+	 * @return array of column names
1377
+	 */
1378 1378
 	protected function get_default_search_columns()
1379 1379
 	{
1380 1380
 		$skip_columns_with = array('_id', 'modified', 'modifier', 'status', 'cat_id', 'owner');
Please login to merge, or discard this patch.
api/src/Db/Backup.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 		$zip = NULL;
382 382
 		$_f = NULL;
383 383
 		if($type == 'zip')
384
-	    {
384
+		{
385 385
 			// has already been verified to be available in fopen_backup
386 386
 			$zip = new ZipArchive;
387 387
 			if(($zip->open($filename)) !== TRUE)
@@ -719,9 +719,9 @@  discard block
 block discarded – undo
719 719
 		while($file = $list[0])
720 720
 		{
721 721
 			if(is_dir($file) && $file != '.' && $file != '..')
722
-			    self::remove_dir_content($dir.'/'.$file);
722
+				self::remove_dir_content($dir.'/'.$file);
723 723
 			if(is_file($file) && $file != '.' && $file != '..')
724
-			    unlink($dir.'/'.$file);
724
+				unlink($dir.'/'.$file);
725 725
 			array_shift($list);
726 726
 		}
727 727
 		//rmdir($dir);  // dont remove own dir
@@ -967,8 +967,8 @@  discard block
 block discarded – undo
967 967
 				echo '<center>'.lang("Cant open %1, needs ZipArchive", $name)."<br>\n".'</center>';
968 968
 			}
969 969
 
970
-		    fclose($f);
971
-		    if (file_exists($name)) unlink($name);
970
+			fclose($f);
971
+			if (file_exists($name)) unlink($name);
972 972
 			return TRUE;
973 973
 		}
974 974
 		// save files ....
Please login to merge, or discard this patch.
api/src/Db/Schema.php 1 patch
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -101,19 +101,19 @@  discard block
 block discarded – undo
101 101
 	 */
102 102
 	function __construct($dbms=False, Api\Db $db=null)
103 103
 	{
104
-	    if(is_object($db))
104
+		if(is_object($db))
105 105
 		{
106 106
 			$this->m_odb = $db;
107
-	    }
108
-	    else
109
-	    {
107
+		}
108
+		else
109
+		{
110 110
 			$this->m_odb = isset($GLOBALS['egw']->db) && is_object($GLOBALS['egw']->db) ? $GLOBALS['egw']->db : $GLOBALS['egw_setup']->db;
111
-	    }
112
-	    if (!($this->m_odb instanceof Api\Db))
113
-	    {
114
-	    	throw new Api\Exception\AssertionFailed('no EGroupware\Api\Db object!');
115
-	    }
116
-	    $this->m_odb->connect();
111
+		}
112
+		if (!($this->m_odb instanceof Api\Db))
113
+		{
114
+			throw new Api\Exception\AssertionFailed('no EGroupware\Api\Db object!');
115
+		}
116
+		$this->m_odb->connect();
117 117
 		$this->capabilities =& $this->m_odb->capabilities;
118 118
 
119 119
 		$this->sType = $dbms ? $dbms : $this->m_odb->Type;
@@ -828,79 +828,79 @@  discard block
 block discarded – undo
828 828
 	}
829 829
 
830 830
 	/**
831
-	* Return the value of a column
832
-	*
833
-	* @param string|integer $value name of field or positional index starting from 0
834
-	* @param bool $strip_slashes string escape chars from field(optional), default false
835
-	* @deprecated use result-set returned by query/select
836
-	* @return string the field value
837
-	*/
831
+	 * Return the value of a column
832
+	 *
833
+	 * @param string|integer $value name of field or positional index starting from 0
834
+	 * @param bool $strip_slashes string escape chars from field(optional), default false
835
+	 * @deprecated use result-set returned by query/select
836
+	 * @return string the field value
837
+	 */
838 838
 	function f($value,$strip_slashes=False)
839 839
 	{
840 840
 		if (!($this->m_odb instanceof Deprecated))
841 841
 		{
842
-	    	throw new Api\Exception\AssertionFailed(__METHOD__.' requires an EGroupware\Api\Db\Deprecated object!');
842
+			throw new Api\Exception\AssertionFailed(__METHOD__.' requires an EGroupware\Api\Db\Deprecated object!');
843 843
 		}
844 844
 		return $this->m_odb->f($value,$strip_slashes);
845 845
 	}
846 846
 
847 847
 	/**
848
-	* Number of rows in current result set
849
-	*
850
-	* @deprecated use result-set returned by query/select
851
-	* @return int number of rows
852
-	*/
848
+	 * Number of rows in current result set
849
+	 *
850
+	 * @deprecated use result-set returned by query/select
851
+	 * @return int number of rows
852
+	 */
853 853
 	function num_rows()
854 854
 	{
855 855
 		if (!($this->m_odb instanceof Deprecated))
856 856
 		{
857
-	    	throw new Api\Exception\AssertionFailed(__METHOD__.' requires an EGroupware\Api\Db\Deprecated object!');
857
+			throw new Api\Exception\AssertionFailed(__METHOD__.' requires an EGroupware\Api\Db\Deprecated object!');
858 858
 		}
859 859
 		return $this->m_odb->num_rows();
860 860
 	}
861 861
 
862 862
 	/**
863
-	* Move to the next row in the results set
864
-	*
865
-	* @deprecated use result-set returned by query/select
866
-	* @return bool was another row found?
867
-	*/
863
+	 * Move to the next row in the results set
864
+	 *
865
+	 * @deprecated use result-set returned by query/select
866
+	 * @return bool was another row found?
867
+	 */
868 868
 	function next_record()
869 869
 	{
870 870
 		if (!($this->m_odb instanceof Deprecated))
871 871
 		{
872
-	    	throw new Api\Exception\AssertionFailed(__METHOD__.' requires an EGroupware\Api\Db\Deprecated object!');
872
+			throw new Api\Exception\AssertionFailed(__METHOD__.' requires an EGroupware\Api\Db\Deprecated object!');
873 873
 		}
874 874
 		return $this->m_odb->next_record();
875 875
 	}
876 876
 
877 877
 	/**
878
-	* Execute a query
879
-	*
880
-	* @param string $Query_String the query to be executed
881
-	* @param mixed $line the line method was called from - use __LINE__
882
-	* @param string $file the file method was called from - use __FILE__
883
-	* @param int $offset row to start from
884
-	* @param int $num_rows number of rows to return (optional), if unset will use $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']
885
-	* @return ADORecordSet or false, if the query fails
886
-	*/
878
+	 * Execute a query
879
+	 *
880
+	 * @param string $Query_String the query to be executed
881
+	 * @param mixed $line the line method was called from - use __LINE__
882
+	 * @param string $file the file method was called from - use __FILE__
883
+	 * @param int $offset row to start from
884
+	 * @param int $num_rows number of rows to return (optional), if unset will use $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']
885
+	 * @return ADORecordSet or false, if the query fails
886
+	 */
887 887
 	function query($sQuery, $line='', $file='')
888 888
 	{
889 889
 		return $this->m_odb->query($sQuery, $line, $file);
890 890
 	}
891 891
 
892 892
 	/**
893
-	* Insert a row of data into a table or updates it if $where is given, all data is quoted according to it's type
894
-	*
895
-	* @param string $table name of the table
896
-	* @param array $data with column-name / value pairs
897
-	* @param mixed $where string with where clause or array with column-name / values pairs to check if a row with that keys already exists, or false for an unconditional insert
898
-	*	if the row exists db::update is called else a new row with $date merged with $where gets inserted (data has precedence)
899
-	* @param int $line line-number to pass to query
900
-	* @param string $file file-name to pass to query
901
-	* @param string $app=false string with name of app, this need to be set in setup anyway!!!
902
-	* @return ADORecordSet or false, if the query fails
903
-	*/
893
+	 * Insert a row of data into a table or updates it if $where is given, all data is quoted according to it's type
894
+	 *
895
+	 * @param string $table name of the table
896
+	 * @param array $data with column-name / value pairs
897
+	 * @param mixed $where string with where clause or array with column-name / values pairs to check if a row with that keys already exists, or false for an unconditional insert
898
+	 *	if the row exists db::update is called else a new row with $date merged with $where gets inserted (data has precedence)
899
+	 * @param int $line line-number to pass to query
900
+	 * @param string $file file-name to pass to query
901
+	 * @param string $app=false string with name of app, this need to be set in setup anyway!!!
902
+	 * @return ADORecordSet or false, if the query fails
903
+	 */
904 904
 	function insert($table,$data,$where,$line,$file,$app=False,$use_prepared_statement=false)
905 905
 	{
906 906
 		return $this->m_odb->insert($table,$data,$where,$line,$file,$app,$use_prepared_statement);
Please login to merge, or discard this patch.
api/src/Db/Deprecated.php 1 patch
Indentation   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -41,19 +41,19 @@  discard block
 block discarded – undo
41 41
 	var $Query_ID = 0;
42 42
 
43 43
 	/**
44
-	* Execute a query
45
-	*
46
-	* @param string $Query_String the query to be executed
47
-	* @param int $line the line method was called from - use __LINE__
48
-	* @param string $file the file method was called from - use __FILE__
49
-	* @param int $offset row to start from, default 0
50
-	* @param int $num_rows number of rows to return (optional), default -1 = all, 0 will use $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs']
51
-	* @param array|boolean $inputarr array for binding variables to parameters or false (default)
52
-	* @param int $fetchmode =self::FETCH_BOTH self::FETCH_BOTH (default), self::FETCH_ASSOC or self::FETCH_NUM
53
-	* @param boolean $reconnect =true true: try reconnecting if server closes connection, false: dont (mysql only!)
54
-	* @return ADORecordSet or false, if the query fails
55
-	* @throws EGroupware\Api\Db\Exception\InvalidSql with $this->Link_ID->ErrorNo() as code
56
-	*/
44
+	 * Execute a query
45
+	 *
46
+	 * @param string $Query_String the query to be executed
47
+	 * @param int $line the line method was called from - use __LINE__
48
+	 * @param string $file the file method was called from - use __FILE__
49
+	 * @param int $offset row to start from, default 0
50
+	 * @param int $num_rows number of rows to return (optional), default -1 = all, 0 will use $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs']
51
+	 * @param array|boolean $inputarr array for binding variables to parameters or false (default)
52
+	 * @param int $fetchmode =self::FETCH_BOTH self::FETCH_BOTH (default), self::FETCH_ASSOC or self::FETCH_NUM
53
+	 * @param boolean $reconnect =true true: try reconnecting if server closes connection, false: dont (mysql only!)
54
+	 * @return ADORecordSet or false, if the query fails
55
+	 * @throws EGroupware\Api\Db\Exception\InvalidSql with $this->Link_ID->ErrorNo() as code
56
+	 */
57 57
 	function query($Query_String, $line = '', $file = '', $offset=0, $num_rows=-1, $inputarr=false, $fetchmode=self::FETCH_BOTH, $reconnect=true)
58 58
 	{
59 59
 		// New query, discard previous result.
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
 	}
77 77
 
78 78
 	/**
79
-	* Escape strings before sending them to the database
80
-	*
81
-	* @deprecated use quote($value,$type='') instead
82
-	* @param string $str the string to be escaped
83
-	* @return string escaped sting
84
-	*/
79
+	 * Escape strings before sending them to the database
80
+	 *
81
+	 * @deprecated use quote($value,$type='') instead
82
+	 * @param string $str the string to be escaped
83
+	 * @return string escaped sting
84
+	 */
85 85
 	function db_addslashes($str)
86 86
 	{
87 87
 		if (!isset($str) || $str == '')
@@ -107,14 +107,14 @@  discard block
 block discarded – undo
107 107
 	}
108 108
 
109 109
 	/**
110
-	* Move to the next row in the results set
111
-	*
112
-	* Specifying a fetch_mode only works for newly fetched rows, the first row always gets fetched by query!!!
113
-	*
114
-	* @deprecated use foreach(query() or foreach(select() to loop over the query using the global db object
115
-	* @param int $fetch_mode self::FETCH_BOTH = numerical+assoc keys (eGW default), self::FETCH_ASSOC or self::FETCH_NUM
116
-	* @return bool was another row found?
117
-	*/
110
+	 * Move to the next row in the results set
111
+	 *
112
+	 * Specifying a fetch_mode only works for newly fetched rows, the first row always gets fetched by query!!!
113
+	 *
114
+	 * @deprecated use foreach(query() or foreach(select() to loop over the query using the global db object
115
+	 * @param int $fetch_mode self::FETCH_BOTH = numerical+assoc keys (eGW default), self::FETCH_ASSOC or self::FETCH_NUM
116
+	 * @return bool was another row found?
117
+	 */
118 118
 	function next_record($fetch_mode=self::FETCH_BOTH)
119 119
 	{
120 120
 		if (!$this->Query_ID)
@@ -164,12 +164,12 @@  discard block
 block discarded – undo
164 164
 	}
165 165
 
166 166
 	/**
167
-	* Move to position in result set
168
-	*
169
-	* @deprecated use the result-object returned by query() or select() direct, so you can use the global db-object and not a clone
170
-	* @param int $pos required row (optional), default first row
171
-	* @return boolean true if sucessful or false if not found
172
-	*/
167
+	 * Move to position in result set
168
+	 *
169
+	 * @deprecated use the result-object returned by query() or select() direct, so you can use the global db-object and not a clone
170
+	 * @param int $pos required row (optional), default first row
171
+	 * @return boolean true if sucessful or false if not found
172
+	 */
173 173
 	function seek($pos = 0)
174 174
 	{
175 175
 		if (!$this->Query_ID  || !$this->Query_ID->Move($this->Row = $pos))
@@ -180,74 +180,74 @@  discard block
 block discarded – undo
180 180
 	}
181 181
 
182 182
 	/**
183
-	* Lock a table
184
-	*
185
-	* @deprecated not used anymore as it costs to much performance, use transactions if needed
186
-	* @param string $table name of table to lock
187
-	* @param string $mode type of lock required (optional), default write
188
-	* @return bool True if sucessful, False if fails
189
-	*/
183
+	 * Lock a table
184
+	 *
185
+	 * @deprecated not used anymore as it costs to much performance, use transactions if needed
186
+	 * @param string $table name of table to lock
187
+	 * @param string $mode type of lock required (optional), default write
188
+	 * @return bool True if sucessful, False if fails
189
+	 */
190 190
 	function lock($table, $mode='write')
191 191
 	{
192 192
 		unset($table, $mode);	// not used anymore
193 193
 	}
194 194
 
195 195
 	/**
196
-	* Unlock a table
197
-	*
198
-	* @deprecated not used anymore as it costs to much performance, use transactions if needed
199
-	* @return bool True if sucessful, False if fails
200
-	*/
196
+	 * Unlock a table
197
+	 *
198
+	 * @deprecated not used anymore as it costs to much performance, use transactions if needed
199
+	 * @return bool True if sucessful, False if fails
200
+	 */
201 201
 	function unlock()
202 202
 	{}
203 203
 
204 204
 	/**
205
-	* Number of rows in current result set
206
-	*
207
-	* @deprecated use the result-object returned by query/select()->NumRows(), so you can use the global db-object and not a clone
208
-	* @return int number of rows
209
-	*/
205
+	 * Number of rows in current result set
206
+	 *
207
+	 * @deprecated use the result-object returned by query/select()->NumRows(), so you can use the global db-object and not a clone
208
+	 * @return int number of rows
209
+	 */
210 210
 	function num_rows()
211 211
 	{
212 212
 		return $this->Query_ID ? $this->Query_ID->RecordCount() : False;
213 213
 	}
214 214
 
215 215
 	/**
216
-	* Number of fields in current row
217
-	*
218
-	* @deprecated use the result-object returned by query() or select() direct, so you can use the global db-object and not a clone
219
-	* @return int number of fields
220
-	*/
216
+	 * Number of fields in current row
217
+	 *
218
+	 * @deprecated use the result-object returned by query() or select() direct, so you can use the global db-object and not a clone
219
+	 * @return int number of fields
220
+	 */
221 221
 	function num_fields()
222 222
 	{
223 223
 		return $this->Query_ID ? $this->Query_ID->FieldCount() : False;
224 224
 	}
225 225
 
226 226
 	/**
227
-	* @deprecated use num_rows()
228
-	*/
227
+	 * @deprecated use num_rows()
228
+	 */
229 229
 	function nf()
230 230
 	{
231 231
 		return $this->num_rows();
232 232
 	}
233 233
 
234 234
 	/**
235
-	* @deprecated use print num_rows()
236
-	*/
235
+	 * @deprecated use print num_rows()
236
+	 */
237 237
 	function np()
238 238
 	{
239 239
 		print $this->num_rows();
240 240
 	}
241 241
 
242 242
 	/**
243
-	* Return the value of a column
244
-	*
245
-	* @deprecated use the result-object returned by query() or select() direct, so you can use the global db-object and not a clone
246
-	* @param string|integer $Name name of field or positional index starting from 0
247
-	* @param bool $strip_slashes string escape chars from field(optional), default false
248
-	*	depricated param, as correctly quoted values dont need any stripslashes!
249
-	* @return string the field value
250
-	*/
243
+	 * Return the value of a column
244
+	 *
245
+	 * @deprecated use the result-object returned by query() or select() direct, so you can use the global db-object and not a clone
246
+	 * @param string|integer $Name name of field or positional index starting from 0
247
+	 * @param bool $strip_slashes string escape chars from field(optional), default false
248
+	 *	depricated param, as correctly quoted values dont need any stripslashes!
249
+	 * @return string the field value
250
+	 */
251 251
 	function f($Name, $strip_slashes = False)
252 252
 	{
253 253
 		if ($strip_slashes)
@@ -258,26 +258,26 @@  discard block
 block discarded – undo
258 258
 	}
259 259
 
260 260
 	/**
261
-	* Print the value of a field
262
-	*
263
-	* @deprecated use the result-object returned by query() or select() direct, so you can use the global db-object and not a clone
264
-	* @param string $Name name of field to print
265
-	* @param bool $strip_slashes string escape chars from field(optional), default false
266
-	*	depricated param, as correctly quoted values dont need any stripslashes!
267
-	*/
261
+	 * Print the value of a field
262
+	 *
263
+	 * @deprecated use the result-object returned by query() or select() direct, so you can use the global db-object and not a clone
264
+	 * @param string $Name name of field to print
265
+	 * @param bool $strip_slashes string escape chars from field(optional), default false
266
+	 *	depricated param, as correctly quoted values dont need any stripslashes!
267
+	 */
268 268
 	function p($Name, $strip_slashes = True)
269 269
 	{
270 270
 		print $this->f($Name, $strip_slashes);
271 271
 	}
272 272
 
273 273
 	/**
274
-	* Returns a query-result-row as an associative array (no numerical keys !!!)
275
-	*
276
-	* @deprecated use foreach(query() or foreach(select() to loop over the query using the global db object
277
-	* @param bool $do_next_record should next_record() be called or not (default not)
278
-	* @param string $strip ='' string to strip of the column-name, default ''
279
-	* @return array/bool the associative array or False if no (more) result-row is availible
280
-	*/
274
+	 * Returns a query-result-row as an associative array (no numerical keys !!!)
275
+	 *
276
+	 * @deprecated use foreach(query() or foreach(select() to loop over the query using the global db object
277
+	 * @param bool $do_next_record should next_record() be called or not (default not)
278
+	 * @param string $strip ='' string to strip of the column-name, default ''
279
+	 * @return array/bool the associative array or False if no (more) result-row is availible
280
+	 */
281 281
 	function row($do_next_record=False,$strip='')
282 282
 	{
283 283
 		if ($do_next_record && !$this->next_record(self::FETCH_ASSOC) || !is_array($this->Record))
Please login to merge, or discard this patch.
api/src/Link.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
 		}
481 481
 		$ids = Link\Storage::get_links($app, $id, $only_app, $order, $deleted, $limit);
482 482
 		if (empty($only_app) || $only_app == self::VFS_APPNAME ||
483
-		    ($only_app[0] == '!' && $only_app != '!'.self::VFS_APPNAME))
483
+			($only_app[0] == '!' && $only_app != '!'.self::VFS_APPNAME))
484 484
 		{
485 485
 			if (($vfs_ids = self::list_attached($app,$id)))
486 486
 			{
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 		$links = Link\Storage::get_links($app,$ids,$only_app,$order,$deleted);
537 537
 
538 538
 		if (empty($only_app) || $only_app == self::VFS_APPNAME ||
539
-		    ($only_app[0] == '!' && $only_app != '!'.self::VFS_APPNAME))
539
+			($only_app[0] == '!' && $only_app != '!'.self::VFS_APPNAME))
540 540
 		{
541 541
 			// todo do that in a single query, eg. directory listing, too
542 542
 			foreach($ids as $id)
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
 
794 794
 		if (!isset($options['total']))
795 795
 		{
796
-		       $options['total'] = count($result);
796
+			   $options['total'] = count($result);
797 797
 		}
798 798
 		if (is_array($result) && (isset($options['start']) || (isset($options['num_rows']) && count($result) > $options['num_rows'])))
799 799
 		{
Please login to merge, or discard this patch.
api/src/Contacts/Storage.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -44,23 +44,23 @@  discard block
 block discarded – undo
44 44
 	var $extra_table = 'egw_addressbook_extra';
45 45
 
46 46
 	/**
47
-	* @var string
48
-	*/
47
+	 * @var string
48
+	 */
49 49
 	var $extra_id = 'contact_id';
50 50
 
51 51
 	/**
52
-	* @var string
53
-	*/
52
+	 * @var string
53
+	 */
54 54
 	var $extra_owner = 'contact_owner';
55 55
 
56 56
 	/**
57
-	* @var string
58
-	*/
57
+	 * @var string
58
+	 */
59 59
 	var $extra_key = 'contact_name';
60 60
 
61 61
 	/**
62
-	* @var string
63
-	*/
62
+	 * @var string
63
+	 */
64 64
 	var $extra_value = 'contact_value';
65 65
 
66 66
 	/**
@@ -71,23 +71,23 @@  discard block
 block discarded – undo
71 71
 	var $distributionlist_view ='(SELECT contact_id, egw_addressbook_lists.list_id as list_id, egw_addressbook_lists.list_name as list_name, egw_addressbook_lists.list_owner as list_owner FROM egw_addressbook_lists, egw_addressbook2list where egw_addressbook_lists.list_id=egw_addressbook2list.list_id) d_view ';
72 72
 	var $distributionlist_tabledef = array();
73 73
 	/**
74
-	* @var string
75
-	*/
74
+	 * @var string
75
+	 */
76 76
 	var $distri_id = 'contact_id';
77 77
 
78 78
 	/**
79
-	* @var string
80
-	*/
79
+	 * @var string
80
+	 */
81 81
 	var $distri_owner = 'list_owner';
82 82
 
83 83
 	/**
84
-	* @var string
85
-	*/
84
+	 * @var string
85
+	 */
86 86
 	var $distri_key = 'list_id';
87 87
 
88 88
 	/**
89
-	* @var string
90
-	*/
89
+	 * @var string
90
+	 */
91 91
 	var $distri_value = 'list_name';
92 92
 
93 93
 	/**
@@ -160,10 +160,10 @@  discard block
 block discarded – undo
160 160
 	var $content_types = array();
161 161
 
162 162
 	/**
163
-	* Special content type to indicate a deleted addressbook
164
-	*
165
-	* @var String;
166
-	*/
163
+	 * Special content type to indicate a deleted addressbook
164
+	 *
165
+	 * @var String;
166
+	 */
167 167
 	const DELETED_TYPE = 'D';
168 168
 
169 169
 	/**
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 			$this->distributionlist_tabledef = array('fd' => array(
269 269
 					$this->distri_id => $tda2list['fd'][$this->distri_id],
270 270
 					$this->distri_owner => $tdlists['fd'][$this->distri_owner],
271
-        	    	$this->distri_key => $tdlists['fd'][$this->distri_key],
271
+					$this->distri_key => $tdlists['fd'][$this->distri_key],
272 272
 					$this->distri_value => $tdlists['fd'][$this->distri_value],
273 273
 				), 'pk' => array(), 'fk' => array(), 'ix' => array(), 'uc' => array(),
274 274
 			);
@@ -469,12 +469,12 @@  discard block
 block discarded – undo
469 469
 	}
470 470
 
471 471
 	/**
472
-	* deletes contact entry including custom fields
473
-	*
474
-	* @param mixed $contact array with id or just the id
475
-	* @param int $check_etag =null
476
-	* @return boolean|int true on success or false on failiure, 0 if etag does not match
477
-	*/
472
+	 * deletes contact entry including custom fields
473
+	 *
474
+	 * @param mixed $contact array with id or just the id
475
+	 * @param int $check_etag =null
476
+	 * @return boolean|int true on success or false on failiure, 0 if etag does not match
477
+	 */
478 478
 	function delete($contact,$check_etag=null)
479 479
 	{
480 480
 		if (is_array($contact)) $contact = $contact['id'];
@@ -510,11 +510,11 @@  discard block
 block discarded – undo
510 510
 	}
511 511
 
512 512
 	/**
513
-	* saves contact data including custom fields
514
-	*
515
-	* @param array &$contact contact data from etemplate::exec
516
-	* @return bool false on success, errornumber on failure
517
-	*/
513
+	 * saves contact data including custom fields
514
+	 *
515
+	 * @param array &$contact contact data from etemplate::exec
516
+	 * @return bool false on success, errornumber on failure
517
+	 */
518 518
 	function save(&$contact)
519 519
 	{
520 520
 		// save mainfields
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
 	 *
567 567
 	 * @param int|string $contact_id contact_id or 'a'.account_id
568 568
 	 * @return array|boolean data if row could be retrived else False
569
-	*/
569
+	 */
570 570
 	function read($contact_id)
571 571
 	{
572 572
 		if (!is_array($contact_id) && substr($contact_id,0,8) == 'account:')
@@ -796,10 +796,10 @@  discard block
 block discarded – undo
796 796
 	}
797 797
 
798 798
  	/**
799
-	 * gets all contact fields from database
800
-	 *
801
-	 * @return array of (internal) field-names
802
-	 */
799
+ 	 * gets all contact fields from database
800
+ 	 *
801
+ 	 * @return array of (internal) field-names
802
+ 	 */
803 803
 	function get_contact_columns()
804 804
 	{
805 805
 		$fields = $this->get_fields('all');
Please login to merge, or discard this patch.
api/src/Contacts/Ldap.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -41,33 +41,33 @@  discard block
 block discarded – undo
41 41
 	var $contacts_id='id';
42 42
 
43 43
 	/**
44
-	* @var string $accountName holds the accountname of the current user
45
-	*/
44
+	 * @var string $accountName holds the accountname of the current user
45
+	 */
46 46
 	var $accountName;
47 47
 
48 48
 	/**
49
-	* @var object $ldapServerInfo holds the information about the current used ldap server
50
-	*/
49
+	 * @var object $ldapServerInfo holds the information about the current used ldap server
50
+	 */
51 51
 	var $ldapServerInfo;
52 52
 
53 53
 	/**
54
-	* @var int $ldapLimit how many rows to fetch from ldap server
55
-	*/
54
+	 * @var int $ldapLimit how many rows to fetch from ldap server
55
+	 */
56 56
 	var $ldapLimit = 2000;
57 57
 
58 58
 	/**
59
-	* @var string $personalContactsDN holds the base DN for the personal addressbooks
60
-	*/
59
+	 * @var string $personalContactsDN holds the base DN for the personal addressbooks
60
+	 */
61 61
 	var $personalContactsDN;
62 62
 
63 63
 	/**
64
-	* @var string $sharedContactsDN holds the base DN for the shared addressbooks
65
-	*/
64
+	 * @var string $sharedContactsDN holds the base DN for the shared addressbooks
65
+	 */
66 66
 	var $sharedContactsDN;
67 67
 
68 68
 	/**
69
-	* @var string $accountContactsDN holds the base DN for accounts addressbook
70
-	*/
69
+	 * @var string $accountContactsDN holds the base DN for accounts addressbook
70
+	 */
71 71
 	var $accountContactsDN;
72 72
 
73 73
 	/**
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 	var $accountsFilter = '(objectclass=posixaccount)';
78 78
 
79 79
 	/**
80
-	* @var string $allContactsDN holds the base DN of all addressbook
81
-	*/
80
+	 * @var string $allContactsDN holds the base DN of all addressbook
81
+	 */
82 82
 	var $allContactsDN;
83 83
 
84 84
 	/**
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 	var $never_change_dn = false;
97 97
 
98 98
 	/**
99
-	* @var int $total holds the total count of found rows
100
-	*/
99
+	 * @var int $total holds the total count of found rows
100
+	 */
101 101
 	var $total;
102 102
 
103 103
 	/**
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 	 *
404 404
 	 * @param string|array $contact_id contact_id or array with values for id or account_id
405 405
 	 * @return array/boolean data if row could be retrived else False
406
-	*/
406
+	 */
407 407
 	function read($contact_id)
408 408
 	{
409 409
 		if (is_array($contact_id) && isset($contact_id['account_id']) ||
Please login to merge, or discard this patch.