@@ -100,11 +100,11 @@ |
||
100 | 100 | * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. |
101 | 101 | * It also creates data directories |
102 | 102 | * |
103 | - * @param string $options Options when enabling module ('', 'noboxes') |
|
104 | - * @return int 1 if OK, 0 if KO |
|
105 | - */ |
|
106 | - public function init($options = '') |
|
107 | - { |
|
103 | + * @param string $options Options when enabling module ('', 'noboxes') |
|
104 | + * @return int 1 if OK, 0 if KO |
|
105 | + */ |
|
106 | + public function init($options = '') |
|
107 | + { |
|
108 | 108 | global $conf; |
109 | 109 | |
110 | 110 | // Permissions |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | public $length; |
40 | 40 | |
41 | 41 | /** |
42 | - * @var DoliDB Database handler. |
|
43 | - */ |
|
44 | - public $db; |
|
42 | + * @var DoliDB Database handler. |
|
43 | + */ |
|
44 | + public $db; |
|
45 | 45 | |
46 | 46 | public $conf; |
47 | 47 | public $lang; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | /** |
71 | 71 | * Return description of module |
72 | 72 | * |
73 | - * @return string Description of module |
|
73 | + * @return string Description of module |
|
74 | 74 | */ |
75 | 75 | public function getDescription() |
76 | 76 | { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | /** |
82 | 82 | * Return an example of password generated by this module |
83 | 83 | * |
84 | - * @return string Example of password |
|
84 | + * @return string Example of password |
|
85 | 85 | */ |
86 | 86 | public function getExample() |
87 | 87 | { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | /** |
92 | 92 | * Build new password |
93 | 93 | * |
94 | - * @return string Return a new generated password |
|
94 | + * @return string Return a new generated password |
|
95 | 95 | */ |
96 | 96 | public function getNewGeneratedPassword() |
97 | 97 | { |
@@ -123,15 +123,15 @@ discard block |
||
123 | 123 | return $password; |
124 | 124 | } |
125 | 125 | |
126 | - /** |
|
127 | - * Validate a password |
|
128 | - * |
|
129 | - * @param string $password Password to check |
|
130 | - * @return int 0 if KO, >0 if OK |
|
131 | - */ |
|
132 | - public function validatePassword($password) |
|
133 | - { |
|
134 | - if (dol_strlen($password) < $this->length) return 0; |
|
135 | - return 1; |
|
136 | - } |
|
126 | + /** |
|
127 | + * Validate a password |
|
128 | + * |
|
129 | + * @param string $password Password to check |
|
130 | + * @return int 0 if KO, >0 if OK |
|
131 | + */ |
|
132 | + public function validatePassword($password) |
|
133 | + { |
|
134 | + if (dol_strlen($password) < $this->length) return 0; |
|
135 | + return 1; |
|
136 | + } |
|
137 | 137 | } |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | public $length; |
40 | 40 | |
41 | 41 | /** |
42 | - * @var DoliDB Database handler. |
|
43 | - */ |
|
44 | - public $db; |
|
42 | + * @var DoliDB Database handler. |
|
43 | + */ |
|
44 | + public $db; |
|
45 | 45 | |
46 | 46 | public $conf; |
47 | 47 | public $lang; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | /** |
71 | 71 | * Return description of module |
72 | 72 | * |
73 | - * @return string Description of text |
|
73 | + * @return string Description of text |
|
74 | 74 | */ |
75 | 75 | public function getDescription() |
76 | 76 | { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | /** |
82 | 82 | * Return an example of password generated by this module |
83 | 83 | * |
84 | - * @return string Example of password |
|
84 | + * @return string Example of password |
|
85 | 85 | */ |
86 | 86 | public function getExample() |
87 | 87 | { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | /** |
92 | 92 | * Build new password |
93 | 93 | * |
94 | - * @return string Return a new generated password |
|
94 | + * @return string Return a new generated password |
|
95 | 95 | */ |
96 | 96 | public function getNewGeneratedPassword() |
97 | 97 | { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * Validate a password |
103 | 103 | * |
104 | 104 | * @param string $password Password to check |
105 | - * @return int 0 if KO, >0 if OK |
|
105 | + * @return int 0 if KO, >0 if OK |
|
106 | 106 | */ |
107 | 107 | public function validatePassword($password) |
108 | 108 | { |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @param DoliDB $db Database handler |
82 | 82 | */ |
83 | - public function __construct(DoliDB $db) |
|
84 | - { |
|
83 | + public function __construct(DoliDB $db) |
|
84 | + { |
|
85 | 85 | |
86 | 86 | $this->db = $db; |
87 | 87 | |
@@ -134,16 +134,16 @@ discard block |
||
134 | 134 | } |
135 | 135 | } |
136 | 136 | |
137 | - /** |
|
138 | - * Function called when a Dolibarrr business event is done. |
|
139 | - * All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared) |
|
140 | - * |
|
141 | - * @param string $action Event action code |
|
142 | - * @param Object $object Object |
|
143 | - * @param User $user Object user |
|
144 | - * @param Translate $langs Object langs |
|
145 | - * @param conf $conf Object conf |
|
146 | - * @return int <0 if KO, 0 if no triggered ran, >0 if OK |
|
147 | - */ |
|
148 | - public abstract function runTrigger($action, $object, User $user, Translate $langs, Conf $conf); |
|
137 | + /** |
|
138 | + * Function called when a Dolibarrr business event is done. |
|
139 | + * All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared) |
|
140 | + * |
|
141 | + * @param string $action Event action code |
|
142 | + * @param Object $object Object |
|
143 | + * @param User $user Object user |
|
144 | + * @param Translate $langs Object langs |
|
145 | + * @param conf $conf Object conf |
|
146 | + * @return int <0 if KO, 0 if no triggered ran, >0 if OK |
|
147 | + */ |
|
148 | + public abstract function runTrigger($action, $object, User $user, Translate $langs, Conf $conf); |
|
149 | 149 | } |
@@ -146,7 +146,7 @@ |
||
146 | 146 | * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. |
147 | 147 | * It also creates data directories |
148 | 148 | * |
149 | - * @param string $options Options when enabling module ('', 'noboxes') |
|
149 | + * @param string $options Options when enabling module ('', 'noboxes') |
|
150 | 150 | * @return int 1 if OK, 0 if KO |
151 | 151 | */ |
152 | 152 | public function init($options = '') |
@@ -39,9 +39,9 @@ |
||
39 | 39 | |
40 | 40 | if ($mode == 'edit' && $linked_resource['rowid'] == GETPOST('lineid')) |
41 | 41 | { |
42 | - print '<div class="tagtr oddeven">'; |
|
43 | - print '<input type="hidden" name="lineid" value="'.$linked_resource['rowid'].'" />'; |
|
44 | - print '<input type="hidden" name="element" value="'.$element.'" />'; |
|
42 | + print '<div class="tagtr oddeven">'; |
|
43 | + print '<input type="hidden" name="lineid" value="'.$linked_resource['rowid'].'" />'; |
|
44 | + print '<input type="hidden" name="element" value="'.$element.'" />'; |
|
45 | 45 | print '<input type="hidden" name="element_id" value="'.$element_id.'" />'; |
46 | 46 | |
47 | 47 | print '<div class="tagtd">'.$object_resource->getNomUrl(1).'</div>'; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function fetch_row($resultset) |
75 | 75 | { |
76 | - // phpcs:enable |
|
76 | + // phpcs:enable |
|
77 | 77 | return $this->db->fetch_row($resultset); |
78 | 78 | } |
79 | 79 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | public function affected_rows($resultset) |
159 | 159 | { |
160 | - // phpcs:enable |
|
160 | + // phpcs:enable |
|
161 | 161 | return $this->db->affected_rows($resultset); |
162 | 162 | } |
163 | 163 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | */ |
226 | 226 | public function fetch_array($resultset) |
227 | 227 | { |
228 | - // phpcs:enable |
|
228 | + // phpcs:enable |
|
229 | 229 | return $this->db->fetch_array($resultset); |
230 | 230 | } |
231 | 231 | |
@@ -260,8 +260,8 @@ discard block |
||
260 | 260 | */ |
261 | 261 | public function last_insert_id($tab, $fieldid = 'rowid') |
262 | 262 | { |
263 | - // phpcs:enable |
|
264 | - return $this->db->last_insert_id($tab, $fieldid); |
|
263 | + // phpcs:enable |
|
264 | + return $this->db->last_insert_id($tab, $fieldid); |
|
265 | 265 | } |
266 | 266 | |
267 | 267 | /** |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | */ |
411 | 411 | public function num_rows($resultset) |
412 | 412 | { |
413 | - // phpcs:enable |
|
413 | + // phpcs:enable |
|
414 | 414 | return $this->db->num_rows($resultset); |
415 | 415 | } |
416 | 416 | |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | */ |
590 | 590 | public function jdate($string, $gm = false) |
591 | 591 | { |
592 | - // phpcs:enable |
|
592 | + // phpcs:enable |
|
593 | 593 | return $this->db->jdate($string, $gm); |
594 | 594 | } |
595 | 595 | |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | */ |
680 | 680 | public function fetch_object($resultset) |
681 | 681 | { |
682 | - // phpcs:enable |
|
682 | + // phpcs:enable |
|
683 | 683 | return $this->db->fetch_object($resultset); |
684 | 684 | } |
685 | 685 | |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | */ |
693 | 693 | public function select_db($database) |
694 | 694 | { |
695 | - // phpcs:enable |
|
695 | + // phpcs:enable |
|
696 | 696 | return $this->db->select_db($database); |
697 | 697 | } |
698 | 698 | } |
@@ -82,7 +82,7 @@ |
||
82 | 82 | * @deprecated |
83 | 83 | * @see $subprice |
84 | 84 | */ |
85 | - public $price; |
|
85 | + public $price; |
|
86 | 86 | |
87 | 87 | /** |
88 | 88 | * Unit price before taxes |
@@ -158,8 +158,8 @@ |
||
158 | 158 | // Support for html frontend |
159 | 159 | if (empty($conf->global->DAV_DISABLE_BROWSER)) |
160 | 160 | { |
161 | - $browser = new \Sabre\DAV\Browser\Plugin(); |
|
162 | - $server->addPlugin($browser); |
|
161 | + $browser = new \Sabre\DAV\Browser\Plugin(); |
|
162 | + $server->addPlugin($browser); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | // Automatically guess (some) contenttypes, based on extension |