Completed
Push — work-fleets ( bf14b2...c62b27 )
by SuperNova.WS
06:15
created
includes/classes/db_mysql.php 1 patch
Doc Comments   +29 added lines, -4 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
   /**
158 158
    * @param string $query
159 159
    *
160
-   * @return mixed|string
160
+   * @return string
161 161
    */
162 162
   public function replaceTablePlaceholders($query) {
163 163
     $sql = $query;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
   }
172 172
 
173 173
   /**
174
-   * @param $query
174
+   * @param string $query
175 175
    */
176 176
   protected function logQuery($query) {
177 177
     if (!classSupernova::$config->debug) {
@@ -301,10 +301,16 @@  discard block
 block discarded – undo
301 301
   }
302 302
 
303 303
 
304
+  /**
305
+   * @param string $query
306
+   */
304 307
   public function doInsertComplex($query) {
305 308
     return $this->doSql($query);
306 309
   }
307 310
 
311
+  /**
312
+   * @param integer $replace
313
+   */
308 314
   protected function doSet($table, $fieldsAndValues, $replace = DB_INSERT_PLAIN) {
309 315
     $tableSafe = $this->db_escape($table);
310 316
     $safeFieldsAndValues = implode(',', $this->safeFieldsEqualValues($fieldsAndValues));
@@ -337,6 +343,9 @@  discard block
 block discarded – undo
337 343
     return $this->doSet($table, $fieldsAndValues, $replace);
338 344
   }
339 345
 
346
+  /**
347
+   * @param string $table
348
+   */
340 349
   public function doReplaceSet($table, $fieldsAndValues) {
341 350
     return $this->doSet($table, $fieldsAndValues, DB_INSERT_REPLACE);
342 351
   }
@@ -371,7 +380,7 @@  discard block
 block discarded – undo
371 380
    * Values should be passed as-is
372 381
    *
373 382
    * @param string   $table
374
-   * @param array    $fields
383
+   * @param string[]    $fields
375 384
    * @param string[] $values
376 385
    *
377 386
    * @return array|bool|mysqli_result|null
@@ -410,7 +419,7 @@  discard block
 block discarded – undo
410 419
    * Self-contained - means no params used
411 420
    * Such queries usually used to make large amount of in-base calculations
412 421
    *
413
-   * @param $query
422
+   * @param string $query
414 423
    *
415 424
    * @return array|bool|mysqli_result|null
416 425
    */
@@ -418,6 +427,9 @@  discard block
 block discarded – undo
418 427
     return $this->doSql($query);
419 428
   }
420 429
 
430
+  /**
431
+   * @param boolean $isOneRecord
432
+   */
421 433
   protected function doUpdateWhere($table, $fieldsSet, $fieldsAdjust = array(), $where = array(), $isOneRecord = DB_RECORDS_ALL) {
422 434
     $tableSafe = $this->db_escape($table);
423 435
 
@@ -441,10 +453,16 @@  discard block
 block discarded – undo
441 453
     return $this->doSql($query);
442 454
   }
443 455
 
456
+  /**
457
+   * @param string $table
458
+   */
444 459
   public function doUpdateRowSet($table, $fieldsAndValues, $where) {
445 460
     return $this->doUpdateWhere($table, $fieldsAndValues, array(), $where, DB_RECORD_ONE);
446 461
   }
447 462
 
463
+  /**
464
+   * @param string $table
465
+   */
448 466
   public function doUpdateTableSet($table, $fieldsAndValues, $where = array()) {
449 467
     return $this->doUpdateWhere($table, $fieldsAndValues, array(), $where, DB_RECORDS_ALL);
450 468
   }
@@ -711,6 +729,10 @@  discard block
 block discarded – undo
711 729
   }
712 730
 
713 731
   // TODO Заменить это на новый логгер
732
+
733
+  /**
734
+   * @param string $query
735
+   */
714 736
   protected function security_watch_user_queries($query) {
715 737
     global $user;
716 738
 
@@ -734,6 +756,9 @@  discard block
 block discarded – undo
734 756
   }
735 757
 
736 758
 
759
+  /**
760
+   * @param string $query
761
+   */
737 762
   public function security_query_check_bad_words($query) {
738 763
     if ($this->skipQueryCheck) {
739 764
       return;
Please login to merge, or discard this patch.