@@ -29,14 +29,14 @@ |
||
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 | } |
@@ -68,22 +68,22 @@ discard block |
||
68 | 68 | * @param string $url Root URL for the shop |
69 | 69 | * @param string $key Authentification key |
70 | 70 | * @param mixed $debug Debug mode Activated (true) or deactivated (false) |
71 | - */ |
|
72 | - public function __construct($url, $key, $debug = true) |
|
73 | - { |
|
71 | + */ |
|
72 | + public function __construct($url, $key, $debug = true) |
|
73 | + { |
|
74 | 74 | if (!extension_loaded('curl')) |
75 | 75 | throw new PrestaShopWebserviceException('Please activate the PHP extension \'curl\' to allow use of PrestaShop webservice library'); |
76 | 76 | $this->url = $url; |
77 | 77 | $this->key = $key; |
78 | 78 | $this->debug = $debug; |
79 | 79 | $this->version = 'unknown'; |
80 | - } |
|
80 | + } |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * Take the status code and throw an exception if the server didn't return 200 or 201 code |
84 | 84 | * |
85 | 85 | * @param int $status_code Status code of an HTTP return |
86 | - * @return void |
|
86 | + * @return void |
|
87 | 87 | */ |
88 | 88 | protected function checkStatusCode($status_code) |
89 | 89 | { |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | } |
272 | 272 | |
273 | 273 | /** |
274 | - * Retrieve (GET) a resource |
|
274 | + * Retrieve (GET) a resource |
|
275 | 275 | * <p>Unique parameter must take : <br><br> |
276 | 276 | * 'url' => Full URL for a GET request of Webservice (ex: http://mystore.com/api/customers/1/)<br> |
277 | 277 | * OR<br> |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | } |
327 | 327 | |
328 | 328 | /** |
329 | - * Head method (HEAD) a resource |
|
329 | + * Head method (HEAD) a resource |
|
330 | 330 | * |
331 | 331 | * @param array $options Array representing resource for head request. |
332 | 332 | * @return SimpleXMLElement status_code, response |
@@ -24,25 +24,25 @@ |
||
24 | 24 | */ |
25 | 25 | class ProjectStats extends Stats |
26 | 26 | { |
27 | - private $project; |
|
28 | - public $userid; |
|
29 | - public $socid; |
|
30 | - public $year; |
|
31 | - |
|
32 | - /** |
|
33 | - * Constructor |
|
34 | - * |
|
35 | - * @param DoliDB $db Database handler |
|
36 | - */ |
|
37 | - public function __construct($db) |
|
38 | - { |
|
39 | - global $conf, $user; |
|
40 | - |
|
41 | - $this->db = $db; |
|
42 | - |
|
43 | - require_once 'project.class.php'; |
|
44 | - $this->project = new Project($this->db); |
|
45 | - } |
|
27 | + private $project; |
|
28 | + public $userid; |
|
29 | + public $socid; |
|
30 | + public $year; |
|
31 | + |
|
32 | + /** |
|
33 | + * Constructor |
|
34 | + * |
|
35 | + * @param DoliDB $db Database handler |
|
36 | + */ |
|
37 | + public function __construct($db) |
|
38 | + { |
|
39 | + global $conf, $user; |
|
40 | + |
|
41 | + $this->db = $db; |
|
42 | + |
|
43 | + require_once 'project.class.php'; |
|
44 | + $this->project = new Project($this->db); |
|
45 | + } |
|
46 | 46 | |
47 | 47 | |
48 | 48 | /** |
@@ -27,10 +27,10 @@ |
||
27 | 27 | */ |
28 | 28 | class DolException extends Exception |
29 | 29 | { |
30 | - /** |
|
31 | - * Constructor |
|
32 | - */ |
|
33 | - public function __construct() |
|
34 | - { |
|
35 | - } |
|
30 | + /** |
|
31 | + * Constructor |
|
32 | + */ |
|
33 | + public function __construct() |
|
34 | + { |
|
35 | + } |
|
36 | 36 | } |
@@ -38,11 +38,11 @@ discard block |
||
38 | 38 | * |
39 | 39 | * @param DoliDB $db Database handler |
40 | 40 | */ |
41 | - public function __construct($db) |
|
42 | - { |
|
43 | - global $langs, $conf; |
|
41 | + public function __construct($db) |
|
42 | + { |
|
43 | + global $langs, $conf; |
|
44 | 44 | |
45 | - $this->db = $db; |
|
45 | + $this->db = $db; |
|
46 | 46 | |
47 | 47 | // Id for module (must be unique). |
48 | 48 | // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id). |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | |
102 | 102 | // Array to add new pages in new tabs |
103 | 103 | // Example: $this->tabs = array('objecttype:+tabname1:Title1:mylangfile@multicurrency:$user->rights->multicurrency->read:/multicurrency/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1 |
104 | - // 'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@multicurrency:$user->rights->othermodule->read:/multicurrency/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key. |
|
105 | - // 'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname |
|
104 | + // 'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@multicurrency:$user->rights->othermodule->read:/multicurrency/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key. |
|
105 | + // 'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname |
|
106 | 106 | // where objecttype can be |
107 | 107 | // 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) |
108 | 108 | // 'contact' to add a tab in contact view |
@@ -123,16 +123,16 @@ discard block |
||
123 | 123 | // 'stock' to add a tab in stock view |
124 | 124 | // 'thirdparty' to add a tab in third party view |
125 | 125 | // 'user' to add a tab in user view |
126 | - $this->tabs = array(); |
|
127 | - |
|
128 | - // Dictionaries |
|
129 | - if (!isset($conf->multicurrency->enabled)) |
|
130 | - { |
|
131 | - $conf->multicurrency = new stdClass(); |
|
132 | - $conf->multicurrency->enabled = 0; |
|
133 | - } |
|
126 | + $this->tabs = array(); |
|
127 | + |
|
128 | + // Dictionaries |
|
129 | + if (!isset($conf->multicurrency->enabled)) |
|
130 | + { |
|
131 | + $conf->multicurrency = new stdClass(); |
|
132 | + $conf->multicurrency->enabled = 0; |
|
133 | + } |
|
134 | 134 | $this->dictionaries = array(); |
135 | - /* Example: |
|
135 | + /* Example: |
|
136 | 136 | if (! isset($conf->multicurrency->enabled)) $conf->multicurrency->enabled=0; // This is to avoid warnings |
137 | 137 | $this->dictionaries=array( |
138 | 138 | 'langs'=>'mylangfile@multicurrency', |
@@ -149,9 +149,9 @@ discard block |
||
149 | 149 | ); |
150 | 150 | */ |
151 | 151 | |
152 | - // Boxes |
|
152 | + // Boxes |
|
153 | 153 | // Add here list of php file(s) stored in core/boxes that contains class to show a box. |
154 | - $this->boxes = array(); // List of boxes |
|
154 | + $this->boxes = array(); // List of boxes |
|
155 | 155 | // Example: |
156 | 156 | //$this->boxes=array( |
157 | 157 | // 0=>array('file'=>'myboxa.php@multicurrency','note'=>'','enabledbydefaulton'=>'Home'), |
@@ -215,8 +215,8 @@ discard block |
||
215 | 215 | // Example: |
216 | 216 | // $this->export_code[$r]=$this->rights_class.'_'.$r; |
217 | 217 | // $this->export_label[$r]='MyModule'; // Translation key (used only if key ExportDataset_xxx_z not found) |
218 | - // $this->export_enabled[$r]='1'; // Condition to show export in list (ie: '$user->id==3'). Set to 1 to always show when module is enabled. |
|
219 | - // $this->export_icon[$r]='generic:MyModule'; |
|
218 | + // $this->export_enabled[$r]='1'; // Condition to show export in list (ie: '$user->id==3'). Set to 1 to always show when module is enabled. |
|
219 | + // $this->export_icon[$r]='generic:MyModule'; |
|
220 | 220 | // $this->export_permission[$r]=array(array("multicurrency","level1","level2")); |
221 | 221 | // $this->export_fields_array[$r]=array( |
222 | 222 | // 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone', |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. |
260 | 260 | * It also creates data directories |
261 | 261 | * |
262 | - * @param string $options Options when enabling module ('', 'noboxes') |
|
262 | + * @param string $options Options when enabling module ('', 'noboxes') |
|
263 | 263 | * @return int 1 if OK, 0 if KO |
264 | 264 | */ |
265 | 265 | public function init($options = '') |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. |
84 | 84 | * It also creates data directories |
85 | 85 | * |
86 | - * @param string $options Options when enabling module ('', 'noboxes') |
|
86 | + * @param string $options Options when enabling module ('', 'noboxes') |
|
87 | 87 | * @return int 1 if OK, 0 if KO |
88 | 88 | */ |
89 | 89 | public function init($options = '') |
@@ -118,21 +118,21 @@ discard block |
||
118 | 118 | return $this->_init($sql, $options); |
119 | 119 | } |
120 | 120 | |
121 | - /** |
|
121 | + /** |
|
122 | 122 | * Function called when module is disabled. |
123 | 123 | * Remove from database constants, boxes and permissions from Dolibarr database. |
124 | 124 | * Data directories are not deleted |
125 | 125 | * |
126 | - * @param string $options Options when enabling module ('', 'noboxes') |
|
126 | + * @param string $options Options when enabling module ('', 'noboxes') |
|
127 | 127 | * @return int 1 if OK, 0 if KO |
128 | - */ |
|
129 | - public function remove($options = '') |
|
130 | - { |
|
128 | + */ |
|
129 | + public function remove($options = '') |
|
130 | + { |
|
131 | 131 | $sql = array(); |
132 | 132 | |
133 | 133 | // Delete old declarations of RSS box |
134 | 134 | $this->boxes[0]['file'] = "box_external_rss.php"; |
135 | 135 | |
136 | 136 | return $this->_remove($sql, $options); |
137 | - } |
|
137 | + } |
|
138 | 138 | } |
@@ -97,16 +97,16 @@ |
||
97 | 97 | * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. |
98 | 98 | * It also creates data directories |
99 | 99 | * |
100 | - * @param string $options Options when enabling module ('', 'noboxes') |
|
100 | + * @param string $options Options when enabling module ('', 'noboxes') |
|
101 | 101 | * @return int 1 if OK, 0 if KO |
102 | 102 | */ |
103 | - public function init($options = '') |
|
104 | - { |
|
103 | + public function init($options = '') |
|
104 | + { |
|
105 | 105 | // Permissions |
106 | 106 | $this->remove($options); |
107 | 107 | |
108 | 108 | $sql = array(); |
109 | 109 | |
110 | 110 | return $this->_init($sql, $options); |
111 | - } |
|
111 | + } |
|
112 | 112 | } |
@@ -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 = '') |
@@ -31,9 +31,9 @@ |
||
31 | 31 | class pdf_paiement_fourn extends pdf_paiement |
32 | 32 | { |
33 | 33 | /** |
34 | - * Constructor |
|
35 | - * |
|
36 | - * @param DoliDb $db Database handler |
|
34 | + * Constructor |
|
35 | + * |
|
36 | + * @param DoliDb $db Database handler |
|
37 | 37 | */ |
38 | 38 | public function __construct($db) |
39 | 39 | { |