Test Setup Failed
Push — master ( 12c298...4a14e0 )
by Ralf
22:03
created
mail/inc/class.mail_zpush.inc.php 1 patch
Indentation   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -324,44 +324,44 @@  discard block
 block discarded – undo
324 324
 		return $folderlist;
325 325
 	}
326 326
 
327
-    /**
328
-     * Sends a message which is passed as rfc822. You basically can do two things
329
-     * 1) Send the message to an SMTP server as-is
330
-     * 2) Parse the message yourself, and send it some other way
331
-     * It is up to you whether you want to put the message in the sent items folder. If you
332
-     * want it in 'sent items', then the next sync on the 'sent items' folder should return
333
-     * the new message as any other new message in a folder.
334
-     *
335
-     * @param array $smartdata = IMAP-SendMail: SyncSendMail (
336
-     *        (S) clientid => SendMail-30722448149304
337
-     *        (S) saveinsent => empty
338
-     *        (S) replacemime => null
339
-     *        (S) accountid => null
340
-     *        (S) source => SyncSendMailSource (
341
-     *                                (S) folderid => 101000000000
342
-     *                                (S) itemid => 33776
343
-     *                                (S) longid => null
344
-     *                                (S) instanceid => null
345
-     *                                unsetVars(Array) size: 0
346
-     *                                flags => false
347
-     *                                content => null
348
-     *                        )
349
-     *        (S) mime => Date: Tue, 23 Jun 2015 14:13:23 +0200
350
-     *Subject: AW: Blauer himmel
351
-     *....
352
-     *        (S) replyflag => true
353
-     *        (S) forwardflag => null
354
-     *        unsetVars(Array) size: 0
355
-     *        flags => false
356
-     *        content => null
357
-     *)
327
+	/**
328
+	 * Sends a message which is passed as rfc822. You basically can do two things
329
+	 * 1) Send the message to an SMTP server as-is
330
+	 * 2) Parse the message yourself, and send it some other way
331
+	 * It is up to you whether you want to put the message in the sent items folder. If you
332
+	 * want it in 'sent items', then the next sync on the 'sent items' folder should return
333
+	 * the new message as any other new message in a folder.
334
+	 *
335
+	 * @param array $smartdata = IMAP-SendMail: SyncSendMail (
336
+	 *        (S) clientid => SendMail-30722448149304
337
+	 *        (S) saveinsent => empty
338
+	 *        (S) replacemime => null
339
+	 *        (S) accountid => null
340
+	 *        (S) source => SyncSendMailSource (
341
+	 *                                (S) folderid => 101000000000
342
+	 *                                (S) itemid => 33776
343
+	 *                                (S) longid => null
344
+	 *                                (S) instanceid => null
345
+	 *                                unsetVars(Array) size: 0
346
+	 *                                flags => false
347
+	 *                                content => null
348
+	 *                        )
349
+	 *        (S) mime => Date: Tue, 23 Jun 2015 14:13:23 +0200
350
+	 *Subject: AW: Blauer himmel
351
+	 *....
352
+	 *        (S) replyflag => true
353
+	 *        (S) forwardflag => null
354
+	 *        unsetVars(Array) size: 0
355
+	 *        flags => false
356
+	 *        content => null
357
+	 *)
358
+	 *
359
+	 * @return boolean true on success, false on error
358 360
 	 *
359
-     * @return boolean true on success, false on error
360
-     *
361
-     * @see eg. BackendIMAP::SendMail()
362
-     * @todo implement either here or in mail backend
363
-     * 	(maybe sending here and storing to sent folder in plugin, as sending is supposed to always work in EGroupware)
364
-     */
361
+	 * @see eg. BackendIMAP::SendMail()
362
+	 * @todo implement either here or in mail backend
363
+	 * 	(maybe sending here and storing to sent folder in plugin, as sending is supposed to always work in EGroupware)
364
+	 */
365 365
 	public function SendMail($smartdata)
366 366
 	{
367 367
 		//$this->debugLevel=2;
@@ -508,8 +508,8 @@  discard block
 block discarded – undo
508 508
 		//error_log(__METHOD__.__LINE__.array2string($mailObject));
509 509
 		// if this is a multipart message with a boundary, we must use the original body
510 510
 		//if ($this->debugLevel>2) ZLog::Write(LOGLEVEL_DEBUG,__METHOD__.__LINE__.' mailObject after Inital Parse:'.array2string($mailObject));
511
-        if ($use_orgbody) {
512
-    	    ZLog::Write(LOGLEVEL_DEBUG,__METHOD__."(".__LINE__.") use_orgbody = true ContentType:".$ContentType);
511
+		if ($use_orgbody) {
512
+			ZLog::Write(LOGLEVEL_DEBUG,__METHOD__."(".__LINE__.") use_orgbody = true ContentType:".$ContentType);
513 513
  			// if it is a ClientSideMeetingRequest, we report it as send at all times
514 514
 			if (($cal_body = $mailObject->findBody('calendar')) &&
515 515
 				($cSMRMethod = $cal_body->getContentTypeParameter('method')))
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
 				if ($this->debugLevel) ZLog::Write(LOGLEVEL_DEBUG,__METHOD__."(".__LINE__.") we have a Client Side Meeting Request from organizer=$organizer");
522 522
 				$ClientSideMeetingRequest = true;
523 523
 			}
524
-        }
524
+		}
525 525
 		// now handle the addressee list
526 526
 		$toCount = 0;
527 527
 		//error_log(__METHOD__.__LINE__.array2string($toMailAddr));
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 			$bodyStruct = $this->mail->getMessageBody($uid, 'html_only');
587 587
 			$bodyBUFFHtml = $this->mail->getdisplayableBody($this->mail,$bodyStruct,true,false);
588 588
 			if ($this->debugLevel>3) ZLog::Write(LOGLEVEL_DEBUG,__METHOD__.__LINE__.' html_only:'.$bodyBUFFHtml);
589
-		    if ($bodyBUFFHtml != "" && (is_array($bodyStruct) && $bodyStruct[0]['mimeType']=='text/html')) {
589
+			if ($bodyBUFFHtml != "" && (is_array($bodyStruct) && $bodyStruct[0]['mimeType']=='text/html')) {
590 590
 				// may be html
591 591
 				if ($this->debugLevel>0) ZLog::Write(LOGLEVEL_DEBUG,__METHOD__."(".__LINE__.") MIME Body".' Type:html (fetched with html_only):'.$bodyBUFFHtml);
592 592
 				$AltBody = $AltBody."</br>".$bodyBUFFHtml.$sigTextHtml;
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
 			$this->splitID($smartdata->source->folderid, $account, $folder);
634 634
 
635 635
 			$this->mail->reopen($folder);
636
-            // receive entire mail (header + body)
636
+			// receive entire mail (header + body)
637 637
 			// get message headers for specified message
638 638
 			$headers	= $this->mail->getMessageEnvelope($uid, $_partID, true, $folder);
639 639
 			// build a new mime message, forward entire old mail as file
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
 		}
721 721
 		//advanced debugging
722 722
 		// Horde SMTP Class uses utf-8 by default.
723
-        //ZLog::Write(LOGLEVEL_DEBUG, "IMAP-SendMail: parsed message: ". print_r($message,1));
723
+		//ZLog::Write(LOGLEVEL_DEBUG, "IMAP-SendMail: parsed message: ". print_r($message,1));
724 724
 		if ($this->debugLevel>2) ZLog::Write(LOGLEVEL_DEBUG,__METHOD__."(".__LINE__."): MailObject:".array2string($mailObject));
725 725
 
726 726
 		// set a higher timeout for big messages
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
 						//$asf = false;
815 815
 						ZLog::Write(LOGLEVEL_DEBUG,__METHOD__.__LINE__.'->'.lang("Import of message %1 failed. Destination Folder %2 does not exist.",$mailObject->getHeader('Subject'),$folderName));
816 816
 					}
817
-			        ZLog::Write(LOGLEVEL_DEBUG,__METHOD__."(".__LINE__."): Outgoing mail saved in configured 'Sent' folder '".$folderName."': ". (($asf)?"success":"failed"));
817
+					ZLog::Write(LOGLEVEL_DEBUG,__METHOD__."(".__LINE__."): Outgoing mail saved in configured 'Sent' folder '".$folderName."': ". (($asf)?"success":"failed"));
818 818
 				}
