Passed
Branch develop (66e4de)
by Laurent
33:03
created
htdocs/accountancy/admin/categories.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,8 +132,8 @@
 block discarded – undo
132 132
 
133 133
 if ($action == 'display' || $action == 'delete') {
134 134
 
135
-    print "<table class='noborder' width='100%'>\n";
136
-    print '<tr class="liste_titre">';
135
+	print "<table class='noborder' width='100%'>\n";
136
+	print '<tr class="liste_titre">';
137 137
 	print '<td class="liste_titre">'.$langs->trans("AccountAccounting")."</td>";
138 138
 	print '<td class="liste_titre" colspan="2">'.$langs->trans("Label")."</td>";
139 139
 	print "</tr>\n";
Please login to merge, or discard this patch.
htdocs/datapolicy/mailing.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,14 +29,14 @@
 block discarded – undo
29 29
 $idcontact = GETPOST('idc');
30 30
 
31 31
 if (!empty($idcontact)) {
32
-    $contact = new Contact($db);
33
-    $contact->fetch($idcontact);
34
-    DataPolicy::sendMailDataPolicyContact($contact);
32
+	$contact = new Contact($db);
33
+	$contact->fetch($idcontact);
34
+	DataPolicy::sendMailDataPolicyContact($contact);
35 35
 } else {
36 36
 
37
-    $contacts = new DataPolicy($db);
38
-    $contacts->getAllContactNotInformed();
39
-    $contacts->getAllCompaniesNotInformed();
40
-    $contacts->getAllAdherentsNotInformed();
41
-    echo $langs->trans('AllAgreementSend');
37
+	$contacts = new DataPolicy($db);
38
+	$contacts->getAllContactNotInformed();
39
+	$contacts->getAllCompaniesNotInformed();
40
+	$contacts->getAllAdherentsNotInformed();
41
+	echo $langs->trans('AllAgreementSend');
42 42
 }
Please login to merge, or discard this patch.
htdocs/takepos/invoice.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -596,10 +596,10 @@
 block discarded – undo
596 596
 			$resql1 = $db->query($sql);
597 597
 
598 598
 			if ($resdeletelines && $resql1) {
599
-            	$db->commit();
600
-            } else {
601
-            	$db->rollback();
602
-            }
599
+				$db->commit();
600
+			} else {
601
+				$db->rollback();
602
+			}
603 603
 
604 604
 			$invoice->fetch($placeid);
605 605
 		}
Please login to merge, or discard this patch.
htdocs/api/class/api_setup.class.php 1 patch
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -111,70 +111,70 @@
 block discarded – undo
111 111
 		return $list;
112 112
 	}
113 113
 
