@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | |
| 213 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 213 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 214 | 214 | /** |
| 215 | 215 | * Select a database |
| 216 | 216 | * |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | */ |
| 220 | 220 | public function select_db($database) |
| 221 | 221 | { |
| 222 | - // phpcs:enable |
|
| 222 | + // phpcs:enable |
|
| 223 | 223 | dol_syslog(get_class($this) . "::select_db database=" . $database, LOG_DEBUG); |
| 224 | 224 | $result = false; |
| 225 | 225 | try { |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | return $msg; |
| 384 | 384 | } |
| 385 | 385 | |
| 386 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 386 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 387 | 387 | /** |
| 388 | 388 | * Returns the current line (as an object) for the resultset cursor |
| 389 | 389 | * |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | */ |
| 393 | 393 | public function fetch_object($resultset) |
| 394 | 394 | { |
| 395 | - // phpcs:enable |
|
| 395 | + // phpcs:enable |
|
| 396 | 396 | // If the resultset was not provided, we get the last one for this connection |
| 397 | 397 | if (!is_object($resultset)) { |
| 398 | 398 | $resultset = $this->_results; |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | } |
| 402 | 402 | |
| 403 | 403 | |
| 404 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 404 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 405 | 405 | /** |
| 406 | 406 | * Return datas as an array |
| 407 | 407 | * |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | */ |
| 411 | 411 | public function fetch_array($resultset) |
| 412 | 412 | { |
| 413 | - // phpcs:enable |
|
| 413 | + // phpcs:enable |
|
| 414 | 414 | // If resultset not provided, we take the last used by connection |
| 415 | 415 | if (!is_object($resultset)) { |
| 416 | 416 | $resultset = $this->_results; |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | return $resultset->fetch_array(); |
| 419 | 419 | } |
| 420 | 420 | |
| 421 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 421 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 422 | 422 | /** |
| 423 | 423 | * Return datas as an array |
| 424 | 424 | * |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | */ |
| 428 | 428 | public function fetch_row($resultset) |
| 429 | 429 | { |
| 430 | - // phpcs:enable |
|
| 430 | + // phpcs:enable |
|
| 431 | 431 | // If resultset not provided, we take the last used by connection |
| 432 | 432 | if (!is_bool($resultset)) { |
| 433 | 433 | if (!is_object($resultset)) { |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | } |
| 441 | 441 | } |
| 442 | 442 | |
| 443 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 443 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 444 | 444 | /** |
| 445 | 445 | * Return number of lines for result of a SELECT |
| 446 | 446 | * |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | */ |
| 451 | 451 | public function num_rows($resultset) |
| 452 | 452 | { |
| 453 | - // phpcs:enable |
|
| 453 | + // phpcs:enable |
|
| 454 | 454 | // If resultset not provided, we take the last used by connection |
| 455 | 455 | if (!is_object($resultset)) { |
| 456 | 456 | $resultset = $this->_results; |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | return isset($resultset->num_rows) ? $resultset->num_rows : 0; |
| 459 | 459 | } |
| 460 | 460 | |
| 461 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 461 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 462 | 462 | /** |
| 463 | 463 | * Return the number of lines in the result of a request INSERT, DELETE or UPDATE |
| 464 | 464 | * |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | */ |
| 469 | 469 | public function affected_rows($resultset) |
| 470 | 470 | { |
| 471 | - // phpcs:enable |
|
| 471 | + // phpcs:enable |
|
| 472 | 472 | // If resultset not provided, we take the last used by connection |
| 473 | 473 | if (!is_object($resultset)) { |
| 474 | 474 | $resultset = $this->_results; |
@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | } |
| 587 | 587 | } |
| 588 | 588 | |
| 589 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 589 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 590 | 590 | /** |
| 591 | 591 | * Get last ID after an insert INSERT |
| 592 | 592 | * |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | */ |
| 597 | 597 | public function last_insert_id($tab, $fieldid = 'rowid') |
| 598 | 598 | { |
| 599 | - // phpcs:enable |
|
| 599 | + // phpcs:enable |
|
| 600 | 600 | return $this->db->insert_id; |
| 601 | 601 | } |
| 602 | 602 | |
@@ -661,7 +661,7 @@ discard block |
||
| 661 | 661 | } |
| 662 | 662 | |
| 663 | 663 | |
| 664 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 664 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 665 | 665 | /** |
| 666 | 666 | * Return connection ID |
| 667 | 667 | * |
@@ -669,7 +669,7 @@ discard block |
||
| 669 | 669 | */ |
| 670 | 670 | public function DDLGetConnectId() |
| 671 | 671 | { |
| 672 | - // phpcs:enable |
|
| 672 | + // phpcs:enable |
|
| 673 | 673 | $resql = $this->query('SELECT CONNECTION_ID()'); |
| 674 | 674 | if ($resql) { |
| 675 | 675 | $row = $this->fetch_row($resql); |
@@ -679,7 +679,7 @@ discard block |
||
| 679 | 679 | } |
| 680 | 680 | } |
| 681 | 681 | |
| 682 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 682 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 683 | 683 | /** |
| 684 | 684 | * Create a new database |
| 685 | 685 | * Do not use function xxx_create_db (xxx=mysql, ...) as they are deprecated |
@@ -693,7 +693,7 @@ discard block |
||
| 693 | 693 | */ |
| 694 | 694 | public function DDLCreateDb($database, $charset = '', $collation = '', $owner = '') |
| 695 | 695 | { |
| 696 | - // phpcs:enable |
|
| 696 | + // phpcs:enable |
|
| 697 | 697 | if (empty($charset)) { |
| 698 | 698 | $charset = $this->forcecharset; |
| 699 | 699 | } |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | return $ret; |
| 717 | 717 | } |
| 718 | 718 | |
| 719 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 719 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 720 | 720 | /** |
| 721 | 721 | * List tables into a database |
| 722 | 722 | * |
@@ -726,7 +726,7 @@ discard block |
||
| 726 | 726 | */ |
| 727 | 727 | public function DDLListTables($database, $table = '') |
| 728 | 728 | { |
| 729 | - // phpcs:enable |
|
| 729 | + // phpcs:enable |
|
| 730 | 730 | $listtables = array(); |
| 731 | 731 | |
| 732 | 732 | $like = ''; |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | return $listtables; |
| 749 | 749 | } |
| 750 | 750 | |
| 751 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 751 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 752 | 752 | /** |
| 753 | 753 | * List tables into a database |
| 754 | 754 | * |
@@ -758,7 +758,7 @@ discard block |
||
| 758 | 758 | */ |
| 759 | 759 | public function DDLListTablesFull($database, $table = '') |
| 760 | 760 | { |
| 761 | - // phpcs:enable |
|
| 761 | + // phpcs:enable |
|
| 762 | 762 | $listtables = array(); |
| 763 | 763 | |
| 764 | 764 | $like = ''; |
@@ -780,7 +780,7 @@ discard block |
||
| 780 | 780 | return $listtables; |
| 781 | 781 | } |
| 782 | 782 | |
| 783 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 783 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 784 | 784 | /** |
| 785 | 785 | * List information of columns into a table. |
| 786 | 786 | * |
@@ -789,7 +789,7 @@ discard block |
||
| 789 | 789 | */ |
| 790 | 790 | public function DDLInfoTable($table) |
| 791 | 791 | { |
| 792 | - // phpcs:enable |
|
| 792 | + // phpcs:enable |
|
| 793 | 793 | $infotables = array(); |
| 794 | 794 | |
| 795 | 795 | $tmptable = preg_replace('/[^a-z0-9\.\-\_]/i', '', $table); |
@@ -806,7 +806,7 @@ discard block |
||
| 806 | 806 | return $infotables; |
| 807 | 807 | } |
| 808 | 808 | |
| 809 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 809 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 810 | 810 | /** |
| 811 | 811 | * Create a table into database |
| 812 | 812 | * |
@@ -821,7 +821,7 @@ discard block |
||
| 821 | 821 | */ |
| 822 | 822 | public function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) |
| 823 | 823 | { |
| 824 | - // phpcs:enable |
|
| 824 | + // phpcs:enable |
|
| 825 | 825 | // FIXME: $fulltext_keys parameter is unused |
| 826 | 826 | |
| 827 | 827 | $pk = ''; |
@@ -893,7 +893,7 @@ discard block |
||
| 893 | 893 | } |
| 894 | 894 | } |
| 895 | 895 | |
| 896 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 896 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 897 | 897 | /** |
| 898 | 898 | * Drop a table into database |
| 899 | 899 | * |
@@ -902,7 +902,7 @@ discard block |
||
| 902 | 902 | */ |
| 903 | 903 | public function DDLDropTable($table) |
| 904 | 904 | { |
| 905 | - // phpcs:enable |
|
| 905 | + // phpcs:enable |
|
| 906 | 906 | $tmptable = preg_replace('/[^a-z0-9\.\-\_]/i', '', $table); |
| 907 | 907 | |
| 908 | 908 | $sql = "DROP TABLE " . $tmptable; |
@@ -914,7 +914,7 @@ discard block |
||
| 914 | 914 | } |
| 915 | 915 | } |
| 916 | 916 | |
| 917 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 917 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 918 | 918 | /** |
| 919 | 919 | * Return a pointer of line with description of a table or field |
| 920 | 920 | * |
@@ -924,7 +924,7 @@ discard block |
||
| 924 | 924 | */ |
| 925 | 925 | public function DDLDescTable($table, $field = "") |
| 926 | 926 | { |
| 927 | - // phpcs:enable |
|
| 927 | + // phpcs:enable |
|
| 928 | 928 | $sql = "DESC " . $table . " " . $field; |
| 929 | 929 | |
| 930 | 930 | dol_syslog(get_class($this) . "::DDLDescTable " . $sql, LOG_DEBUG); |
@@ -932,7 +932,7 @@ discard block |
||
| 932 | 932 | return $this->_results; |
| 933 | 933 | } |
| 934 | 934 | |
| 935 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 935 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 936 | 936 | /** |
| 937 | 937 | * Create a new field into table |
| 938 | 938 | * |
@@ -944,7 +944,7 @@ discard block |
||
| 944 | 944 | */ |
| 945 | 945 | public function DDLAddField($table, $field_name, $field_desc, $field_position = "") |
| 946 | 946 | { |
| 947 | - // phpcs:enable |
|
| 947 | + // phpcs:enable |
|
| 948 | 948 | // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra |
| 949 | 949 | // ex. : $field_desc = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment'); |
| 950 | 950 | $sql = "ALTER TABLE " . $table . " ADD " . $field_name . " "; |
@@ -979,7 +979,7 @@ discard block |
||
| 979 | 979 | return -1; |
| 980 | 980 | } |
| 981 | 981 | |
| 982 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 982 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 983 | 983 | /** |
| 984 | 984 | * Update format of a field into a table |
| 985 | 985 | * |
@@ -990,7 +990,7 @@ discard block |
||
| 990 | 990 | */ |
| 991 | 991 | public function DDLUpdateField($table, $field_name, $field_desc) |
| 992 | 992 | { |
| 993 | - // phpcs:enable |
|
| 993 | + // phpcs:enable |
|
| 994 | 994 | $sql = "ALTER TABLE " . $table; |
| 995 | 995 | $sql .= " MODIFY COLUMN " . $field_name . " " . $field_desc['type']; |
| 996 | 996 | if (in_array($field_desc['type'], array('double', 'tinyint', 'int', 'varchar')) && $field_desc['value']) { |
@@ -1025,7 +1025,7 @@ discard block |
||
| 1025 | 1025 | } |
| 1026 | 1026 | } |
| 1027 | 1027 | |
| 1028 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1028 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1029 | 1029 | /** |
| 1030 | 1030 | * Drop a field from table |
| 1031 | 1031 | * |
@@ -1035,7 +1035,7 @@ discard block |
||
| 1035 | 1035 | */ |
| 1036 | 1036 | public function DDLDropField($table, $field_name) |
| 1037 | 1037 | { |
| 1038 | - // phpcs:enable |
|
| 1038 | + // phpcs:enable |
|
| 1039 | 1039 | $tmp_field_name = preg_replace('/[^a-z0-9\.\-\_]/i', '', $field_name); |
| 1040 | 1040 | |
| 1041 | 1041 | $sql = "ALTER TABLE " . $table . " DROP COLUMN `" . $tmp_field_name . "`"; |
@@ -1047,7 +1047,7 @@ discard block |
||
| 1047 | 1047 | } |
| 1048 | 1048 | |
| 1049 | 1049 | |
| 1050 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1050 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1051 | 1051 | /** |
| 1052 | 1052 | * Create a user and privileges to connect to database (even if database does not exists yet) |
| 1053 | 1053 | * |
@@ -1059,7 +1059,7 @@ discard block |
||
| 1059 | 1059 | */ |
| 1060 | 1060 | public function DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name) |
| 1061 | 1061 | { |
| 1062 | - // phpcs:enable |
|
| 1062 | + // phpcs:enable |
|
| 1063 | 1063 | $sql = "CREATE USER '" . $this->escape($dolibarr_main_db_user) . "' IDENTIFIED BY '" . $this->escape($dolibarr_main_db_pass) . "'"; |
| 1064 | 1064 | dol_syslog(get_class($this) . "::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log |
| 1065 | 1065 | $resql = $this->query($sql); |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | $clientmustbe = 'utf8'; |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | - $disableforcecharset = 0; // Set to 1 to test without charset forcing |
|
| 122 | + $disableforcecharset = 0; // Set to 1 to test without charset forcing |
|
| 123 | 123 | if (empty($disableforcecharset) && $this->db->character_set_name() != $clientmustbe) { |
| 124 | 124 | try { |
| 125 | 125 | //print "You should set the \$dolibarr_main_db_character_set and \$dolibarr_main_db_collation for the PHP to the one of the database ".$this->db->character_set_name(); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function ifsql($test, $resok, $resko); |
| 38 | 38 | |
| 39 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 39 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 40 | 40 | /** |
| 41 | 41 | * Return datas as an array |
| 42 | 42 | * |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * @return array Array |
| 45 | 45 | */ |
| 46 | 46 | public function fetch_row($resultset); |
| 47 | - // phpcs:enable |
|
| 47 | + // phpcs:enable |
|
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field. |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function begin($textinlog = ''); |
| 72 | 72 | |
| 73 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 73 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 74 | 74 | /** |
| 75 | 75 | * Create a new database |
| 76 | 76 | * Do not use function xxx_create_db (xxx=mysql, ...) as they are deprecated |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * @return resource resource defined if OK, null if KO |
| 84 | 84 | */ |
| 85 | 85 | public function DDLCreateDb($database, $charset = '', $collation = '', $owner = ''); |
| 86 | - // phpcs:enable |
|
| 86 | + // phpcs:enable |
|
| 87 | 87 | |
| 88 | 88 | /** |
| 89 | 89 | * Return version of database server into an array |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | public function convertSQLFromMysql($line, $type = 'ddl'); |
| 103 | 103 | |
| 104 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 104 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 105 | 105 | /** |
| 106 | 106 | * Return the number of lines in the result of a request INSERT, DELETE or UPDATE |
| 107 | 107 | * |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * @see num_rows() |
| 111 | 111 | */ |
| 112 | 112 | public function affected_rows($resultset); |
| 113 | - // phpcs:enable |
|
| 113 | + // phpcs:enable |
|
| 114 | 114 | |
| 115 | 115 | /** |
| 116 | 116 | * Return description of last error |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | public function error(); |
| 121 | 121 | |
| 122 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 122 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 123 | 123 | /** |
| 124 | 124 | * List tables into a database |
| 125 | 125 | * |
@@ -128,9 +128,9 @@ discard block |
||
| 128 | 128 | * @return array List of tables in an array |
| 129 | 129 | */ |
| 130 | 130 | public function DDLListTables($database, $table = ''); |
| 131 | - // phpcs:enable |
|
| 131 | + // phpcs:enable |
|
| 132 | 132 | |
| 133 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 133 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 134 | 134 | /** |
| 135 | 135 | * List tables into a database with table type |
| 136 | 136 | * |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | * @return array List of tables in an array |
| 140 | 140 | */ |
| 141 | 141 | public function DDLListTablesFull($database, $table = ''); |
| 142 | - // phpcs:enable |
|
| 142 | + // phpcs:enable |
|
| 143 | 143 | |
| 144 | 144 | /** |
| 145 | 145 | * Return last request executed with query() |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | */ |
| 166 | 166 | public function decrypt($value); |
| 167 | 167 | |
| 168 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 168 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 169 | 169 | /** |
| 170 | 170 | * Return datas as an array |
| 171 | 171 | * |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | * @return array Array |
| 174 | 174 | */ |
| 175 | 175 | public function fetch_array($resultset); |
| 176 | - // phpcs:enable |
|
| 176 | + // phpcs:enable |
|
| 177 | 177 | |
| 178 | 178 | /** |
| 179 | 179 | * Return last error label |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | */ |
| 208 | 208 | public function sanitize($stringtosanitize); |
| 209 | 209 | |
| 210 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 210 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 211 | 211 | /** |
| 212 | 212 | * Get last ID after an insert INSERT |
| 213 | 213 | * |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | * @return int Id of row |
| 217 | 217 | */ |
| 218 | 218 | public function last_insert_id($tab, $fieldid = 'rowid'); |
| 219 | - // phpcs:enable |
|
| 219 | + // phpcs:enable |
|
| 220 | 220 | |
| 221 | 221 | /** |
| 222 | 222 | * Return full path of restore program |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | */ |
| 291 | 291 | public function getDefaultCollationDatabase(); |
| 292 | 292 | |
| 293 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 293 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 294 | 294 | /** |
| 295 | 295 | * Return number of lines for result of a SELECT |
| 296 | 296 | * |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | * @see affected_rows() |
| 300 | 300 | */ |
| 301 | 301 | public function num_rows($resultset); |
| 302 | - // phpcs:enable |
|
| 302 | + // phpcs:enable |
|
| 303 | 303 | |
| 304 | 304 | /** |
| 305 | 305 | * Return full path of dump program |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | */ |
| 323 | 323 | public function errno(); |
| 324 | 324 | |
| 325 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 325 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 326 | 326 | /** |
| 327 | 327 | * Create a table into database |
| 328 | 328 | * |
@@ -336,9 +336,9 @@ discard block |
||
| 336 | 336 | * @return int Return integer <0 if KO, >=0 if OK |
| 337 | 337 | */ |
| 338 | 338 | public function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null); |
| 339 | - // phpcs:enable |
|
| 339 | + // phpcs:enable |
|
| 340 | 340 | |
| 341 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 341 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 342 | 342 | /** |
| 343 | 343 | * Drop a table into database |
| 344 | 344 | * |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | * @return int Return integer <0 if KO, >=0 if OK |
| 347 | 347 | */ |
| 348 | 348 | public function DDLDropTable($table); |
| 349 | - // phpcs:enable |
|
| 349 | + // phpcs:enable |
|
| 350 | 350 | |
| 351 | 351 | /** |
| 352 | 352 | * Return list of available charset that can be used to store data in database |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | */ |
| 356 | 356 | public function getListOfCharacterSet(); |
| 357 | 357 | |
| 358 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 358 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 359 | 359 | /** |
| 360 | 360 | * Create a new field into table |
| 361 | 361 | * |
@@ -366,9 +366,9 @@ discard block |
||
| 366 | 366 | * @return int Return integer <0 if KO, >0 if OK |
| 367 | 367 | */ |
| 368 | 368 | public function DDLAddField($table, $field_name, $field_desc, $field_position = ""); |
| 369 | - // phpcs:enable |
|
| 369 | + // phpcs:enable |
|
| 370 | 370 | |
| 371 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 371 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 372 | 372 | /** |
| 373 | 373 | * Drop a field from table |
| 374 | 374 | * |
@@ -377,9 +377,9 @@ discard block |
||
| 377 | 377 | * @return int Return integer <0 if KO, >0 if OK |
| 378 | 378 | */ |
| 379 | 379 | public function DDLDropField($table, $field_name); |
| 380 | - // phpcs:enable |
|
| 380 | + // phpcs:enable |
|
| 381 | 381 | |
| 382 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 382 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 383 | 383 | /** |
| 384 | 384 | * Update format of a field into a table |
| 385 | 385 | * |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | * @return int Return integer <0 if KO, >0 if OK |
| 390 | 390 | */ |
| 391 | 391 | public function DDLUpdateField($table, $field_name, $field_desc); |
| 392 | - // phpcs:enable |
|
| 392 | + // phpcs:enable |
|
| 393 | 393 | |
| 394 | 394 | /** |
| 395 | 395 | * Return list of available collation that can be used for database |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | */ |
| 399 | 399 | public function getListOfCollation(); |
| 400 | 400 | |
| 401 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 401 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 402 | 402 | /** |
| 403 | 403 | * Return a pointer of line with description of a table or field |
| 404 | 404 | * |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | * @return resource Resource |
| 408 | 408 | */ |
| 409 | 409 | public function DDLDescTable($table, $field = ""); |
| 410 | - // phpcs:enable |
|
| 410 | + // phpcs:enable |
|
| 411 | 411 | |
| 412 | 412 | /** |
| 413 | 413 | * Return version of database server |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | */ |
| 424 | 424 | public function getDefaultCharacterSetDatabase(); |
| 425 | 425 | |
| 426 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 426 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 427 | 427 | /** |
| 428 | 428 | * Create a user and privileges to connect to database (even if database does not exists yet) |
| 429 | 429 | * |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | $dolibarr_main_db_pass, |
| 440 | 440 | $dolibarr_main_db_name |
| 441 | 441 | ); |
| 442 | - // phpcs:enable |
|
| 442 | + // phpcs:enable |
|
| 443 | 443 | |
| 444 | 444 | /** |
| 445 | 445 | * Convert (by PHP) a PHP server TZ string date into a Timestamps date (GMT if gm=true) |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | */ |
| 471 | 471 | public function commit($log = ''); |
| 472 | 472 | |
| 473 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 473 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 474 | 474 | /** |
| 475 | 475 | * List information of columns into a table. |
| 476 | 476 | * |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | * @return array Array with information on table |
| 479 | 479 | */ |
| 480 | 480 | public function DDLInfoTable($table); |
| 481 | - // phpcs:enable |
|
| 481 | + // phpcs:enable |
|
| 482 | 482 | |
| 483 | 483 | /** |
| 484 | 484 | * Free last resultset used. |
@@ -503,16 +503,16 @@ discard block |
||
| 503 | 503 | */ |
| 504 | 504 | public function lastqueryerror(); |
| 505 | 505 | |
| 506 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 506 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 507 | 507 | /** |
| 508 | 508 | * Return connection ID |
| 509 | 509 | * |
| 510 | 510 | * @return string Id connection |
| 511 | 511 | */ |
| 512 | 512 | public function DDLGetConnectId(); |
| 513 | - // phpcs:enable |
|
| 513 | + // phpcs:enable |
|
| 514 | 514 | |
| 515 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 515 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 516 | 516 | /** |
| 517 | 517 | * Returns the current line (as an object) for the resultset cursor |
| 518 | 518 | * |
@@ -520,9 +520,9 @@ discard block |
||
| 520 | 520 | * @return Object|false Object result line or false if KO or end of cursor |
| 521 | 521 | */ |
| 522 | 522 | public function fetch_object($resultset); |
| 523 | - // phpcs:enable |
|
| 523 | + // phpcs:enable |
|
| 524 | 524 | |
| 525 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 525 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 526 | 526 | /** |
| 527 | 527 | * Select a database |
| 528 | 528 | * |
@@ -530,5 +530,5 @@ discard block |
||
| 530 | 530 | * @return boolean true if OK, false if KO |
| 531 | 531 | */ |
| 532 | 532 | public function select_db($database); |
| 533 | - // phpcs:enable |
|
| 533 | + // phpcs:enable |
|
| 534 | 534 | } |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | return $line; |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 294 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 295 | 295 | /** |
| 296 | 296 | * Select a database |
| 297 | 297 | * |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | */ |
| 301 | 301 | public function select_db($database) |
| 302 | 302 | { |
| 303 | - // phpcs:enable |
|
| 303 | + // phpcs:enable |
|
| 304 | 304 | dol_syslog(get_class($this) . "::select_db database=" . $database, LOG_DEBUG); |
| 305 | 305 | // sqlite_select_db() does not exist |
| 306 | 306 | //return sqlite_select_db($this->db,$database); |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | return $ret; |
| 508 | 508 | } |
| 509 | 509 | |
| 510 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 510 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 511 | 511 | /** |
| 512 | 512 | * Returns the current line (as an object) for the resultset cursor |
| 513 | 513 | * |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | */ |
| 517 | 517 | public function fetch_object($resultset) |
| 518 | 518 | { |
| 519 | - // phpcs:enable |
|
| 519 | + // phpcs:enable |
|
| 520 | 520 | // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connection |
| 521 | 521 | if (!is_object($resultset)) { |
| 522 | 522 | $resultset = $this->_results; |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | } |
| 531 | 531 | |
| 532 | 532 | |
| 533 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 533 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 534 | 534 | /** |
| 535 | 535 | * Return datas as an array |
| 536 | 536 | * |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | */ |
| 540 | 540 | public function fetch_array($resultset) |
| 541 | 541 | { |
| 542 | - // phpcs:enable |
|
| 542 | + // phpcs:enable |
|
| 543 | 543 | // If resultset not provided, we take the last used by connection |
| 544 | 544 | if (!is_object($resultset)) { |
| 545 | 545 | $resultset = $this->_results; |
@@ -549,7 +549,7 @@ discard block |
||
| 549 | 549 | return $ret; |
| 550 | 550 | } |
| 551 | 551 | |
| 552 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 552 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 553 | 553 | /** |
| 554 | 554 | * Return datas as an array |
| 555 | 555 | * |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | */ |
| 559 | 559 | public function fetch_row($resultset) |
| 560 | 560 | { |
| 561 | - // phpcs:enable |
|
| 561 | + // phpcs:enable |
|
| 562 | 562 | // If resultset not provided, we take the last used by connection |
| 563 | 563 | if (!is_bool($resultset)) { |
| 564 | 564 | if (!is_object($resultset)) { |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | } |
| 572 | 572 | } |
| 573 | 573 | |
| 574 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 574 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 575 | 575 | /** |
| 576 | 576 | * Return number of lines for result of a SELECT |
| 577 | 577 | * |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | */ |
| 582 | 582 | public function num_rows($resultset) |
| 583 | 583 | { |
| 584 | - // phpcs:enable |
|
| 584 | + // phpcs:enable |
|
| 585 | 585 | // FIXME: SQLite3Result does not have a queryString member |
| 586 | 586 | |
| 587 | 587 | // If resultset not provided, we take the last used by connection |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | return 0; |
| 595 | 595 | } |
| 596 | 596 | |
| 597 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 597 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 598 | 598 | /** |
| 599 | 599 | * Return number of lines for result of a SELECT |
| 600 | 600 | * |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | */ |
| 605 | 605 | public function affected_rows($resultset) |
| 606 | 606 | { |
| 607 | - // phpcs:enable |
|
| 607 | + // phpcs:enable |
|
| 608 | 608 | // FIXME: SQLite3Result does not have a queryString member |
| 609 | 609 | |
| 610 | 610 | // If resultset not provided, we take the last used by connection |
@@ -744,7 +744,7 @@ discard block |
||
| 744 | 744 | } |
| 745 | 745 | } |
| 746 | 746 | |
| 747 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 747 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 748 | 748 | /** |
| 749 | 749 | * Get last ID after an insert INSERT |
| 750 | 750 | * |
@@ -754,7 +754,7 @@ discard block |
||
| 754 | 754 | */ |
| 755 | 755 | public function last_insert_id($tab, $fieldid = 'rowid') |
| 756 | 756 | { |
| 757 | - // phpcs:enable |
|
| 757 | + // phpcs:enable |
|
| 758 | 758 | return $this->db->lastInsertRowId(); |
| 759 | 759 | } |
| 760 | 760 | |
@@ -819,7 +819,7 @@ discard block |
||
| 819 | 819 | } |
| 820 | 820 | |
| 821 | 821 | |
| 822 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 822 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 823 | 823 | /** |
| 824 | 824 | * Return connection ID |
| 825 | 825 | * |
@@ -827,12 +827,12 @@ discard block |
||
| 827 | 827 | */ |
| 828 | 828 | public function DDLGetConnectId() |
| 829 | 829 | { |
| 830 | - // phpcs:enable |
|
| 830 | + // phpcs:enable |
|
| 831 | 831 | return '?'; |
| 832 | 832 | } |
| 833 | 833 | |
| 834 | 834 | |
| 835 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 835 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 836 | 836 | /** |
| 837 | 837 | * Create a new database |
| 838 | 838 | * Do not use function xxx_create_db (xxx=mysql, ...) as they are deprecated |
@@ -846,7 +846,7 @@ discard block |
||
| 846 | 846 | */ |
| 847 | 847 | public function DDLCreateDb($database, $charset = '', $collation = '', $owner = '') |
| 848 | 848 | { |
| 849 | - // phpcs:enable |
|
| 849 | + // phpcs:enable |
|
| 850 | 850 | if (empty($charset)) { |
| 851 | 851 | $charset = $this->forcecharset; |
| 852 | 852 | } |
@@ -864,7 +864,7 @@ discard block |
||
| 864 | 864 | return $ret; |
| 865 | 865 | } |
| 866 | 866 | |
| 867 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 867 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 868 | 868 | /** |
| 869 | 869 | * List tables into a database |
| 870 | 870 | * |
@@ -874,7 +874,7 @@ discard block |
||
| 874 | 874 | */ |
| 875 | 875 | public function DDLListTables($database, $table = '') |
| 876 | 876 | { |
| 877 | - // phpcs:enable |
|
| 877 | + // phpcs:enable |
|
| 878 | 878 | $listtables = array(); |
| 879 | 879 | |
| 880 | 880 | $like = ''; |
@@ -896,7 +896,7 @@ discard block |
||
| 896 | 896 | return $listtables; |
| 897 | 897 | } |
| 898 | 898 | |
| 899 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 899 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 900 | 900 | /** |
| 901 | 901 | * List tables into a database with table type |
| 902 | 902 | * |
@@ -906,7 +906,7 @@ discard block |
||
| 906 | 906 | */ |
| 907 | 907 | public function DDLListTablesFull($database, $table = '') |
| 908 | 908 | { |
| 909 | - // phpcs:enable |
|
| 909 | + // phpcs:enable |
|
| 910 | 910 | $listtables = array(); |
| 911 | 911 | |
| 912 | 912 | $like = ''; |
@@ -928,7 +928,7 @@ discard block |
||
| 928 | 928 | return $listtables; |
| 929 | 929 | } |
| 930 | 930 | |
| 931 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 931 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 932 | 932 | /** |
| 933 | 933 | * List information of columns into a table. |
| 934 | 934 | * |
@@ -938,7 +938,7 @@ discard block |
||
| 938 | 938 | */ |
| 939 | 939 | public function DDLInfoTable($table) |
| 940 | 940 | { |
| 941 | - // phpcs:enable |
|
| 941 | + // phpcs:enable |
|
| 942 | 942 | $infotables = array(); |
| 943 | 943 | |
| 944 | 944 | $tmptable = preg_replace('/[^a-z0-9\.\-\_]/i', '', $table); |
@@ -955,7 +955,7 @@ discard block |
||
| 955 | 955 | return $infotables; |
| 956 | 956 | } |
| 957 | 957 | |
| 958 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 958 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 959 | 959 | /** |
| 960 | 960 | * Create a table into database |
| 961 | 961 | * |
@@ -970,7 +970,7 @@ discard block |
||
| 970 | 970 | */ |
| 971 | 971 | public function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) |
| 972 | 972 | { |
| 973 | - // phpcs:enable |
|
| 973 | + // phpcs:enable |
|
| 974 | 974 | // FIXME: $fulltext_keys parameter is unused |
| 975 | 975 | |
| 976 | 976 | $sqlfields = array(); |
@@ -1038,7 +1038,7 @@ discard block |
||
| 1038 | 1038 | return 1; |
| 1039 | 1039 | } |
| 1040 | 1040 | |
| 1041 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1041 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1042 | 1042 | /** |
| 1043 | 1043 | * Drop a table into database |
| 1044 | 1044 | * |
@@ -1047,7 +1047,7 @@ discard block |
||
| 1047 | 1047 | */ |
| 1048 | 1048 | public function DDLDropTable($table) |
| 1049 | 1049 | { |
| 1050 | - // phpcs:enable |
|
| 1050 | + // phpcs:enable |
|
| 1051 | 1051 | $tmptable = preg_replace('/[^a-z0-9\.\-\_]/i', '', $table); |
| 1052 | 1052 | |
| 1053 | 1053 | $sql = "DROP TABLE " . $tmptable; |
@@ -1059,7 +1059,7 @@ discard block |
||
| 1059 | 1059 | } |
| 1060 | 1060 | } |
| 1061 | 1061 | |
| 1062 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1062 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1063 | 1063 | /** |
| 1064 | 1064 | * Return a pointer of line with description of a table or field |
| 1065 | 1065 | * |
@@ -1069,7 +1069,7 @@ discard block |
||
| 1069 | 1069 | */ |
| 1070 | 1070 | public function DDLDescTable($table, $field = "") |
| 1071 | 1071 | { |
| 1072 | - // phpcs:enable |
|
| 1072 | + // phpcs:enable |
|
| 1073 | 1073 | $sql = "DESC " . $table . " " . $field; |
| 1074 | 1074 | |
| 1075 | 1075 | dol_syslog(get_class($this) . "::DDLDescTable " . $sql, LOG_DEBUG); |
@@ -1077,7 +1077,7 @@ discard block |
||
| 1077 | 1077 | return $this->_results; |
| 1078 | 1078 | } |
| 1079 | 1079 | |
| 1080 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1080 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1081 | 1081 | /** |
| 1082 | 1082 | * Create a new field into table |
| 1083 | 1083 | * |
@@ -1089,7 +1089,7 @@ discard block |
||
| 1089 | 1089 | */ |
| 1090 | 1090 | public function DDLAddField($table, $field_name, $field_desc, $field_position = "") |
| 1091 | 1091 | { |
| 1092 | - // phpcs:enable |
|
| 1092 | + // phpcs:enable |
|
| 1093 | 1093 | // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra |
| 1094 | 1094 | // ex. : $field_desc = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment'); |
| 1095 | 1095 | $sql = "ALTER TABLE " . $table . " ADD " . $field_name . " "; |
@@ -1124,7 +1124,7 @@ discard block |
||
| 1124 | 1124 | return 1; |
| 1125 | 1125 | } |
| 1126 | 1126 | |
| 1127 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1127 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1128 | 1128 | /** |
| 1129 | 1129 | * Update format of a field into a table |
| 1130 | 1130 | * |
@@ -1135,7 +1135,7 @@ discard block |
||
| 1135 | 1135 | */ |
| 1136 | 1136 | public function DDLUpdateField($table, $field_name, $field_desc) |
| 1137 | 1137 | { |
| 1138 | - // phpcs:enable |
|
| 1138 | + // phpcs:enable |
|
| 1139 | 1139 | $sql = "ALTER TABLE " . $table; |
| 1140 | 1140 | $sql .= " MODIFY COLUMN " . $field_name . " " . $field_desc['type']; |
| 1141 | 1141 | if ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') { |
@@ -1149,7 +1149,7 @@ discard block |
||
| 1149 | 1149 | return 1; |
| 1150 | 1150 | } |
| 1151 | 1151 | |
| 1152 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1152 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1153 | 1153 | /** |
| 1154 | 1154 | * Drop a field from table |
| 1155 | 1155 | * |
@@ -1159,7 +1159,7 @@ discard block |
||
| 1159 | 1159 | */ |
| 1160 | 1160 | public function DDLDropField($table, $field_name) |
| 1161 | 1161 | { |
| 1162 | - // phpcs:enable |
|
| 1162 | + // phpcs:enable |
|
| 1163 | 1163 | $tmp_field_name = preg_replace('/[^a-z0-9\.\-\_]/i', '', $field_name); |
| 1164 | 1164 | |
| 1165 | 1165 | $sql = "ALTER TABLE " . $table . " DROP COLUMN `" . $tmp_field_name . "`"; |
@@ -1171,7 +1171,7 @@ discard block |
||
| 1171 | 1171 | } |
| 1172 | 1172 | |
| 1173 | 1173 | |
| 1174 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1174 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1175 | 1175 | /** |
| 1176 | 1176 | * Create a user and privileges to connect to database (even if database does not exists yet) |
| 1177 | 1177 | * |
@@ -1183,7 +1183,7 @@ discard block |
||
| 1183 | 1183 | */ |
| 1184 | 1184 | public function DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name) |
| 1185 | 1185 | { |
| 1186 | - // phpcs:enable |
|
| 1186 | + // phpcs:enable |
|
| 1187 | 1187 | $sql = "INSERT INTO user "; |
| 1188 | 1188 | $sql .= "(Host,User,password,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Index_Priv,Alter_priv,Lock_tables_priv)"; |
| 1189 | 1189 | $sql .= " VALUES ('" . $this->escape($dolibarr_main_db_host) . "','" . $this->escape($dolibarr_main_db_user) . "',password('" . addslashes($dolibarr_main_db_pass) . "')"; |
@@ -1398,7 +1398,7 @@ discard block |
||
| 1398 | 1398 | } |
| 1399 | 1399 | } |
| 1400 | 1400 | |
| 1401 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1401 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1402 | 1402 | /** |
| 1403 | 1403 | * calc_daynr |
| 1404 | 1404 | * |
@@ -1409,7 +1409,7 @@ discard block |
||
| 1409 | 1409 | */ |
| 1410 | 1410 | private static function calc_daynr($year, $month, $day) |
| 1411 | 1411 | { |
| 1412 | - // phpcs:enable |
|
| 1412 | + // phpcs:enable |
|
| 1413 | 1413 | $y = $year; |
| 1414 | 1414 | if ($y == 0 && $month == 0) { |
| 1415 | 1415 | return 0; |
@@ -1424,7 +1424,7 @@ discard block |
||
| 1424 | 1424 | return (int) ($num + floor($y / 4) - $temp); |
| 1425 | 1425 | } |
| 1426 | 1426 | |
| 1427 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1427 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1428 | 1428 | /** |
| 1429 | 1429 | * calc_weekday |
| 1430 | 1430 | * |
@@ -1434,12 +1434,12 @@ discard block |
||
| 1434 | 1434 | */ |
| 1435 | 1435 | private static function calc_weekday($daynr, $sunday_first_day_of_week) |
| 1436 | 1436 | { |
| 1437 | - // phpcs:enable |
|
| 1437 | + // phpcs:enable |
|
| 1438 | 1438 | $ret = (int) floor(($daynr + 5 + ($sunday_first_day_of_week ? 1 : 0)) % 7); |
| 1439 | 1439 | return $ret; |
| 1440 | 1440 | } |
| 1441 | 1441 | |
| 1442 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1442 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1443 | 1443 | /** |
| 1444 | 1444 | * calc_days_in_year |
| 1445 | 1445 | * |
@@ -1448,11 +1448,11 @@ discard block |
||
| 1448 | 1448 | */ |
| 1449 | 1449 | private static function calc_days_in_year($year) |
| 1450 | 1450 | { |
| 1451 | - // phpcs:enable |
|
| 1451 | + // phpcs:enable |
|
| 1452 | 1452 | return (($year & 3) == 0 && ($year % 100 || ($year % 400 == 0 && $year)) ? 366 : 365); |
| 1453 | 1453 | } |
| 1454 | 1454 | |
| 1455 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1455 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1456 | 1456 | /** |
| 1457 | 1457 | * calc_week |
| 1458 | 1458 | * |
@@ -1465,7 +1465,7 @@ discard block |
||
| 1465 | 1465 | */ |
| 1466 | 1466 | private static function calc_week($year, $month, $day, $week_behaviour, &$calc_year) |
| 1467 | 1467 | { |
| 1468 | - // phpcs:enable |
|
| 1468 | + // phpcs:enable |
|
| 1469 | 1469 | $daynr = self::calc_daynr($year, $month, $day); |
| 1470 | 1470 | $first_daynr = self::calc_daynr($year, 1, 1); |
| 1471 | 1471 | $monday_first = ($week_behaviour & self::WEEK_MONDAY_FIRST) ? 1 : 0; |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | require '../../main.inc.php'; |
| 36 | 36 | |
| 37 | 37 | $id = GETPOSTINT('id'); |
| 38 | -$action = GETPOST('action', 'aZ09'); // 'getSellerVATRates' or 'getBuyerVATRates' |
|
| 38 | +$action = GETPOST('action', 'aZ09'); // 'getSellerVATRates' or 'getBuyerVATRates' |
|
| 39 | 39 | $htmlname = GETPOST('htmlname', 'alpha'); |
| 40 | 40 | $selected = (GETPOST('selected') ? GETPOST('selected') : '-1'); |
| 41 | 41 | $productid = (GETPOSTINT('productid') ? GETPOSTINT('productid') : 0); |
@@ -2045,23 +2045,23 @@ |
||
| 2045 | 2045 | //print extension_loaded('soap'); |
| 2046 | 2046 | if ($proxyuse) { |
| 2047 | 2047 | $params = array('connection_timeout' => $timeout, |
| 2048 | - 'response_timeout' => $response_timeout, |
|
| 2049 | - 'proxy_use' => 1, |
|
| 2050 | - 'proxy_host' => $proxyhost, |
|
| 2051 | - 'proxy_port' => $proxyport, |
|
| 2052 | - 'proxy_login' => $proxyuser, |
|
| 2053 | - 'proxy_password' => $proxypass, |
|
| 2054 | - 'trace' => 1 |
|
| 2048 | + 'response_timeout' => $response_timeout, |
|
| 2049 | + 'proxy_use' => 1, |
|
| 2050 | + 'proxy_host' => $proxyhost, |
|
| 2051 | + 'proxy_port' => $proxyport, |
|
| 2052 | + 'proxy_login' => $proxyuser, |
|
| 2053 | + 'proxy_password' => $proxypass, |
|
| 2054 | + 'trace' => 1 |
|
| 2055 | 2055 | ); |
| 2056 | 2056 | } else { |
| 2057 | 2057 | $params = array('connection_timeout' => $timeout, |
| 2058 | - 'response_timeout' => $response_timeout, |
|
| 2059 | - 'proxy_use' => 0, |
|
| 2060 | - 'proxy_host' => false, |
|
| 2061 | - 'proxy_port' => false, |
|
| 2062 | - 'proxy_login' => false, |
|
| 2063 | - 'proxy_password' => false, |
|
| 2064 | - 'trace' => 1 |
|
| 2058 | + 'response_timeout' => $response_timeout, |
|
| 2059 | + 'proxy_use' => 0, |
|
| 2060 | + 'proxy_host' => false, |
|
| 2061 | + 'proxy_port' => false, |
|
| 2062 | + 'proxy_login' => false, |
|
| 2063 | + 'proxy_password' => false, |
|
| 2064 | + 'trace' => 1 |
|
| 2065 | 2065 | ); |
| 2066 | 2066 | } |
| 2067 | 2067 | return $params; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | } else { |
| 198 | 198 | print ': '; |
| 199 | 199 | } |
| 200 | - if (! empty($object->user_creation) && is_object($object->user_creation)) { // deprecated mode |
|
| 200 | + if (!empty($object->user_creation) && is_object($object->user_creation)) { // deprecated mode |
|
| 201 | 201 | if ($object->user_creation->id) { |
| 202 | 202 | print $object->user_creation->getNomUrl(-1, '', 0, 0, 0); |
| 203 | 203 | } else { |
@@ -2946,7 +2946,7 @@ discard block |
||
| 2946 | 2946 | $string = trim($string); |
| 2947 | 2947 | |
| 2948 | 2948 | // If string does not start and end with parenthesis, we return $string as is. |
| 2949 | - if (! preg_match('/^\(.*\)$/', $string)) { |
|
| 2949 | + if (!preg_match('/^\(.*\)$/', $string)) { |
|
| 2950 | 2950 | return $string; |
| 2951 | 2951 | } |
| 2952 | 2952 | |
@@ -118,13 +118,13 @@ |
||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
| 121 | - * Return array head with list of tabs to view object information |
|
| 122 | - * |
|
| 123 | - * @param BonPrelevement $object Member |
|
| 124 | - * @param int $nbOfInvoices No of invoices |
|
| 125 | - * @param int $nbOfSalaryInvoice No of salary invoices |
|
| 126 | - * @return array head |
|
| 127 | - */ |
|
| 121 | + * Return array head with list of tabs to view object information |
|
| 122 | + * |
|
| 123 | + * @param BonPrelevement $object Member |
|
| 124 | + * @param int $nbOfInvoices No of invoices |
|
| 125 | + * @param int $nbOfSalaryInvoice No of salary invoices |
|
| 126 | + * @return array head |
|
| 127 | + */ |
|
| 128 | 128 | function bon_prelevement_prepare_head(BonPrelevement $object, $nbOfInvoices, $nbOfSalaryInvoice) |
| 129 | 129 | { |
| 130 | 130 | global $langs, $conf; |
@@ -1383,12 +1383,12 @@ |
||
| 1383 | 1383 | } |
| 1384 | 1384 | } |
| 1385 | 1385 | |
| 1386 | - // phpcs:disable |
|
| 1387 | - // Complete the arrays &$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond |
|
| 1388 | - if (empty($objMod->dictionaries) && !empty($objMod->{"dictionnaries"})) { |
|
| 1389 | - $objMod->dictionaries = $objMod->{"dictionnaries"}; // For backward compatibility |
|
| 1390 | - } |
|
| 1391 | - // phpcs:enable |
|
| 1386 | + // phpcs:disable |
|
| 1387 | + // Complete the arrays &$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond |
|
| 1388 | + if (empty($objMod->dictionaries) && !empty($objMod->{"dictionnaries"})) { |
|
| 1389 | + $objMod->dictionaries = $objMod->{"dictionnaries"}; // For backward compatibility |
|
| 1390 | + } |
|
| 1391 | + // phpcs:enable |
|
| 1392 | 1392 | |
| 1393 | 1393 | if (!empty($objMod->dictionaries)) { |
| 1394 | 1394 | //var_dump($objMod->dictionaries['tabname']); |
@@ -545,7 +545,7 @@ |
||
| 545 | 545 | if ($error == 0) { |
| 546 | 546 | $ok = 1; |
| 547 | 547 | } else { |
| 548 | - $ok = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 548 | + $ok = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 549 | 549 | } |
| 550 | 550 | |
| 551 | 551 | return $ok; |
@@ -1387,7 +1387,7 @@ |
||
| 1387 | 1387 | |
| 1388 | 1388 | // build format asciidoc for urls in table |
| 1389 | 1389 | if (!$error) { |
| 1390 | - $asciiDocTable = "[options=\"header\"]\n|===\n|Object | URLs\n"; // phpcs:ignore |
|
| 1390 | + $asciiDocTable = "[options=\"header\"]\n|===\n|Object | URLs\n"; // phpcs:ignore |
|
| 1391 | 1391 | foreach ($groupedUrls as $objectName => $urls) { |
| 1392 | 1392 | $urlsList = implode(" +\n*", $urls); |
| 1393 | 1393 | $asciiDocTable .= "|$objectName | \n*$urlsList +\n"; |
@@ -275,22 +275,22 @@ discard block |
||
| 275 | 275 | // Edit .sql file |
| 276 | 276 | if ($moduletype == 'internal') { |
| 277 | 277 | $pathoffiletoeditsrc = '/../install/mysql/tables/llx_' . strtolower($module) . '_' . strtolower($objectname) . '.sql'; |
| 278 | - if (! dol_is_file($readdir . $pathoffiletoeditsrc)) { |
|
| 278 | + if (!dol_is_file($readdir . $pathoffiletoeditsrc)) { |
|
| 279 | 279 | $pathoffiletoeditsrc = '/../install/mysql/tables/llx_' . strtolower($module) . '_' . strtolower($objectname) . '-' . strtolower($module) . '.sql'; |
| 280 | - if (! dol_is_file($readdir . $pathoffiletoeditsrc)) { |
|
| 280 | + if (!dol_is_file($readdir . $pathoffiletoeditsrc)) { |
|
| 281 | 281 | $pathoffiletoeditsrc = '/../install/mysql/tables/llx_' . strtolower($module) . '-' . strtolower($module) . '.sql'; |
| 282 | - if (! dol_is_file($readdir . $pathoffiletoeditsrc)) { |
|
| 282 | + if (!dol_is_file($readdir . $pathoffiletoeditsrc)) { |
|
| 283 | 283 | $pathoffiletoeditsrc = '/../install/mysql/tables/llx_' . strtolower($module) . '.sql'; |
| 284 | 284 | } |
| 285 | 285 | } |
| 286 | 286 | } |
| 287 | 287 | } else { |
| 288 | 288 | $pathoffiletoeditsrc = '/sql/llx_' . strtolower($module) . '_' . strtolower($objectname) . '.sql'; |
| 289 | - if (! dol_is_file($readdir . $pathoffiletoeditsrc)) { |
|
| 289 | + if (!dol_is_file($readdir . $pathoffiletoeditsrc)) { |
|
| 290 | 290 | $pathoffiletoeditsrc = '/sql/llx_' . strtolower($module) . '_' . strtolower($objectname) . '-' . strtolower($module) . '.sql'; |
| 291 | - if (! dol_is_file($readdir . $pathoffiletoeditsrc)) { |
|
| 291 | + if (!dol_is_file($readdir . $pathoffiletoeditsrc)) { |
|
| 292 | 292 | $pathoffiletoeditsrc = '/sql/llx_' . strtolower($module) . '-' . strtolower($module) . '.sql'; |
| 293 | - if (! dol_is_file($readdir . $pathoffiletoeditsrc)) { |
|
| 293 | + if (!dol_is_file($readdir . $pathoffiletoeditsrc)) { |
|
| 294 | 294 | $pathoffiletoeditsrc = '/sql/llx_' . strtolower($module) . '.sql'; |
| 295 | 295 | } |
| 296 | 296 | } |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | if (!$error) { |
| 613 | 613 | // prepare permissions array |
| 614 | 614 | $count_perms = count($permissions); |
| 615 | - for ($i = 0;$i < $count_perms;$i++) { |
|
| 615 | + for ($i = 0; $i < $count_perms; $i++) { |
|
| 616 | 616 | $permissions[$i][0] = "\$this->rights[\$r][0] = \$this->numero . sprintf('%02d', \$r + 1)"; |
| 617 | 617 | $permissions[$i][1] = "\$this->rights[\$r][1] = '" . $permissions[$i][1] . "'"; |
| 618 | 618 | $permissions[$i][4] = "\$this->rights[\$r][4] = '" . $permissions[$i][4] . "'"; |
@@ -726,7 +726,7 @@ discard block |
||
| 726 | 726 | { |
| 727 | 727 | |
| 728 | 728 | // stock all properties in array |
| 729 | - $attributesUnique = array('type','label', 'enabled', 'position', 'notnull', 'visible', 'noteditable', 'index', 'default' , 'foreignkey', 'arrayofkeyval', 'alwayseditable','validate', 'searchall','comment', 'isameasure', 'css', 'cssview','csslist', 'help', 'showoncombobox','picto' ); |
|
| 729 | + $attributesUnique = array('type', 'label', 'enabled', 'position', 'notnull', 'visible', 'noteditable', 'index', 'default', 'foreignkey', 'arrayofkeyval', 'alwayseditable', 'validate', 'searchall', 'comment', 'isameasure', 'css', 'cssview', 'csslist', 'help', 'showoncombobox', 'picto'); |
|
| 730 | 730 | |
| 731 | 731 | $start = "public \$fields=array("; |
| 732 | 732 | $end = ");"; |
@@ -892,7 +892,7 @@ discard block |
||
| 892 | 892 | $string = "[options='header',grid=rows,width=60%,caption=Organisation]\n"; |
| 893 | 893 | $string .= "|===\n"; |
| 894 | 894 | // header for table |
| 895 | - $header = array($langs->trans('Objects'),$langs->trans('Permission')); |
|
| 895 | + $header = array($langs->trans('Objects'), $langs->trans('Permission')); |
|
| 896 | 896 | foreach ($header as $h) { |
| 897 | 897 | $string .= "|" . $h; |
| 898 | 898 | } |
@@ -1219,7 +1219,7 @@ discard block |
||
| 1219 | 1219 | * @param bool|int|string $val |
| 1220 | 1220 | * @return string|int |
| 1221 | 1221 | */ |
| 1222 | - function ($val) use ($module) { |
|
| 1222 | + function($val) use ($module) { |
|
| 1223 | 1223 | return is_bool($val) ? "isModEnabled('$module')" : $val; |
| 1224 | 1224 | }, |
| 1225 | 1225 | $value |
@@ -1240,7 +1240,7 @@ discard block |
||
| 1240 | 1240 | * @param string $val |
| 1241 | 1241 | * @return string |
| 1242 | 1242 | */ |
| 1243 | - static function ($val) { |
|
| 1243 | + static function($val) { |
|
| 1244 | 1244 | return "'$val'"; |
| 1245 | 1245 | }, |
| 1246 | 1246 | $value |
@@ -1335,7 +1335,7 @@ discard block |
||
| 1335 | 1335 | $dictionnaires['tabfieldvalue'][] = (array_key_exists('code', $columns) && array_key_exists('label', $columns) ? 'code,label' : ''); |
| 1336 | 1336 | $dictionnaires['tabfieldinsert'][] = (array_key_exists('code', $columns) && array_key_exists('label', $columns) ? 'code,label' : ''); |
| 1337 | 1337 | $dictionnaires['tabrowid'][] = $primaryKey; |
| 1338 | - $dictionnaires['tabcond'][] = isModEnabled('$modulename'); // @phan-suppress-current-line UnknownModuleName |
|
| 1338 | + $dictionnaires['tabcond'][] = isModEnabled('$modulename'); // @phan-suppress-current-line UnknownModuleName |
|
| 1339 | 1339 | $dictionnaires['tabhelp'][] = (array_key_exists('code', $columns) ? array('code' => $langs->trans('CodeTooltipHelp'), 'field2' => 'field2tooltip') : ''); |
| 1340 | 1340 | |
| 1341 | 1341 | // Build the dictionary string |
@@ -1387,7 +1387,7 @@ discard block |
||
| 1387 | 1387 | |
| 1388 | 1388 | // build format asciidoc for urls in table |
| 1389 | 1389 | if (!$error) { |
| 1390 | - $asciiDocTable = "[options=\"header\"]\n|===\n|Object | URLs\n"; // phpcs:ignore |
|
| 1390 | + $asciiDocTable = "[options=\"header\"]\n|===\n|Object | URLs\n"; // phpcs:ignore |
|
| 1391 | 1391 | foreach ($groupedUrls as $objectName => $urls) { |
| 1392 | 1392 | $urlsList = implode(" +\n*", $urls); |
| 1393 | 1393 | $asciiDocTable .= "|$objectName | \n*$urlsList +\n"; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | |
| 63 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 63 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 64 | 64 | /** |
| 65 | 65 | * Show form to upload a new file. |
| 66 | 66 | * |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | public function form_attach_new_file($url, $title = '', $addcancel = 0, $sectionid = 0, $perm = 1, $size = 50, $object = null, $options = '', $useajax = 1, $savingdocmask = '', $linkfiles = 1, $htmlname = 'formuserfile', $accept = '', $sectiondir = '', $usewithoutform = 0, $capture = 0, $disablemulti = 0, $nooutput = 0) |
| 89 | 89 | { |
| 90 | - // phpcs:enable |
|
| 90 | + // phpcs:enable |
|
| 91 | 91 | global $conf, $langs, $hookmanager; |
| 92 | 92 | $hookmanager->initHooks(array('formfile')); |
| 93 | 93 | |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | } |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 281 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 282 | 282 | /** |
| 283 | 283 | * Show the box with list of available documents for object |
| 284 | 284 | * |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | */ |
| 304 | 304 | public function show_documents($modulepart, $modulesubdir, $filedir, $urlsource, $genallowed, $delallowed = 0, $modelselected = '', $allowgenifempty = 1, $forcenomultilang = 0, $iconPDF = 0, $notused = 0, $noform = 0, $param = '', $title = '', $buttonlabel = '', $codelang = '') |
| 305 | 305 | { |
| 306 | - // phpcs:enable |
|
| 306 | + // phpcs:enable |
|
| 307 | 307 | $this->numoffiles = 0; |
| 308 | 308 | print $this->showdocuments($modulepart, $modulesubdir, $filedir, $urlsource, $genallowed, $delallowed, $modelselected, $allowgenifempty, $forcenomultilang, $iconPDF, $notused, $noform, $param, $title, $buttonlabel, $codelang); |
| 309 | 309 | return $this->numoffiles; |
@@ -1158,7 +1158,7 @@ discard block |
||
| 1158 | 1158 | } |
| 1159 | 1159 | |
| 1160 | 1160 | |
| 1161 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1161 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1162 | 1162 | /** |
| 1163 | 1163 | * Show list of documents in $filearray (may be they are all in same directory but may not) |
| 1164 | 1164 | * This also sync database if $upload_dir is defined. |
@@ -1194,7 +1194,7 @@ discard block |
||
| 1194 | 1194 | */ |
| 1195 | 1195 | public function list_of_documents($filearray, $object, $modulepart, $param = '', $forcedownload = 0, $relativepath = '', $permonobject = 1, $useinecm = 0, $textifempty = '', $maxlength = 0, $title = '', $url = '', $showrelpart = 0, $permtoeditline = -1, $upload_dir = '', $sortfield = '', $sortorder = 'ASC', $disablemove = 1, $addfilterfields = 0, $disablecrop = -1, $moreattrondiv = '') |
| 1196 | 1196 | { |
| 1197 | - // phpcs:enable |
|
| 1197 | + // phpcs:enable |
|
| 1198 | 1198 | global $user, $conf, $langs, $hookmanager, $form; |
| 1199 | 1199 | global $sortfield, $sortorder, $maxheightmini; |
| 1200 | 1200 | global $dolibarr_main_url_root; |
@@ -1640,7 +1640,7 @@ discard block |
||
| 1640 | 1640 | } |
| 1641 | 1641 | |
| 1642 | 1642 | |
| 1643 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1643 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1644 | 1644 | /** |
| 1645 | 1645 | * Show list of documents in a directory of ECM module. |
| 1646 | 1646 | * |
@@ -1661,7 +1661,7 @@ discard block |
||
| 1661 | 1661 | */ |
| 1662 | 1662 | public function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload = 0, $relativepath = '', $permissiontodelete = 1, $useinecm = 0, $textifempty = '', $maxlength = 0, $url = '', $addfilterfields = 0) |
| 1663 | 1663 | { |
| 1664 | - // phpcs:enable |
|
| 1664 | + // phpcs:enable |
|
| 1665 | 1665 | global $conf, $langs, $hookmanager, $form; |
| 1666 | 1666 | global $sortfield, $sortorder; |
| 1667 | 1667 | global $search_doc_ref; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $maxphptoshow = $maxfilesizearray['maxphptoshow']; |
| 158 | 158 | $maxphptoshowparam = $maxfilesizearray['maxphptoshowparam']; |
| 159 | 159 | if ($maxmin > 0) { |
| 160 | - $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 160 | + $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 161 | 161 | } |
| 162 | 162 | $out .= '<input class="flat minwidth400 maxwidth200onsmartphone" type="file"'; |
| 163 | 163 | $out .= ((getDolGlobalString('MAIN_DISABLE_MULTIPLE_FILEUPLOAD') || $disablemulti) ? ' name="userfile"' : ' name="userfile[]" multiple'); |
@@ -595,7 +595,7 @@ discard block |
||
| 595 | 595 | } else { |
| 596 | 596 | include_once DOL_DOCUMENT_ROOT . '/core/modules/export/modules_export.php'; |
| 597 | 597 | //$modellist = ModeleExports::liste_modeles($this->db); // liste_modeles() does not exists. We are using listOfAvailableExportFormat() method instead that return a different array format. |
| 598 | - $modellist = array(); // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 598 | + $modellist = array(); // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 599 | 599 | } |
| 600 | 600 | } elseif ($modulepart == 'commande_fournisseur' || $modulepart == 'supplier_order') { |
| 601 | 601 | if (is_array($genallowed)) { |
@@ -715,7 +715,7 @@ discard block |
||
| 715 | 715 | $out .= '<tr class="liste_titre">'; |
| 716 | 716 | $addcolumforpicto = ($delallowed || $printer || $morepicto); |
| 717 | 717 | $colspan = (4 + ($addcolumforpicto ? 1 : 0)); |
| 718 | - $colspanmore = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 718 | + $colspanmore = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 719 | 719 | |
| 720 | 720 | $out .= '<th colspan="' . $colspan . '" class="formdoc liste_titre maxwidthonsmartphone center">'; |
| 721 | 721 | |