819 819
 				//$this->mail->closeConnection();
820 820
 			}
@@ -1157,8 +1157,8 @@  discard block
 block discarded – undo
1157 1157
 			// end handle Attachments
1158 1158
 			unset($attachments);
1159 1159
 
1160
-            // Language Code Page ID: http://msdn.microsoft.com/en-us/library/windows/desktop/dd317756%28v=vs.85%29.aspx
1161
-            $output->internetcpid = INTERNET_CPID_UTF8;
1160
+			// Language Code Page ID: http://msdn.microsoft.com/en-us/library/windows/desktop/dd317756%28v=vs.85%29.aspx
1161
+			$output->internetcpid = INTERNET_CPID_UTF8;
1162 1162
 
1163 1163
 			if ($this->debugLevel>3) ZLog::Write(LOGLEVEL_DEBUG,__METHOD__.__LINE__.array2string($output));
1164 1164
 //$this->debugLevel=0;
@@ -1216,8 +1216,8 @@  discard block
 block discarded – undo
1216 1216
 	 * the exact string that is returned in the 'AttName' property of an SyncAttachment. So, you should
1217 1217
 	 * encode any information you need to find the attachment in that 'attname' property.
1218 1218
 	 *
1219
-     * @param string $fid - id
1220
-     * @param string $attname - should contain (folder)id
1219
+	 * @param string $fid - id
1220
+	 * @param string $attname - should contain (folder)id
1221 1221
 	 * @return SyncItemOperationsAttachment-object
1222 1222
 	 */