114
-    /**
115
-     * Get the list of ordering origins.
116
-     *
117
-     * @param string    $sortfield  Sort field
118
-     * @param string    $sortorder  Sort order
119
-     * @param int       $limit      Number of items per page
120
-     * @param int       $page       Page number {@min 0}
121
-     * @param int       $active     Payment type is active or not {@min 0} {@max 1}
122
-     * @param string    $sqlfilters SQL criteria to filter with. Syntax example "(t.code:=:'OrderByWWW')"
123
-     *
124
-     * @url     GET dictionary/ordering_origins
125
-     *
126
-     * @return array [List of ordering reasons]
127
-     *
128
-     * @throws RestException 400
129
-     */
130
-    public function getOrderingOrigins($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '')
131
-    {
132
-        $list = array();
133
-
134
-        if (!DolibarrApiAccess::$user->rights->commande->lire) {
135
-            throw new RestException(401);
136
-        }
137
-
138
-        $sql = "SELECT rowid, code, label, module";
139
-        $sql .= " FROM ".MAIN_DB_PREFIX."c_input_reason as t";
140
-        $sql .= " WHERE t.active = ".$active;
141
-        // Add sql filters
142
-        if ($sqlfilters)
143
-        {
144
-            if (!DolibarrApi::_checkFilters($sqlfilters))
145
-            {
146
-                throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters);
147
-            }
148
-            $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
149
-            $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
150
-        }
151
-
152
-
153
-        $sql .= $this->db->order($sortfield, $sortorder);
154
-
155
-        if ($limit) {
156
-            if ($page < 0) {
157
-                $page = 0;
158
-            }
159
-            $offset = $limit * $page;
160
-
161
-            $sql .= $this->db->plimit($limit, $offset);
162
-        }
163
-
164
-        $result = $this->db->query($sql);
165
-
166
-        if ($result) {
167
-            $num = $this->db->num_rows($result);
168
-            $min = min($num, ($limit <= 0 ? $num : $limit));
169
-            for ($i = 0; $i < $min; $i++) {
170
-                $list[] = $this->db->fetch_object($result);
171
-            }
172
-        } else {
173
-            throw new RestException(400, $this->db->lasterror());
174
-        }
175
-
176
-        return $list;
177
-    }
114
+	/**
115
+	 * Get the list of ordering origins.
116
+	 *
117
+	 * @param string    $sortfield  Sort field
118
+	 * @param string    $sortorder  Sort order
119
+	 * @param int       $limit      Number of items per page
120
+	 * @param int       $page       Page number {@min 0}
121
+	 * @param int       $active     Payment type is active or not {@min 0} {@max 1}
122
+	 * @param string    $sqlfilters SQL criteria to filter with. Syntax example "(t.code:=:'OrderByWWW')"
123
+	 *
124
+	 * @url     GET dictionary/ordering_origins
125
+	 *
126
+	 * @return array [List of ordering reasons]
127
+	 *
128
+	 * @throws RestException 400
129
+	 */
130
+	public function getOrderingOrigins($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '')
131
+	{
132
+		$list = array();
133
+
134
+		if (!DolibarrApiAccess::$user->rights->commande->lire) {
135
+			throw new RestException(401);
136
+		}
137
+
138
+		$sql = "SELECT rowid, code, label, module";
139
+		$sql .= " FROM ".MAIN_DB_PREFIX."c_input_reason as t";
140
+		$sql .= " WHERE t.active = ".$active;
141
+		// Add sql filters
142
+		if ($sqlfilters)
143
+		{
144
+			if (!DolibarrApi::_checkFilters($sqlfilters))
145
+			{
146
+				throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters);
147
+			}
148
+			$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
149
+			$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
150
+		}
151
+
152
+
153
+		$sql .= $this->db->order($sortfield, $sortorder);
154
+
155
+		if ($limit) {
156
+			if ($page < 0) {
157
+				$page = 0;
158
+			}
159
+			$offset = $limit * $page;
160
+
161
+			$sql .= $this->db->plimit($limit, $offset);
162
+		}
163
+
164
+		$result = $this->db->query($sql);
165
+
166
+		if ($result) {
167
+			$num = $this->db->num_rows($result);
168
+			$min = min($num, ($limit <= 0 ? $num : $limit));
169
+			for ($i = 0; $i < $min; $i++) {
170
+				$list[] = $this->db->fetch_object($result);
171
+			}
172
+		} else {
173
+			throw new RestException(400, $this->db->lasterror());
174
+		}
175
+
176
+		return $list;
177
+	}
178 178
 
179 179
 	/**
180 180
 	 * Get the list of payments types.
Please login to merge, or discard this patch.
htdocs/admin/system/dolibarr.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -92,30 +92,30 @@
 block discarded – undo
92 92
 $newversion = '';
93 93
 if (function_exists('curl_init'))
94 94
 {
95
-    $conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10;
96
-    print ' &nbsp; &nbsp; - &nbsp; &nbsp; ';
97
-    if ($action == 'getlastversion') {
98
-        if ($sfurl) {
99
-        	$i = 0;
100
-            while (!empty($sfurl->channel[0]->item[$i]->title) && $i < 10000) {
101
-                $title = $sfurl->channel[0]->item[$i]->title;
102
-                $reg = array();
103
-                if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg)) {
104
-                    $newversion = $reg[1];
105
-                    $newversionarray = explode('.', $newversion);
106
-                    $versionarray = explode('.', $version);
107
-                    //var_dump($newversionarray);var_dump($versionarray);
108
-                    if (versioncompare($newversionarray, $versionarray) > 0) $version = $newversion;
109
-                }
110
-                $i++;
111
-            }
95
+	$conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10;
96
+	print ' &nbsp; &nbsp; - &nbsp; &nbsp; ';
97
+	if ($action == 'getlastversion') {
98
+		if ($sfurl) {
99
+			$i = 0;
100
+			while (!empty($sfurl->channel[0]->item[$i]->title) && $i < 10000) {
101
+				$title = $sfurl->channel[0]->item[$i]->title;
102
+				$reg = array();
103
+				if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg)) {
104
+					$newversion = $reg[1];
105
+					$newversionarray = explode('.', $newversion);
106
+					$versionarray = explode('.', $version);
107
+					//var_dump($newversionarray);var_dump($versionarray);
108
+					if (versioncompare($newversionarray, $versionarray) > 0) $version = $newversion;
109
+				}
110
+				$i++;
111
+			}
112 112
 
113 113
 			// Show version
114 114
 			print $langs->trans("LastStableVersion").' : <b>'.(($version != '0.0') ? $version : $langs->trans("Unknown")).'</b>';
115 115
 			if ($version != '0.0') {
116 116
 				print ' &nbsp; <a href="https://raw.githubusercontent.com/Dolibarr/dolibarr/'.$version.'/ChangeLog" target="_blank">'.$langs->trans("SeeChangeLog").'</a>';
117 117
 			}
118
-        } else {
118
+		} else {
119 119
 			print $langs->trans("LastStableVersion").' : <b>'.$langs->trans("UpdateServerOffline").'</b>';
120 120
 		}
121 121
 	} else {
Please login to merge, or discard this patch.
htdocs/salaries/card.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -333,11 +333,11 @@
 block discarded – undo
333 333
 	// Project
334 334
 	if (!empty($conf->projet->enabled))
335 335
 	{
336
-	    $formproject = new FormProjets($db);
336
+		$formproject = new FormProjets($db);
337 337
 
338
-	    print '<tr><td>'.$langs->trans("Project").'</td><td>';
339
-	    $formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1);
340
-	    print '</td></tr>';
338
+		print '<tr><td>'.$langs->trans("Project").'</td><td>';
339
+		$formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1);
340
+		print '</td></tr>';
341 341
 	}
342 342
 
343 343
 	// Other attributes
Please login to merge, or discard this patch.
htdocs/opensurvey/class/opensurveysondage.class.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@
 block discarded – undo
188 188
 		$sql .= " ".((int) $this->allow_comments).",";
189 189
 		$sql .= " ".((int) $this->allow_spy).",";
190 190
 		$sql .= " '".$this->db->escape($this->sujet)."',";
191
-        $sql .= " ".((int) $conf->entity);
191
+		$sql .= " ".((int) $conf->entity);
192 192
 		$sql .= ")";
193 193
 
194 194
 		$this->db->begin();
Please login to merge, or discard this patch.
htdocs/accountancy/class/accountancyexport.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -825,8 +825,8 @@
 block discarded – undo
825 825
 
826 826
 		foreach ($objectLines as $line) {
827 827
 			if ($line->debit == 0 && $line->credit == 0) {
828
-                unset($array[$line]);
829
-            } else {
828
+				unset($array[$line]);
829
+			} else {
830 830
 				$date_creation = dol_print_date($line->date_creation, '%Y%m%d');
831 831
 				$date_document = dol_print_date($line->doc_date, '%Y%m%d');
832 832
 				$date_lettering = dol_print_date($line->date_lettering, '%Y%m%d');
Please login to merge, or discard this patch.
htdocs/core/class/CMailFile.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
 		// Add autocopy to if not already in $to (Note: Adding bcc for specific modules are also done from pages)
150 150
 		if (!empty($conf->global->MAIN_MAIL_AUTOCOPY_TO) && !preg_match('/'.preg_quote($conf->global->MAIN_MAIL_AUTOCOPY_TO, '/').'/i', $to)) {
151
-		    $addr_bcc .= ($addr_bcc ? ', ' : '').$conf->global->MAIN_MAIL_AUTOCOPY_TO;
151
+			$addr_bcc .= ($addr_bcc ? ', ' : '').$conf->global->MAIN_MAIL_AUTOCOPY_TO;
152 152
 		}
153 153
 
154 154
 		$this->subject = $subject;
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 
280 280
 		// Add autocopy to if not already in $to (Note: Adding bcc for specific modules are also done from pages)
281 281
 		if (!empty($conf->global->MAIN_MAIL_AUTOCOPY_TO) && !preg_match('/'.preg_quote($conf->global->MAIN_MAIL_AUTOCOPY_TO, '/').'/i', $to)) {
282
-		    $addr_bcc .= ($addr_bcc ? ', ' : '').$conf->global->MAIN_MAIL_AUTOCOPY_TO;
282
+			$addr_bcc .= ($addr_bcc ? ', ' : '').$conf->global->MAIN_MAIL_AUTOCOPY_TO;
283 283
 		}
284 284
 
285 285
 		$this->addr_to = $to;
Please login to merge, or discard this patch.