1223 1223
 	function GetAttachmentData($fid,$attname) {
@@ -1231,8 +1231,8 @@  discard block
 block discarded – undo
1231 1231
 	 * the exact string that is returned in the 'AttName' property of an SyncAttachment. So, you should
1232 1232
 	 * encode any information you need to find the attachment in that 'attname' property.
1233 1233
 	 *
1234
-     * @param string $fid - id
1235
-     * @param string $attname - should contain (folder)id
1234
+	 * @param string $fid - id
1235
+	 * @param string $attname - should contain (folder)id
1236 1236
 	 * @return SyncItemOperationsAttachment-object
1237 1237
 	 */
1238 1238
 	function ItemOperationsGetAttachmentData($fid,$attname) {
@@ -1245,8 +1245,8 @@  discard block
 block discarded – undo
1245 1245
 	 * -ItemOperationsGetAttachmentData
1246 1246
 	 * -GetAttachmentData
1247 1247
 	 *
1248
-     * @param string $fid - id
1249
-     * @param string $attname - should contain (folder)id
1248
+	 * @param string $fid - id
1249
+	 * @param string $attname - should contain (folder)id
1250 1250
 	 * @return SyncItemOperationsAttachment-object
1251 1251
 	 */
1252 1252
 	private function _GetAttachmentData($fid,$attname)
@@ -1800,22 +1800,22 @@  discard block
 block discarded – undo
1800 1800
 		return $id;
1801 1801
 	}
1802 1802
 
1803
-    /**
1804
-     * Called when the user has requested to delete (really delete) a message. Usually
1805
-     * this means just unlinking the file its in or somesuch. After this call has succeeded, a call to
1806
-     * GetMessageList() should no longer list the message. If it does, the message will be re-sent to the mobile
1807
-     * as it will be seen as a 'new' item. This means that if this method is not implemented, it's possible to
1808
-     * delete messages on the PDA, but as soon as a sync is done, the item will be resynched to the mobile
1809
-     *
1810
-     * @param string              $folderid             id of the folder
1811
-     * @param string              $id                   id of the message
1812
-     * @param ContentParameters   $contentParameters
1813
-     *
1814
-     * @access public
1815
-     * @return boolean                      status of the operation
1816
-     * @throws StatusException              could throw specific SYNC_STATUS_* exceptions
1817
-     */
1818
-    public function DeleteMessage($folderid, $id, $contentParameters)
1803
+	/**
1804
+	 * Called when the user has requested to delete (really delete) a message. Usually
1805
+	 * this means just unlinking the file its in or somesuch. After this call has succeeded, a call to
1806
+	 * GetMessageList() should no longer list the message. If it does, the message will be re-sent to the mobile
1807
+	 * as it will be seen as a 'new' item. This means that if this method is not implemented, it's possible to
1808
+	 * delete messages on the PDA, but as soon as a sync is done, the item will be resynched to the mobile
1809
+	 *
1810
+	 * @param string              $folderid             id of the folder
1811
+	 * @param string              $id                   id of the message
1812
+	 * @param ContentParameters   $contentParameters
1813
+	 *
1814
+	 * @access public
1815
+	 * @return boolean                      status of the operation
1816
+	 * @throws StatusException              could throw specific SYNC_STATUS_* exceptions
1817
+	 */
1818
+	public function DeleteMessage($folderid, $id, $contentParameters)
1819 1819
 	{
1820 1820
 		unset($contentParameters);	// not used, but required by function signature
1821 1821
 		ZLog::Write(LOGLEVEL_DEBUG, "IMAP-DeleteMessage: (fid: '$folderid'  id: '$id' )");
@@ -1857,24 +1857,24 @@  discard block
 block discarded – undo
1857 1857
 		return $rv;
1858 1858
 	}
1859 1859
 
1860
-    /**
1861
-     * Changes the 'read' flag of a message on disk. The $flags
1862
-     * parameter can only be '1' (read) or '0' (unread). After a call to
1863
-     * SetReadFlag(), GetMessageList() should return the message with the
1864
-     * new 'flags' but should not modify the 'mod' parameter. If you do
1865
-     * change 'mod', simply setting the message to 'read' on the mobile will trigger
1866
-     * a full resync of the item from the server.
1867
-     *
1868
-     * @param string              $folderid            id of the folder
1869
-     * @param string              $id                  id of the message
1870
-     * @param int                 $flags               read flag of the message
1871
-     * @param ContentParameters   $contentParameters
1872
-     *
1873
-     * @access public
1874
-     * @return boolean                      status of the operation
1875
-     * @throws StatusException              could throw specific SYNC_STATUS_* exceptions
1876
-     */
1877
-    public function SetReadFlag($folderid, $id, $flags, $contentParameters)
1860
+	/**
1861
+	 * Changes the 'read' flag of a message on disk. The $flags
1862
+	 * parameter can only be '1' (read) or '0' (unread). After a call to
1863
+	 * SetReadFlag(), GetMessageList() should return the message with the
1864
+	 * new 'flags' but should not modify the 'mod' parameter. If you do
1865
+	 * change 'mod', simply setting the message to 'read' on the mobile will trigger
1866
+	 * a full resync of the item from the server.
1867
+	 *
1868
+	 * @param string              $folderid            id of the folder
1869
+	 * @param string              $id                  id of the message
1870
+	 * @param int                 $flags               read flag of the message
1871
+	 * @param ContentParameters   $contentParameters
1872
+	 *
1873
+	 * @access public
1874
+	 * @return boolean                      status of the operation
1875
+	 * @throws StatusException              could throw specific SYNC_STATUS_* exceptions
1876
+	 */
1877
+	public function SetReadFlag($folderid, $id, $flags, $contentParameters)
1878 1878
 	{
1879 1879
 		unset($contentParameters);	// not used, but required by function signature
1880 1880
 		// ZLog::Write(LOGLEVEL_DEBUG, "IMAP-SetReadFlag: (fid: '$folderid'  id: '$id'  flags: '$flags' )");
Please login to merge, or discard this patch.
filemanager/inc/class.filemanager_hooks.inc.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 		);
104 104
 		if ($location == 'admin')
105 105
 		{
106
-        	display_section(self::$appname,$file);
106
+			display_section(self::$appname,$file);
107 107
 		}
108 108
 		else
109 109
 		{
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 			'yes' => lang('Yes')
124 124
 		);
125 125
 
126
-        $settings = array(
126
+		$settings = array(
127 127
 			'sections.1' => array(
128 128
 				'type'  => 'section',
129 129
 				'title' => lang('General settings'),
Please login to merge, or discard this patch.
infolog/inc/class.infolog_export_csv.inc.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -288,10 +288,10 @@
 block discarded – undo
288 288
 	}
289 289
 
290 290
 	/**
291
-	* Convert some internal data to something with more meaning
292
-	*
293
-	* This is for something specific to Infolog, in addition to the normal conversions.
294
-	*/
291
+	 * Convert some internal data to something with more meaning
292
+	 *
293
+	 * This is for something specific to Infolog, in addition to the normal conversions.
294
+	 */
295 295
 	public static function convert(infolog_egw_record &$record)
296 296
 	{
297 297
 		// Stub, for now
Please login to merge, or discard this patch.
infolog/inc/class.infolog_so.inc.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@
 block discarded – undo
270 270
 				$filtermethod .= " OR (".$this->responsible_filter($this->user, $deleted_too).
271 271
 					($filter == 'own' && count($public_user_list) ?	// offer's should show up in own, eg. startpage, but need read-access
272 272
 						" OR info_status = 'offer' AND $public_access" : '').")".
273
-				                 " AND (info_access='public'".($has_private_access?" OR $has_private_access":'').')';
273
+								 " AND (info_access='public'".($has_private_access?" OR $has_private_access":'').')';
274 274
 			}
275 275
 			elseif ($filter != 'my' && $filter != 'responsible')	// none --> all entrys user has rights to see
276 276
 			{
Please login to merge, or discard this patch.
api/src/Db.php 1 patch
Indentation   +241 added lines, -241 removed lines patch added patch discarded remove patch
@@ -67,38 +67,38 @@  discard block
 block discarded – undo
67 67
 	 */
68 68
 	const FETCH_BOTH = ADODB_FETCH_BOTH;
69 69
 	/**
70
-	* @var string $type translated database type: mysqlt+mysqli ==> mysql, same for odbc-types
71
-	*/
70
+	 * @var string $type translated database type: mysqlt+mysqli ==> mysql, same for odbc-types
71
+	 */
72 72
 	var $Type     = '';
73 73
 
74 74
 	/**
75
-	* @var string $type database type as defined in the header.inc.php, eg. mysqlt
76
-	*/
75
+	 * @var string $type database type as defined in the header.inc.php, eg. mysqlt
76
+	 */
77 77
 	var $setupType     = '';
78 78
 
79 79
 	/**
80
-	* @var string $Host database host to connect to
81
-	*/
80
+	 * @var string $Host database host to connect to
81
+	 */
82 82
 	var $Host     = '';
83 83
 
84 84
 	/**
85
-	* @var string $Port port number of database to connect to
86
-	*/
85
+	 * @var string $Port port number of database to connect to
86
+	 */
87 87
 	var $Port     = '';
88 88
 
89 89
 	/**
90
-	* @var string $Database name of database to use
91
-	*/
90
+	 * @var string $Database name of database to use
91
+	 */
92 92
 	var $Database = '';
93 93
 
94 94
 	/**
95
-	* @var string $User name of database user
96
-	*/
95
+	 * @var string $User name of database user
96
+	 */
97 97
 	var $User     = '';
98 98
 
99 99
 	/**
100
-	* @var string $Password password for database user
101
-	*/
100
+	 * @var string $Password password for database user
101
+	 */
102 102
 	var $Password = '';
103 103
 
104 104
 	/**
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
 	var $readonly = false;
108 108
 
109 109
 	/**
110
-	* @var int $Debug enable debuging - 0 no, 1 yes
111
-	*/
110
+	 * @var int $Debug enable debuging - 0 no, 1 yes
111
+	 */
112 112
 	var $Debug         = 0;
113 113
 
114 114
 	/**
@@ -119,23 +119,23 @@  discard block
 block discarded – undo
119 119
 	var $log_updates = false;
120 120
 
121 121
 	/**
122
-	* @var array $Record current record
123
-	*/
122
+	 * @var array $Record current record
123
+	 */
124 124
 	var $Record   = array();
125 125
 
126 126
 	/**
127
-	* @var int row number for current record
128
-	*/
127
+	 * @var int row number for current record
128
+	 */
129 129
 	var $Row;
130 130
 
131 131
 	/**
132
-	* @var int $Errno internal rdms error number for last error
133
-	*/
132
+	 * @var int $Errno internal rdms error number for last error
133
+	 */
134 134
 	var $Errno    = 0;
135 135
 
136 136
 	/**
137
-	* @var string descriptive text from last error
138
-	*/
137
+	 * @var string descriptive text from last error
138
+	 */
139 139
 	var $Error    = '';
140 140
 
141 141
 	/**
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
 	}
277 277
 
278 278
 	/**
279
-	* @param string $query query to be executed (optional)
280
-	*/
279
+	 * @param string $query query to be executed (optional)
280
+	 */
281 281
 
282 282
 	function db($query = '')
283 283
 	{
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
 	}
286 286
 
287 287
 	/**
288
-	* @return int current connection id
289
-	*/
288
+	 * @return int current connection id
289
+	 */
290 290
 	function link_id()
291 291
 	{
292 292
 		return $this->Link_ID;
@@ -663,8 +663,8 @@  discard block
 block discarded – undo
663 663
 	}
664 664
 
665 665
 	/**
666
-	* Close a connection to a database
667
-	*/
666
+	 * Close a connection to a database
667
+	 */
668 668
 	function disconnect()
669 669
 	{
670 670
 		if (!$this->privat_Link_ID)
@@ -678,11 +678,11 @@  discard block
 block discarded – undo
678 678
 	}
679 679
 
680 680
 	/**
681
-	* Convert a unix timestamp to a rdms specific timestamp
682
-	*
683
-	* @param int unix timestamp
684
-	* @return string rdms specific timestamp
685
-	*/
681
+	 * Convert a unix timestamp to a rdms specific timestamp
682
+	 *
683
+	 * @param int unix timestamp
684
+	 * @return string rdms specific timestamp
685
+	 */
686 686
 	function to_timestamp($epoch)
687 687
 	{
688 688
 		if (!$this->Link_ID && !$this->connect())
@@ -694,11 +694,11 @@  discard block
 block discarded – undo
694 694
 	}
695 695
 
696 696
 	/**
697
-	* Convert a rdms specific timestamp to a unix timestamp
698
-	*
699
-	* @param string rdms specific timestamp
700
-	* @return int unix timestamp
701
-	*/
697
+	 * Convert a rdms specific timestamp to a unix timestamp
698
+	 *
699
+	 * @param string rdms specific timestamp
700
+	 * @return int unix timestamp
701
+	 */
702 702
 	function from_timestamp($timestamp)
703 703
 	{
704 704
 		if (!$this->Link_ID && !$this->connect())
@@ -720,19 +720,19 @@  discard block
 block discarded – undo
720 720
 	}
721 721
 
722 722
 	/**
723
-	* Execute a query
724
-	*
725
-	* @param string $Query_String the query to be executed
726
-	* @param int $line the line method was called from - use __LINE__
727
-	* @param string $file the file method was called from - use __FILE__
728
-	* @param int $offset row to start from, default 0
729
-	* @param int $num_rows number of rows to return (optional), default -1 = all, 0 will use $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs']
730
-	* @param array|boolean $inputarr array for binding variables to parameters or false (default)
731
-	* @param int $fetchmode =self::FETCH_BOTH self::FETCH_BOTH (default), self::FETCH_ASSOC or self::FETCH_NUM
732
-	* @param boolean $reconnect =true true: try reconnecting if server closes connection, false: dont (mysql only!)
733
-	* @return ADORecordSet or false, if the query fails
734
-	* @throws Db\Exception\InvalidSql with $this->Link_ID->ErrorNo() as code
735
-	*/
723
+	 * Execute a query
724
+	 *
725
+	 * @param string $Query_String the query to be executed
726
+	 * @param int $line the line method was called from - use __LINE__
727
+	 * @param string $file the file method was called from - use __FILE__
728
+	 * @param int $offset row to start from, default 0
729
+	 * @param int $num_rows number of rows to return (optional), default -1 = all, 0 will use $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs']
730
+	 * @param array|boolean $inputarr array for binding variables to parameters or false (default)
731
+	 * @param int $fetchmode =self::FETCH_BOTH self::FETCH_BOTH (default), self::FETCH_ASSOC or self::FETCH_NUM
732
+	 * @param boolean $reconnect =true true: try reconnecting if server closes connection, false: dont (mysql only!)
733
+	 * @return ADORecordSet or false, if the query fails
734
+	 * @throws Db\Exception\InvalidSql with $this->Link_ID->ErrorNo() as code
735
+	 */
736 736
 	function query($Query_String, $line = '', $file = '', $offset=0, $num_rows=-1, $inputarr=false, $fetchmode=self::FETCH_BOTH, $reconnect=true)
737 737
 	{
738 738
 		unset($line, $file);	// not used anymore
@@ -797,26 +797,26 @@  discard block
 block discarded – undo
797 797
 	}
798 798
 
799 799
 	/**
800
-	* Execute a query with limited result set
801
-	*
802
-	* @param string $Query_String the query to be executed
803
-	* @param int $offset row to start from, default 0
804
-	* @param int $line the line method was called from - use __LINE__
805
-	* @param string $file the file method was called from - use __FILE__
806
-	* @param int $num_rows number of rows to return (optional), default -1 = all, 0 will use $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs']
807
-	* @param array|boolean $inputarr array for binding variables to parameters or false (default)
808
-	* @return ADORecordSet or false, if the query fails
809
-	*/
800
+	 * Execute a query with limited result set
801
+	 *
802
+	 * @param string $Query_String the query to be executed
803
+	 * @param int $offset row to start from, default 0
804
+	 * @param int $line the line method was called from - use __LINE__
805
+	 * @param string $file the file method was called from - use __FILE__
806
+	 * @param int $num_rows number of rows to return (optional), default -1 = all, 0 will use $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs']
807
+	 * @param array|boolean $inputarr array for binding variables to parameters or false (default)
808
+	 * @return ADORecordSet or false, if the query fails
809
+	 */
810 810
 	function limit_query($Query_String, $offset, $line = '', $file = '', $num_rows = '',$inputarr=false)
811 811
 	{
812 812
 		return $this->query($Query_String,$line,$file,$offset,$num_rows,$inputarr);
813 813
 	}
814 814
 
815 815
 	/**
816
-	* Begin Transaction
817
-	*
818
-	* @return int/boolean current transaction-id, of false if no connection
819
-	*/
816
+	 * Begin Transaction
817
+	 *
818
+	 * @return int/boolean current transaction-id, of false if no connection
819
+	 */
820 820
 	function transaction_begin()
821 821
 	{
822 822
 		if (!$this->Link_ID && !$this->connect())
@@ -828,10 +828,10 @@  discard block
 block discarded – undo
828 828
 	}
829 829
 
830 830
 	/**
831
-	* Complete the transaction
832
-	*
833
-	* @return bool True if sucessful, False if fails
834
-	*/
831
+	 * Complete the transaction
832
+	 *
833
+	 * @return bool True if sucessful, False if fails
834
+	 */
835 835
 	function transaction_commit()
836 836
 	{
837 837
 		if (!$this->Link_ID && !$this->connect())
@@ -843,10 +843,10 @@  discard block
 block discarded – undo
843 843
 	}
844 844
 
845 845
 	/**
846
-	* Rollback the current transaction
847
-	*
848
-	* @return bool True if sucessful, False if fails
849
-	*/
846
+	 * Rollback the current transaction
847
+	 *
848
+	 * @return bool True if sucessful, False if fails
849
+	 */
850 850
 	function transaction_abort()
851 851
 	{
852 852
 		if (!$this->Link_ID && !$this->connect())
@@ -922,12 +922,12 @@  discard block
 block discarded – undo
922 922
 	}
923 923
 
924 924
 	/**
925
-	* Find the primary key of the last insertion on the current db connection
926
-	*
927
-	* @param string $table name of table the insert was performed on
928
-	* @param string $field the autoincrement primary key of the table
929
-	* @return int the id, -1 if fails
930
-	*/
925
+	 * Find the primary key of the last insertion on the current db connection
926
+	 *
927
+	 * @param string $table name of table the insert was performed on
928
+	 * @param string $field the autoincrement primary key of the table
929
+	 * @return int the id, -1 if fails
930
+	 */
931 931
 	function get_last_insert_id($table, $field)
932 932
 	{
933 933
 		if (!$this->Link_ID && !$this->connect())
@@ -950,10 +950,10 @@  discard block
 block discarded – undo
950 950
 	}
951 951
 
952 952
 	/**
953
-	* Get the number of rows affected by last update or delete
954
-	*
955
-	* @return int number of rows
956
-	*/
953
+	 * Get the number of rows affected by last update or delete
954
+	 *
955
+	 * @return int number of rows
956
+	 */
957 957
 	function affected_rows()
958 958
 	{
959 959
 		if ($this->log_updates) return 0;
@@ -966,14 +966,14 @@  discard block
 block discarded – undo
966 966
 	}
967 967
 
968 968
 	/**
969
-	* Get description of a table
970
-	*
971
-	* Beside the column-name all other data depends on the db-type !!!
972
-	*
973
-	* @param string $table name of table to describe
974
-	* @param bool $full optional, default False summary information, True full information
975
-	* @return array table meta data
976
-	*/
969
+	 * Get description of a table
970
+	 *
971
+	 * Beside the column-name all other data depends on the db-type !!!
972
+	 *
973
+	 * @param string $table name of table to describe
974
+	 * @param bool $full optional, default False summary information, True full information
975
+	 * @return array table meta data
976
+	 */
977 977
 	function metadata($table='',$full=false)
978 978
 	{
979 979
 		if (!$this->Link_ID && !$this->connect())
@@ -1055,10 +1055,10 @@  discard block
 block discarded – undo
1055 1055
 	}
1056 1056
 
1057 1057
 	/**
1058
-	* Return a list of indexes in current database
1059
-	*
1060
-	* @return array list of indexes
1061
-	*/
1058
+	 * Return a list of indexes in current database
1059
+	 *
1060
+	 * @return array list of indexes
1061
+	 */
1062 1062
 	function index_names()
1063 1063
 	{
1064 1064
 		$indices = array();
@@ -1079,10 +1079,10 @@  discard block
 block discarded – undo
1079 1079
 	}
1080 1080
 
1081 1081
 	/**
1082
-	* Returns an array containing column names that are the primary keys of $tablename.
1083
-	*
1084
-	* @return array of columns
1085
-	*/
1082
+	 * Returns an array containing column names that are the primary keys of $tablename.
1083
+	 *
1084
+	 * @return array of columns
1085
+	 */
1086 1086
 	function pkey_columns($tablename)
1087 1087
 	{
1088 1088
 		if (!$this->Link_ID && !$this->connect())
@@ -1093,13 +1093,13 @@  discard block
 block discarded – undo
1093 1093
 	}
1094 1094
 
1095 1095
 	/**
1096
-	* Create a new database
1097
-	*
1098
-	* @param string $adminname name of database administrator user (optional)
1099
-	* @param string $adminpasswd password for the database administrator user (optional)
1100
-	* @param string $charset default charset for the database
1101
-	* @param string $grant_host ='localhost' host/ip of the webserver
1102
-	*/
1096
+	 * Create a new database
1097
+	 *
1098
+	 * @param string $adminname name of database administrator user (optional)
1099
+	 * @param string $adminpasswd password for the database administrator user (optional)
1100
+	 * @param string $charset default charset for the database
1101
+	 * @param string $grant_host ='localhost' host/ip of the webserver
1102
+	 */
1103 1103
 	function create_database($adminname = '', $adminpasswd = '', $charset='', $grant_host='localhost')
1104 1104
 	{
1105 1105
 		$currentUser = $this->User;
@@ -1356,12 +1356,12 @@  discard block
 block discarded – undo
1356 1356
 	}
1357 1357
 
1358 1358
 	/**
1359
-	* Correctly Quote Identifiers like table- or colmnnames for use in SQL-statements
1360
-	*
1361
-	* This is mostly copy & paste from adodb's datadict class
1362
-	* @param string $_name
1363
-	* @return string quoted string
1364
-	*/
1359
+	 * Correctly Quote Identifiers like table- or colmnnames for use in SQL-statements
1360
+	 *
1361
+	 * This is mostly copy & paste from adodb's datadict class
1362
+	 * @param string $_name
1363
+	 * @return string quoted string
1364
+	 */
1365 1365
 	function name_quote($_name = NULL)
1366 1366
 	{
1367 1367
 		if (!is_string($_name))
@@ -1400,19 +1400,19 @@  discard block
 block discarded – undo
1400 1400
 	}
1401 1401
 
1402 1402
 	/**
1403
-	* Escape values before sending them to the database - prevents SQL injection and SQL errors ;-)
1404
-	*
1405
-	* Please note that the quote function already returns necessary quotes: quote('Hello') === "'Hello'".
1406
-	* Int and Auto types are casted to int: quote('1','int') === 1, quote('','int') === 0, quote('Hello','int') === 0
1407
-	* Arrays of id's stored in strings: quote(array(1,2,3),'string') === "'1,2,3'"
1408
-	*
1409
-	* @param mixed $value the value to be escaped
1410
-	* @param string|boolean $type =false string the type of the db-column, default False === varchar
1411
-	* @param boolean $not_null =true is column NOT NULL, default true, else php null values are written as SQL NULL
1412
-	* @param int $length =null length of the varchar column, to truncate it if the database requires it (eg. Postgres)
1413
-	* @param string $glue =',' used to glue array values together for the string type
1414
-	* @return string escaped sting
1415
-	*/
1403
+	 * Escape values before sending them to the database - prevents SQL injection and SQL errors ;-)
1404
+	 *
1405
+	 * Please note that the quote function already returns necessary quotes: quote('Hello') === "'Hello'".
1406
+	 * Int and Auto types are casted to int: quote('1','int') === 1, quote('','int') === 0, quote('Hello','int') === 0
1407
+	 * Arrays of id's stored in strings: quote(array(1,2,3),'string') === "'1,2,3'"
1408
+	 *
1409
+	 * @param mixed $value the value to be escaped
1410
+	 * @param string|boolean $type =false string the type of the db-column, default False === varchar
1411
+	 * @param boolean $not_null =true is column NOT NULL, default true, else php null values are written as SQL NULL
1412
+	 * @param int $length =null length of the varchar column, to truncate it if the database requires it (eg. Postgres)
1413
+	 * @param string $glue =',' used to glue array values together for the string type
1414
+	 * @return string escaped sting
1415
+	 */
1416 1416
 	function quote($value,$type=False,$not_null=true,$length=null,$glue=',')
1417 1417
 	{
1418 1418
 		if ($this->Debug) echo "<p>db::quote(".(is_null($value)?'NULL':"'$value'").",'$type','$not_null')</p>\n";
@@ -1493,27 +1493,27 @@  discard block
 block discarded – undo
1493 1493
 	}
1494 1494
 
1495 1495
 	/**
1496
-	* Implodes an array of column-value pairs for the use in sql-querys.
1497
-	* All data is run through quote (does either addslashes() or (int)) - prevents SQL injunction and SQL errors ;-).
1498
-	*
1499
-	* @author RalfBecker<at>outdoor-training.de
1500
-	*
1501
-	* @param string $glue in most cases this will be either ',' or ' AND ', depending you your query
1502
-	* @param array $array column-name / value pairs, if the value is an array all its array-values will be quoted
1503
-	*	according to the type of the column, and the whole array with be formatted like (val1,val2,...)
1504
-	*	If $use_key == True, an ' IN ' instead a '=' is used. Good for category- or user-lists.
1505
-	*	If the key is numerical (no key given in the array-definition) the value is used as is, eg.
1506
-	*	array('visits=visits+1') gives just "visits=visits+1" (no quoting at all !!!)
1507
-	* @param boolean|string $use_key If $use_key===True a "$key=" prefix each value (default), typically set to False
1508
-	*	or 'VALUES' for insert querys, on 'VALUES' "(key1,key2,...) VALUES (val1,val2,...)" is returned
1509
-	* @param array|boolean $only if set to an array only colums which are set (as data !!!) are written
1510
-	*	typicaly used to form a WHERE-clause from the primary keys.
1511
-	*	If set to True, only columns from the colum_definitons are written.
1512
-	* @param array|boolean $column_definitions this can be set to the column-definitions-array
1513
-	*	of your table ($tables_baseline[$table]['fd'] of the setup/tables_current.inc.php file).
1514
-	*	If its set, the column-type-data determinates if (int) or addslashes is used.
1515
-	* @return string SQL
1516
-	*/
1496
+	 * Implodes an array of column-value pairs for the use in sql-querys.
1497
+	 * All data is run through quote (does either addslashes() or (int)) - prevents SQL injunction and SQL errors ;-).
1498
+	 *
1499
+	 * @author RalfBecker<at>outdoor-training.de
1500
+	 *
1501
+	 * @param string $glue in most cases this will be either ',' or ' AND ', depending you your query
1502
+	 * @param array $array column-name / value pairs, if the value is an array all its array-values will be quoted
1503
+	 *	according to the type of the column, and the whole array with be formatted like (val1,val2,...)
1504
+	 *	If $use_key == True, an ' IN ' instead a '=' is used. Good for category- or user-lists.
1505
+	 *	If the key is numerical (no key given in the array-definition) the value is used as is, eg.
1506
+	 *	array('visits=visits+1') gives just "visits=visits+1" (no quoting at all !!!)
1507
+	 * @param boolean|string $use_key If $use_key===True a "$key=" prefix each value (default), typically set to False
1508
+	 *	or 'VALUES' for insert querys, on 'VALUES' "(key1,key2,...) VALUES (val1,val2,...)" is returned
1509
+	 * @param array|boolean $only if set to an array only colums which are set (as data !!!) are written
1510
+	 *	typicaly used to form a WHERE-clause from the primary keys.
1511
+	 *	If set to True, only columns from the colum_definitons are written.
1512
+	 * @param array|boolean $column_definitions this can be set to the column-definitions-array
1513
+	 *	of your table ($tables_baseline[$table]['fd'] of the setup/tables_current.inc.php file).
1514
+	 *	If its set, the column-type-data determinates if (int) or addslashes is used.
1515
+	 * @return string SQL
1516
+	 */
1517 1517
 	function column_data_implode($glue,$array,$use_key=True,$only=False,$column_definitions=False)
1518 1518
 	{
1519 1519
 		if (!is_array($array))	// this allows to give an SQL-string for delete or update
@@ -1599,14 +1599,14 @@  discard block
 block discarded – undo
1599 1599
 	}
1600 1600
 
1601 1601
 	/**
1602
-	* Sets the default column-definitions for use with column_data_implode()
1603
-	*
1604
-	* @author RalfBecker<at>outdoor-training.de
1605
-	*
1606
-	* @param array|boolean $column_definitions this can be set to the column-definitions-array
1607
-	*	of your table ($tables_baseline[$table]['fd'] of the setup/tables_current.inc.php file).
1608
-	*	If its set, the column-type-data determinates if (int) or addslashes is used.
1609
-	*/
1602
+	 * Sets the default column-definitions for use with column_data_implode()
1603
+	 *
1604
+	 * @author RalfBecker<at>outdoor-training.de
1605
+	 *
1606
+	 * @param array|boolean $column_definitions this can be set to the column-definitions-array
1607
+	 *	of your table ($tables_baseline[$table]['fd'] of the setup/tables_current.inc.php file).
1608
+	 *	If its set, the column-type-data determinates if (int) or addslashes is used.
1609
+	 */
1610 1610
 	function set_column_definitions($column_definitions=False)
1611 1611
 	{
1612 1612
 		$this->column_definitions=$column_definitions;
@@ -1668,17 +1668,17 @@  discard block
 block discarded – undo
1668 1668
 	}
1669 1669
 
1670 1670
 	/**
1671
-	* reads the table-definitions from the app's setup/tables_current.inc.php file
1672
-	*
1673
-	* The already read table-definitions are shared between all db-instances via a static var.
1674
-	*
1675
-	* @author RalfBecker<at>outdoor-training.de
1676
-	*
1677
-	* @param bool|string $app name of the app or default False to use the app set by db::set_app or the current app,
1678
-	*	true to search the already loaded table-definitions for $table and then search all existing apps for it
1679
-	* @param bool|string $table if set return only defintions of that table, else return all defintions
1680
-	* @return mixed array with table-defintions or False if file not found
1681
-	*/
1671
+	 * reads the table-definitions from the app's setup/tables_current.inc.php file
1672
+	 *
1673
+	 * The already read table-definitions are shared between all db-instances via a static var.
1674
+	 *
1675
+	 * @author RalfBecker<at>outdoor-training.de
1676
+	 *
1677
+	 * @param bool|string $app name of the app or default False to use the app set by db::set_app or the current app,
1678
+	 *	true to search the already loaded table-definitions for $table and then search all existing apps for it
1679
+	 * @param bool|string $table if set return only defintions of that table, else return all defintions
1680
+	 * @return mixed array with table-defintions or False if file not found
1681
+	 */
1682 1682
 	function get_table_definitions($app=False,$table=False)
1683 1683
 	{
1684 1684
 		// ease the transition to api
@@ -1773,21 +1773,21 @@  discard block
 block discarded – undo
1773 1773
 	}
1774 1774
 
1775 1775
 	/**
1776
-	* Insert a row of data into a table or updates it if $where is given, all data is quoted according to it's type
1777
-	*
1778
-	* @author RalfBecker<at>outdoor-training.de
1779
-	*
1780
-	* @param string $table name of the table
1781
-	* @param array $data with column-name / value pairs
1782
-	* @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
1783
-	*	if the row exists db::update is called else a new row with $date merged with $where gets inserted (data has precedence)
1784
-	* @param int $line line-number to pass to query
1785
-	* @param string $file file-name to pass to query
1786
-	* @param string|boolean $app string with name of app or False to use the current-app
1787
-	* @param bool $use_prepared_statement use a prepared statement
1788
-	* @param array|bool $table_def use this table definition. If False, the table definition will be read from tables_baseline
1789
-	* @return ADORecordSet or false, if the query fails
1790
-	*/
1776
+	 * Insert a row of data into a table or updates it if $where is given, all data is quoted according to it's type
1777
+	 *
1778
+	 * @author RalfBecker<at>outdoor-training.de
1779
+	 *
1780
+	 * @param string $table name of the table
1781
+	 * @param array $data with column-name / value pairs
1782
+	 * @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
1783
+	 *	if the row exists db::update is called else a new row with $date merged with $where gets inserted (data has precedence)
1784
+	 * @param int $line line-number to pass to query
1785
+	 * @param string $file file-name to pass to query
1786
+	 * @param string|boolean $app string with name of app or False to use the current-app
1787
+	 * @param bool $use_prepared_statement use a prepared statement
1788
+	 * @param array|bool $table_def use this table definition. If False, the table definition will be read from tables_baseline
1789
+	 * @return ADORecordSet or false, if the query fails
1790
+	 */
1791 1791
 	function insert($table,$data,$where,$line,$file,$app=False,$use_prepared_statement=false,$table_def=False)
1792 1792
 	{
1793 1793
 		if ($this->Debug) echo "<p>db::insert('$table',".print_r($data,True).",".print_r($where,True).",$line,$file,'$app')</p>\n";
@@ -1883,20 +1883,20 @@  discard block
 block discarded – undo
1883 1883
 	}
1884 1884
 
1885 1885
 	/**
1886
-	* Updates the data of one or more rows in a table, all data is quoted according to it's type
1887
-	*
1888
-	* @author RalfBecker<at>outdoor-training.de
1889
-	*
1890
-	* @param string $table name of the table
1891
-	* @param array $data with column-name / value pairs
1892
-	* @param array $where column-name / values pairs and'ed together for the where clause
1893
-	* @param int $line line-number to pass to query
1894
-	* @param string $file file-name to pass to query
1895
-	* @param string|boolean $app string with name of app or False to use the current-app
1896
-	* @param bool $use_prepared_statement use a prepared statement
1897
-	* @param array|bool $table_def use this table definition. If False, the table definition will be read from tables_baseline
1898
-	* @return ADORecordSet or false, if the query fails
1899
-	*/
1886
+	 * Updates the data of one or more rows in a table, all data is quoted according to it's type
1887
+	 *
1888
+	 * @author RalfBecker<at>outdoor-training.de
1889
+	 *
1890
+	 * @param string $table name of the table
1891
+	 * @param array $data with column-name / value pairs
1892
+	 * @param array $where column-name / values pairs and'ed together for the where clause
1893
+	 * @param int $line line-number to pass to query
1894
+	 * @param string $file file-name to pass to query
1895
+	 * @param string|boolean $app string with name of app or False to use the current-app
1896
+	 * @param bool $use_prepared_statement use a prepared statement
1897
+	 * @param array|bool $table_def use this table definition. If False, the table definition will be read from tables_baseline
1898
+	 * @return ADORecordSet or false, if the query fails
1899
+	 */
1900 1900
 	function update($table,$data,$where,$line,$file,$app=False,$use_prepared_statement=false,$table_def=False)
1901 1901
 	{
1902 1902
 		if ($this->Debug) echo "<p>db::update('$table',".print_r($data,true).','.print_r($where,true).",$line,$file,'$app')</p>\n";
@@ -1973,18 +1973,18 @@  discard block
 block discarded – undo
1973 1973
 	}
1974 1974
 
1975 1975
 	/**
1976
-	* Deletes one or more rows in table, all data is quoted according to it's type
1977
-	*
1978
-	* @author RalfBecker<at>outdoor-training.de
1979
-	*
1980
-	* @param string $table name of the table
1981
-	* @param array $where column-name / values pairs and'ed together for the where clause
1982
-	* @param int $line line-number to pass to query
1983
-	* @param string $file file-name to pass to query
1984
-	* @param string|boolean $app string with name of app or False to use the current-app
1985
-	* @param array|bool $table_def use this table definition. If False, the table definition will be read from tables_baseline
1986
-	* @return ADORecordSet or false, if the query fails
1987
-	*/
1976
+	 * Deletes one or more rows in table, all data is quoted according to it's type
1977
+	 *
1978
+	 * @author RalfBecker<at>outdoor-training.de
1979
+	 *
1980
+	 * @param string $table name of the table
1981
+	 * @param array $where column-name / values pairs and'ed together for the where clause
1982
+	 * @param int $line line-number to pass to query
1983
+	 * @param string $file file-name to pass to query
1984
+	 * @param string|boolean $app string with name of app or False to use the current-app
1985
+	 * @param array|bool $table_def use this table definition. If False, the table definition will be read from tables_baseline
1986
+	 * @return ADORecordSet or false, if the query fails
1987
+	 */
1988 1988
 	function delete($table,$where,$line,$file,$app=False,$table_def=False)
1989 1989
 	{
1990 1990
 		if (!$table_def) $table_def = $this->get_table_definitions($app,$table);
@@ -2050,25 +2050,25 @@  discard block
 block discarded – undo
2050 2050
 	}
2051 2051
 
2052 2052
 	/**
2053
-	* Selects one or more rows in table depending on where, all data is quoted according to it's type
2054
-	*
2055
-	* @author RalfBecker<at>outdoor-training.de
2056
-	*
2057
-	* @param string $table name of the table
2058
-	* @param array|string $cols string or array of column-names / select-expressions
2059
-	* @param array|string $where string or array with column-name / values pairs AND'ed together for the where clause
2060
-	* @param int $line line-number to pass to query
2061
-	* @param string $file file-name to pass to query
2062
-	* @param int|bool $offset offset for a limited query or False (default)
2063
-	* @param string $append string to append to the end of the query, eg. ORDER BY ...
2064
-	* @param string|boolean $app string with name of app or False to use the current-app
2065
-	* @param int $num_rows number of rows to return if offset set, default 0 = use default in user prefs
2066
-	* @param string $join =null sql to do a join, added as is after the table-name, eg. ", table2 WHERE x=y" or
2067
-	*	"LEFT JOIN table2 ON (x=y)", Note: there's no quoting done on $join!
2068
-	* @param array|bool $table_def use this table definition. If False, the table definition will be read from tables_baseline
2069
-	* @param int $fetchmode =self::FETCH_ASSOC self::FETCH_ASSOC (default), self::FETCH_BOTH or self::FETCH_NUM
2070
-	* @return ADORecordSet or false, if the query fails
2071
-	*/
2053
+	 * Selects one or more rows in table depending on where, all data is quoted according to it's type
2054
+	 *
2055
+	 * @author RalfBecker<at>outdoor-training.de
2056
+	 *
2057
+	 * @param string $table name of the table
2058
+	 * @param array|string $cols string or array of column-names / select-expressions
2059
+	 * @param array|string $where string or array with column-name / values pairs AND'ed together for the where clause
2060
+	 * @param int $line line-number to pass to query
2061
+	 * @param string $file file-name to pass to query
2062
+	 * @param int|bool $offset offset for a limited query or False (default)
2063
+	 * @param string $append string to append to the end of the query, eg. ORDER BY ...
2064
+	 * @param string|boolean $app string with name of app or False to use the current-app
2065
+	 * @param int $num_rows number of rows to return if offset set, default 0 = use default in user prefs
2066
+	 * @param string $join =null sql to do a join, added as is after the table-name, eg. ", table2 WHERE x=y" or
2067
+	 *	"LEFT JOIN table2 ON (x=y)", Note: there's no quoting done on $join!
2068
+	 * @param array|bool $table_def use this table definition. If False, the table definition will be read from tables_baseline
2069
+	 * @param int $fetchmode =self::FETCH_ASSOC self::FETCH_ASSOC (default), self::FETCH_BOTH or self::FETCH_NUM
2070
+	 * @return ADORecordSet or false, if the query fails
2071
+	 */
2072 2072
 	function select($table,$cols,$where,$line,$file,$offset=False,$append='',$app=False,$num_rows=0,$join='',$table_def=False,$fetchmode=self::FETCH_ASSOC)
2073 2073
 	{
2074 2074
 		if ($this->Debug) echo "<p>db::select('$table',".print_r($cols,True).",".print_r($where,True).",$line,$file,$offset,'$app',$num_rows,'$join')</p>\n";
@@ -2103,20 +2103,20 @@  discard block
 block discarded – undo
2103 2103
 	}
2104 2104
 
2105 2105
 	/**
2106
-	* Does a union over multiple selects
2107
-	*
2108
-	* @author RalfBecker<at>outdoor-training.de
2109
-	*
2110
-	* @param array $selects array of selects, each select is an array with the possible keys/parameters: table, cols, where, append, app, join, table_def
2111
-	*	For further info about parameters see the definition of the select function, beside table, cols and where all other params are optional
2112
-	* @param int $line line-number to pass to query
2113
-	* @param string $file file-name to pass to query
2114
-	* @param string $order_by ORDER BY statement for the union
2115
-	* @param int|bool $offset offset for a limited query or False (default)
2116
-	* @param int $num_rows number of rows to return if offset set, default 0 = use default in user prefs
2117
-	* @param int $fetchmode =self::FETCH_ASSOC self::FETCH_ASSOC (default), self::FETCH_BOTH or self::FETCH_NUM
2118
-	* @return ADORecordSet or false, if the query fails
2119
-	*/
2106
+	 * Does a union over multiple selects
2107
+	 *
2108
+	 * @author RalfBecker<at>outdoor-training.de
2109
+	 *
2110
+	 * @param array $selects array of selects, each select is an array with the possible keys/parameters: table, cols, where, append, app, join, table_def
2111
+	 *	For further info about parameters see the definition of the select function, beside table, cols and where all other params are optional
2112
+	 * @param int $line line-number to pass to query
2113
+	 * @param string $file file-name to pass to query
2114
+	 * @param string $order_by ORDER BY statement for the union
2115
+	 * @param int|bool $offset offset for a limited query or False (default)
2116
+	 * @param int $num_rows number of rows to return if offset set, default 0 = use default in user prefs
2117
+	 * @param int $fetchmode =self::FETCH_ASSOC self::FETCH_ASSOC (default), self::FETCH_BOTH or self::FETCH_NUM
2118
+	 * @return ADORecordSet or false, if the query fails
2119
+	 */
2120 2120
 	function union($selects,$line,$file,$order_by='',$offset=false,$num_rows=0,$fetchmode=self::FETCH_ASSOC)
2121 2121
 	{
2122 2122
 		if ($this->Debug) echo "<p>db::union(".print_r($selects,True).",$line,$file,$order_by,$offset,$num_rows)</p>\n";
Please login to merge, or discard this patch.
api/src/Etemplate/Widget/Vfs.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -243,13 +243,13 @@
 block discarded – undo
243 243
 	}
244 244
 
245 245
 	/**
246
-	* Ajax callback to receive an incoming file
247
-	*
248
-	* The incoming file is automatically placed into the appropriate VFS location.
249
-	* If the entry is not yet created, the file information is stored into the widget's value.
250
-	* When the form is submitted, the information for all files uploaded is available in the returned
251
-	* $content array and the application should deal with the file.
252
-	*/
246
+	 * Ajax callback to receive an incoming file
247
+	 *
248
+	 * The incoming file is automatically placed into the appropriate VFS location.
249
+	 * If the entry is not yet created, the file information is stored into the widget's value.
250
+	 * When the form is submitted, the information for all files uploaded is available in the returned
251
+	 * $content array and the application should deal with the file.
252
+	 */
253 253
 	public static function store_file($path, &$file)
254 254
 	{
255 255
 		$name = $_REQUEST['widget_id'];
Please login to merge, or discard this patch.
api/src/Storage.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -210,12 +210,12 @@
 block discarded – undo
210 210
 	}
211 211
 
212 212
 	/**
213
-	* saves custom field data
214
-	*
215
-	* @param array $data data to save (cf's have to be prefixed with self::CF_PREFIX = #)
216
-	* @param array $extra_cols =array() extra-data to be saved
217
-	* @return bool false on success, errornumber on failure
218
-	*/
213
+	 * saves custom field data
214
+	 *
215
+	 * @param array $data data to save (cf's have to be prefixed with self::CF_PREFIX = #)
216
+	 * @param array $extra_cols =array() extra-data to be saved
217
+	 * @return bool false on success, errornumber on failure
218
+	 */
219 219
 	function save_customfields(&$data, array $extra_cols=array())
220 220
 	{
221 221
 		$id = isset($data[$this->autoinc_id]) ? $data[$this->autoinc_id] : $data[$this->db_key_cols[$this->autoinc_id]];
Please login to merge, or discard this patch.
doc/phpunit_bootstrap.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
 // backward compatibility with PHPunit 5.7
19 19
 if (!class_exists('\PHPUnit\Framework\TestCase') && class_exists('\PHPUnit_Framework_TestCase'))
20 20
 {
21
-    class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
22
-    class_alias('\PHPUnit_Framework_ExpectationFailedException', '\PHPUnit\Framework\ExpectationFailedException');
21
+	class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
22
+	class_alias('\PHPUnit_Framework_ExpectationFailedException', '\PHPUnit\Framework\ExpectationFailedException');
23 23
 }
24 24
 
25 25
 // Needed to let Cache work
Please login to merge, or discard this patch.
api/src/Mailer.php 1 patch
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -490,24 +490,24 @@  discard block
 block discarded – undo
490 490
 	 * Log mails to log file specified in $GLOBALS['egw_info']['server']['log_mail']
491 491
 	 * or regular error_log for true (can be set either in DB or header.inc.php).
492 492
 	 *
493
-     * @param Horde_Mail_Transport $transport =null using transport from mail-account
493
+	 * @param Horde_Mail_Transport $transport =null using transport from mail-account
494 494
 	 *		specified in construct, or default one, if not specified
495
-     * @param boolean $resend =true allways true in EGroupware!
496
-     * @param boolean $flowed =null send message in flowed text format,
495
+	 * @param boolean $resend =true allways true in EGroupware!
496
+	 * @param boolean $flowed =null send message in flowed text format,
497 497
 	 *		default null used flowed by default for everything but multipart/encrypted,
498 498
 	 *		unless disabled in site configuration ("disable_rfc3676_flowed")
499 499
 	 * * @param array $opts                   Additional options:
500
-     * <pre>
501
-     *   - broken_rfc2231: (boolean) Attempt to work around non-RFC
502
-     *                     2231-compliant MUAs by generating both a RFC
503
-     *                     2047-like parameter name and also the correct RFC
504
-     *                     2231 parameter (@since 2.5.0).
505
-     *                     DEFAULT: false
506
-     *   - encode: (integer) The encoding to use. A mask of self::ENCODE_*
507
-     *             values.
508
-     *             DEFAULT: Auto-determined based on transport driver.
509
-     * </pre>
510
-     *
500
+	 * <pre>
501
+	 *   - broken_rfc2231: (boolean) Attempt to work around non-RFC
502
+	 *                     2231-compliant MUAs by generating both a RFC
503
+	 *                     2047-like parameter name and also the correct RFC
504
+	 *                     2231 parameter (@since 2.5.0).
505
+	 *                     DEFAULT: false
506
+	 *   - encode: (integer) The encoding to use. A mask of self::ENCODE_*
507
+	 *             values.
508
+	 *             DEFAULT: Auto-determined based on transport driver.
509
+	 * </pre>
510
+	 *
511 511
 	 * @throws Exception\NotFound for no smtp account available
512 512
 	 * @throws Horde_Mime_Exception
513 513
 	 */
@@ -645,42 +645,42 @@  discard block
 block discarded – undo
645 645
 	}
646 646
 
647 647
 	/**
648
-     * Sends this message.
649
-     *
650
-     * @param Mail $mailer     A Mail object.
651
-     * @param boolean $resend  If true, the message id and date are re-used;
652
-     *                         If false, they will be updated.
653
-     * @param boolean $flowed  Send message in flowed text format.
648
+	 * Sends this message.
649
+	 *
650
+	 * @param Mail $mailer     A Mail object.
651
+	 * @param boolean $resend  If true, the message id and date are re-used;
652
+	 *                         If false, they will be updated.
653
+	 * @param boolean $flowed  Send message in flowed text format.
654 654
 	 * * @param array $opts                   Additional options:
655
-     * <pre>
656
-     *   - broken_rfc2231: (boolean) Attempt to work around non-RFC
657
-     *                     2231-compliant MUAs by generating both a RFC
658
-     *                     2047-like parameter name and also the correct RFC
659
-     *                     2231 parameter (@since 2.5.0).
660
-     *                     DEFAULT: false
661
-     *   - encode: (integer) The encoding to use. A mask of self::ENCODE_*
662
-     *             values.
663
-     *             DEFAULT: Auto-determined based on transport driver.
664
-     * </pre>
665
-     *
666
-     *
667
-     * @throws Horde_Mime_Exception
668
-     */
669
-    public function _send($mailer, $resend = false, $flowed = true, array $opts = array())
670
-    {
655
+	 * <pre>
656
+	 *   - broken_rfc2231: (boolean) Attempt to work around non-RFC
657
+	 *                     2231-compliant MUAs by generating both a RFC
658
+	 *                     2047-like parameter name and also the correct RFC
659
+	 *                     2231 parameter (@since 2.5.0).
660
+	 *                     DEFAULT: false
661
+	 *   - encode: (integer) The encoding to use. A mask of self::ENCODE_*
662
+	 *             values.
663
+	 *             DEFAULT: Auto-determined based on transport driver.
664
+	 * </pre>
665
+	 *
666
+	 *
667
+	 * @throws Horde_Mime_Exception
668
+	 */
669
+	public function _send($mailer, $resend = false, $flowed = true, array $opts = array())
670
+	{
671 671
 		/* Add mandatory headers if missing. */
672 672
 		if (!$resend || !isset($this->_headers['Message-ID'])) {
673 673
 			$this->_headers->addHeaderOb(
674
-                Horde_Mime_Headers_MessageId::create()
674
+				Horde_Mime_Headers_MessageId::create()
675 675
 			);
676 676
 		}
677 677
 		if (!isset($this->_headers['User-Agent'])) {
678 678
 			$this->_headers->addHeaderOb(
679
-                Horde_Mime_Headers_UserAgent::create()
679
+				Horde_Mime_Headers_UserAgent::create()
680 680
 			);
681 681
 		}
682 682
 		if (!$resend || !isset($this->_headers['Date'])) {
683
-            $this->_headers->addHeaderOb(Horde_Mime_Headers_Date::create());
683
+			$this->_headers->addHeaderOb(Horde_Mime_Headers_Date::create());
684 684
 		}
685 685
 
686 686
 		if (isset($this->_base)) {
@@ -699,9 +699,9 @@  discard block
 block discarded – undo
699 699
 			$body = new Horde_Mime_Part();
700 700
 			if (!empty($this->_body) && !empty($this->_htmlBody)) {
701 701
 				$body->setType('multipart/alternative');
702
-                $this->_body->setDescription(Horde_Mime_Translation::t("Plaintext Version of Message"));
702
+				$this->_body->setDescription(Horde_Mime_Translation::t("Plaintext Version of Message"));
703 703
 				$body[] = $this->_body;
704
-                $this->_htmlBody->setDescription(Horde_Mime_Translation::t("HTML Version of Message"));
704
+				$this->_htmlBody->setDescription(Horde_Mime_Translation::t("HTML Version of Message"));
705 705
 				$body[] = $this->_htmlBody;
706 706
 			} elseif (!empty($this->_htmlBody)) {
707 707
 				$body = $this->_htmlBody;
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
 
746 746
 		/* Remember the basepart */
747 747
 		$this->_base = $basepart;
748
-    }
748
+	}
749 749
 
750 750
 	/**
751 751
 	 * Reset all Settings to send multiple Messages
@@ -767,15 +767,15 @@  discard block
 block discarded – undo
767 767
 	}
768 768
 
769 769
 	/**
770
-     * Get the raw email data sent by this object.
771
-     *
770
+	 * Get the raw email data sent by this object.
771
+	 *
772 772
 	 * Reimplement to be able to call it for saveAsDraft by calling
773 773
 	 * $this->send(new Horde_Mail_Transport_Null()),
774 774
 	 * if no base-part is set, because send is not called before.
775 775
 	 *
776
-     * @param  boolean $stream  If true, return a stream resource, otherwise
777
-     * @return stream|string  The raw email data.
778
-     */
776
+	 * @param  boolean $stream  If true, return a stream resource, otherwise
777
+	 * @return stream|string  The raw email data.
778
+	 */
779 779
 	function getRaw($stream=true)
780 780
 	{
781 781
 		try {
@@ -788,24 +788,24 @@  discard block
 block discarded – undo
788 788
 		}
789 789
 		// code copied from Horde_Mime_Mail::getRaw(), as there is no way to inject charset in
790 790
 		// _headers->toString(), which is required to encode headers containing non-ascii chars correct
791
-        if ($stream) {
791
+		if ($stream) {
792 792
 			// Smime sign needs to be 7bit encoded to avoid any changes
793 793
 			$encode = $this->_base && $this->_base->getMetadata('X-EGroupware-Smime-signed')?
794 794
 					Horde_Mime_Part::ENCODE_7BIT :
795 795
 					(Horde_Mime_Part::ENCODE_7BIT | Horde_Mime_Part::ENCODE_8BIT | Horde_Mime_Part::ENCODE_BINARY);
796
-            $hdr = new Horde_Stream();
797
-            $hdr->add($this->_headers->toString(array('charset' => 'utf-8', 'canonical' => true)), true);
798
-            return Horde_Stream_Wrapper_Combine::getStream(
799
-                array($hdr->stream,
800
-                      $this->getBasePart()->toString(
801
-                        array('stream' => true, 'canonical' => true, 'encode' => $encode))
802
-                )
803
-            );
804
-        }
805
-
806
-        return $this->_headers->toString(array('charset' => 'utf-8', 'canonical' => true)) .
796
+			$hdr = new Horde_Stream();
797
+			$hdr->add($this->_headers->toString(array('charset' => 'utf-8', 'canonical' => true)), true);
798
+			return Horde_Stream_Wrapper_Combine::getStream(
799
+				array($hdr->stream,
800
+					  $this->getBasePart()->toString(
801
+						array('stream' => true, 'canonical' => true, 'encode' => $encode))
802
+				)
803
+			);
804
+		}
805
+
806
+		return $this->_headers->toString(array('charset' => 'utf-8', 'canonical' => true)) .
807 807
 			$this->getBasePart()->toString(array('canonical' => true));
808
-    }
808
+	}
809 809
 
810 810
 	/**
811 811
 	 * Convert charset of text-parts of message to utf-8. non static AND include Bcc
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
 	 * @return string|stream
818 818
 	 */
819 819
 	function convertMessageTextParts($message, $stream=false, $charset='utf-8', &$converted=false)
820
-        {
820
+		{
821 821
 		$headers = Horde_Mime_Headers::parseHeaders($message);
822 822
 		$this->addHeaders($headers);
823 823
 		$base = Horde_Mime_Part::parseMessage($message);
Please login to merge, or discard this patch.