Passed
Push — master ( e613a5...a34d33 )
by
unknown
01:38
created
core/modules/modSubtotal.class.php 2 patches
Indentation   +401 added lines, -401 removed lines patch added patch discarded remove patch
@@ -31,185 +31,185 @@  discard block
 block discarded – undo
31 31
 class modSubtotal extends DolibarrModules
32 32
 {
33 33
 
34
-    /**
35
-     * 	Constructor. Define names, constants, directories, boxes, permissions
36
-     *
37
-     * 	@param	DoliDB		$db	Database handler
38
-     */
34
+	/**
35
+	 * 	Constructor. Define names, constants, directories, boxes, permissions
36
+	 *
37
+	 * 	@param	DoliDB		$db	Database handler
38
+	 */
39 39
      
40
-    public function __construct($db)
41
-    {
42
-        global $langs, $conf;
40
+	public function __construct($db)
41
+	{
42
+		global $langs, $conf;
43 43
 
44
-        $this->db = $db;
44
+		$this->db = $db;
45 45
 
46 46
 		$this->editor_name = 'ATM-Consulting';
47
-        // Id for module (must be unique).
48
-        // Use a free id here
49
-        // (See in Home -> System information -> Dolibarr for list of used modules id).
50
-        $this->numero = 104777; // 104000 to 104999 for ATM CONSULTING
51
-        // Key text used to identify module (for permissions, menus, etc...)
52
-        $this->rights_class = 'subtotal';
47
+		// Id for module (must be unique).
48
+		// Use a free id here
49
+		// (See in Home -> System information -> Dolibarr for list of used modules id).
50
+		$this->numero = 104777; // 104000 to 104999 for ATM CONSULTING
51
+		// Key text used to identify module (for permissions, menus, etc...)
52
+		$this->rights_class = 'subtotal';
53 53
 
54
-        // Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
55
-        // It is used to group modules in module setup page
56
-        $this->family = "technic";
57
-        // Module label (no space allowed)
58
-        // used if translation string 'ModuleXXXName' not found
59
-        // (where XXX is value of numeric property 'numero' of module)
60
-        $this->name = preg_replace('/^mod/i', '', get_class($this));
61
-        // Module description
62
-        // used if translation string 'ModuleXXXDesc' not found
63
-        // (where XXX is value of numeric property 'numero' of module)
64
-        $this->description = "Module permettant l'ajout de sous-totaux et sous-totaux intermédiaires et le déplacement d'une ligne aisée de l'un dans l'autre";
65
-        // Possible values for version are: 'development', 'experimental' or version
66
-        $this->version = '3.2.0';
67
-        // Key used in llx_const table to save module status enabled/disabled
68
-        // (where MYMODULE is value of property name of module in uppercase)
69
-        $this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
70
-        // Where to store the module in setup page
71
-        // (0=common,1=interface,2=others,3=very specific)
72
-        $this->special = 2;
73
-        // Name of image file used for this module.
74
-        // If file is in theme/yourtheme/img directory under name object_pictovalue.png
75
-        // use this->picto='pictovalue'
76
-        // If file is in module/img directory under name object_pictovalue.png
77
-        // use this->picto='pictovalue@module'
78
-        $this->picto = 'subtotal@subtotal'; // mypicto@titre
79
-        // Defined all module parts (triggers, login, substitutions, menus, css, etc...)
80
-        // for default path (eg: /titre/core/xxxxx) (0=disable, 1=enable)
81
-        // for specific path of parts (eg: /titre/core/modules/barcode)
82
-        // for specific css file (eg: /titre/css/titre.css.php)
83
-        $this->module_parts = array(
84
-            // Set this to 1 if module has its own trigger directory
85
-            'triggers' => 1,
86
-            // Set this to 1 if module has its own login method directory
87
-            //'login' => 0,
88
-            // Set this to 1 if module has its own substitution function file
89
-            //'substitutions' => 0,
90
-            // Set this to 1 if module has its own menus handler directory
91
-            //'menus' => 0,
92
-            // Set this to 1 if module has its own barcode directory
93
-            //'barcode' => 0,
94
-            // Set this to 1 if module has its own models directory
95
-            'models' => 1,
96
-            // Set this to relative path of css if module has its own css file
97
-            //'css' => '/titre/css/mycss.css.php',
98
-            // Set here all hooks context managed by module
99
-            'hooks' => array(
100
-                'invoicecard'
101
-                ,'invoicesuppliercard'
102
-                ,'propalcard'
103
-                ,'supplier_proposalcard'
104
-                ,'ordercard'
105
-                ,'ordersuppliercard'
106
-                ,'odtgeneration'
107
-                ,'orderstoinvoice'
108
-                ,'admin'
109
-                ,'invoicereccard'
110
-                ,'consumptionthirdparty'
111
-            	,'ordershipmentcard'
112
-            	,'expeditioncard'
54
+		// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
55
+		// It is used to group modules in module setup page
56
+		$this->family = "technic";
57
+		// Module label (no space allowed)
58
+		// used if translation string 'ModuleXXXName' not found
59
+		// (where XXX is value of numeric property 'numero' of module)
60
+		$this->name = preg_replace('/^mod/i', '', get_class($this));
61
+		// Module description
62
+		// used if translation string 'ModuleXXXDesc' not found
63
+		// (where XXX is value of numeric property 'numero' of module)
64
+		$this->description = "Module permettant l'ajout de sous-totaux et sous-totaux intermédiaires et le déplacement d'une ligne aisée de l'un dans l'autre";
65
+		// Possible values for version are: 'development', 'experimental' or version
66
+		$this->version = '3.2.0';
67
+		// Key used in llx_const table to save module status enabled/disabled
68
+		// (where MYMODULE is value of property name of module in uppercase)
69
+		$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
70
+		// Where to store the module in setup page
71
+		// (0=common,1=interface,2=others,3=very specific)
72
+		$this->special = 2;
73
+		// Name of image file used for this module.
74
+		// If file is in theme/yourtheme/img directory under name object_pictovalue.png
75
+		// use this->picto='pictovalue'
76
+		// If file is in module/img directory under name object_pictovalue.png
77
+		// use this->picto='pictovalue@module'
78
+		$this->picto = 'subtotal@subtotal'; // mypicto@titre
79
+		// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
80
+		// for default path (eg: /titre/core/xxxxx) (0=disable, 1=enable)
81
+		// for specific path of parts (eg: /titre/core/modules/barcode)
82
+		// for specific css file (eg: /titre/css/titre.css.php)
83
+		$this->module_parts = array(
84
+			// Set this to 1 if module has its own trigger directory
85
+			'triggers' => 1,
86
+			// Set this to 1 if module has its own login method directory
87
+			//'login' => 0,
88
+			// Set this to 1 if module has its own substitution function file
89
+			//'substitutions' => 0,
90
+			// Set this to 1 if module has its own menus handler directory
91
+			//'menus' => 0,
92
+			// Set this to 1 if module has its own barcode directory
93
+			//'barcode' => 0,
94
+			// Set this to 1 if module has its own models directory
95
+			'models' => 1,
96
+			// Set this to relative path of css if module has its own css file
97
+			//'css' => '/titre/css/mycss.css.php',
98
+			// Set here all hooks context managed by module
99
+			'hooks' => array(
100
+				'invoicecard'
101
+				,'invoicesuppliercard'
102
+				,'propalcard'
103
+				,'supplier_proposalcard'
104
+				,'ordercard'
105
+				,'ordersuppliercard'
106
+				,'odtgeneration'
107
+				,'orderstoinvoice'
108
+				,'admin'
109
+				,'invoicereccard'
110
+				,'consumptionthirdparty'
111
+				,'ordershipmentcard'
112
+				,'expeditioncard'
113 113
 				,'deliverycard'
114
-            )
115
-            // Set here all workflow context managed by module
116
-            //'workflow' => array('order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE'))
117
-        );
114
+			)
115
+			// Set here all workflow context managed by module
116
+			//'workflow' => array('order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE'))
117
+		);
118 118
 
119
-        // Data directories to create when module is enabled.
120
-        // Example: this->dirs = array("/titre/temp");
121
-        $this->dirs = array();
119
+		// Data directories to create when module is enabled.
120
+		// Example: this->dirs = array("/titre/temp");
121
+		$this->dirs = array();
122 122
 
123
-        // Config pages. Put here list of php pages
124
-        // stored into titre/admin directory, used to setup module.
125
-        $this->config_page_url = array("subtotal_setup.php@subtotal");
123
+		// Config pages. Put here list of php pages
124
+		// stored into titre/admin directory, used to setup module.
125
+		$this->config_page_url = array("subtotal_setup.php@subtotal");
126 126
 
127
-        // Dependencies
128
-        // List of modules id that must be enabled if this module is enabled
129
-        $this->depends = array();
127
+		// Dependencies
128
+		// List of modules id that must be enabled if this module is enabled
129
+		$this->depends = array();
130 130
 
131 131
 		$this->conflictwith=array('modMilestone');
132
-        // List of modules id to disable if this one is disabled
133
-        $this->requiredby = array();
134
-        // Minimum version of PHP required by module
135
-        $this->phpmin = array(5, 3);
136
-        // Minimum version of Dolibarr required by module
137
-        $this->need_dolibarr_version = array(3, 2);
138
-        $this->langfiles = array("subtotal@subtotal"); // langfiles@titre
139
-        // Constants
140
-        // List of particular constants to add when module is enabled
141
-        // (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
142
-        // Example:
143
-        $this->const = array(
144
-            	0=>array(
145
-            		'SUBTOTAL_STYLE_TITRES_SI_LIGNES_CACHEES',
146
-            		'chaine',
147
-            		'I',
148
-            		'Définit le style (B : gras, I : Italique, U : Souligné) des sous titres lorsque le détail des lignes et des ensembles est caché',
149
-            		1
150
-            	)
132
+		// List of modules id to disable if this one is disabled
133
+		$this->requiredby = array();
134
+		// Minimum version of PHP required by module
135
+		$this->phpmin = array(5, 3);
136
+		// Minimum version of Dolibarr required by module
137
+		$this->need_dolibarr_version = array(3, 2);
138
+		$this->langfiles = array("subtotal@subtotal"); // langfiles@titre
139
+		// Constants
140
+		// List of particular constants to add when module is enabled
141
+		// (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
142
+		// Example:
143
+		$this->const = array(
144
+				0=>array(
145
+					'SUBTOTAL_STYLE_TITRES_SI_LIGNES_CACHEES',
146
+					'chaine',
147
+					'I',
148
+					'Définit le style (B : gras, I : Italique, U : Souligné) des sous titres lorsque le détail des lignes et des ensembles est caché',
149
+					1
150
+				)
151 151
 				,1=>array('SUBTOTAL_ALLOW_ADD_BLOCK', 'chaine', '1', 'Permet l\'ajout de titres et sous-totaux')
152 152
 				,2=>array('SUBTOTAL_ALLOW_EDIT_BLOCK', 'chaine', '1', 'Permet de modifier titres et sous-totaux')
153 153
 				,3=>array('SUBTOTAL_ALLOW_REMOVE_BLOCK', 'chaine', '1', 'Permet de supprimer les titres et sous-totaux')
154 154
 				,4=>array('SUBTOTAL_TITLE_STYLE', 'chaine', 'BU')
155 155
 				,5=>array('SUBTOTAL_SUBTOTAL_STYLE', 'chaine', 'B')
156
-            //	1=>array(
157
-            //		'MYMODULE_MYNEWCONST2',
158
-            //		'chaine',
159
-            //		'myvalue',
160
-            //		'This is another constant to add',
161
-            //		0
162
-            //	)
163
-        );
156
+			//	1=>array(
157
+			//		'MYMODULE_MYNEWCONST2',
158
+			//		'chaine',
159
+			//		'myvalue',
160
+			//		'This is another constant to add',
161
+			//		0
162
+			//	)
163
+		);
164 164
 		
165 165
 
166 166
 
167 167
 
168
-        // Array to add new pages in new tabs
169
-        // Example:
170
-        $this->tabs = array(
171
-            //	// To add a new tab identified by code tabname1
172
-            //	'objecttype:+tabname1:Title1:langfile@titre:$user->rights->titre->read:/titre/mynewtab1.php?id=__ID__',
173
-            //	// To add another new tab identified by code tabname2
174
-            //	'objecttype:+tabname2:Title2:langfile@titre:$user->rights->othermodule->read:/titre/mynewtab2.php?id=__ID__',
175
-            //	// To remove an existing tab identified by code tabname
176
-            //	'objecttype:-tabname'
177
-        );
178
-        // where objecttype can be
179
-        // 'thirdparty'			to add a tab in third party view
180
-        // 'intervention'		to add a tab in intervention view
181
-        // 'order_supplier'		to add a tab in supplier order view
182
-        // 'invoice_supplier'	to add a tab in supplier invoice view
183
-        // 'invoice'			to add a tab in customer invoice view
184
-        // 'order'				to add a tab in customer order view
185
-        // 'product'			to add a tab in product view
186
-        // 'stock'				to add a tab in stock view
187
-        // 'propal'				to add a tab in propal view
188
-        // 'member'				to add a tab in fundation member view
189
-        // 'contract'			to add a tab in contract view
190
-        // 'user'				to add a tab in user view
191
-        // 'group'				to add a tab in group view
192
-        // 'contact'			to add a tab in contact view
193
-        // 'categories_x'		to add a tab in category view
194
-        // (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
195
-        // Dictionnaries
196
-        if (! isset($conf->subtotal->enabled)) {
197
-            $conf->subtotal=new stdClass();
198
-            $conf->subtotal->enabled = 0;
199
-        }
200
-        $this->dictionaries = array(
168
+		// Array to add new pages in new tabs
169
+		// Example:
170
+		$this->tabs = array(
171
+			//	// To add a new tab identified by code tabname1
172
+			//	'objecttype:+tabname1:Title1:langfile@titre:$user->rights->titre->read:/titre/mynewtab1.php?id=__ID__',
173
+			//	// To add another new tab identified by code tabname2
174
+			//	'objecttype:+tabname2:Title2:langfile@titre:$user->rights->othermodule->read:/titre/mynewtab2.php?id=__ID__',
175
+			//	// To remove an existing tab identified by code tabname
176
+			//	'objecttype:-tabname'
177
+		);
178
+		// where objecttype can be
179
+		// 'thirdparty'			to add a tab in third party view
180
+		// 'intervention'		to add a tab in intervention view
181
+		// 'order_supplier'		to add a tab in supplier order view
182
+		// 'invoice_supplier'	to add a tab in supplier invoice view
183
+		// 'invoice'			to add a tab in customer invoice view
184
+		// 'order'				to add a tab in customer order view
185
+		// 'product'			to add a tab in product view
186
+		// 'stock'				to add a tab in stock view
187
+		// 'propal'				to add a tab in propal view
188
+		// 'member'				to add a tab in fundation member view
189
+		// 'contract'			to add a tab in contract view
190
+		// 'user'				to add a tab in user view
191
+		// 'group'				to add a tab in group view
192
+		// 'contact'			to add a tab in contact view
193
+		// 'categories_x'		to add a tab in category view
194
+		// (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
195
+		// Dictionnaries
196
+		if (! isset($conf->subtotal->enabled)) {
197
+			$conf->subtotal=new stdClass();
198
+			$conf->subtotal->enabled = 0;
199
+		}
200
+		$this->dictionaries = array(
201 201
 			'langs'=>'subtotal@subtotal',
202
-            'tabname'=>array(MAIN_DB_PREFIX.'c_subtotal_free_text'),		// List of tables we want to see into dictonnary editor
203
-            'tablib'=>array($langs->trans('subtotalFreeLineDictionary')),													// Label of tables
204
-            'tabsql'=>array('SELECT f.rowid as rowid, f.label, f.content, f.entity, f.active FROM '.MAIN_DB_PREFIX.'c_subtotal_free_text as f WHERE f.entity='.$conf->entity),	// Request to select fields
205
-            'tabsqlsort'=>array('label ASC'),																					// Sort order
206
-            'tabfield'=>array('label,content'),							// List of fields (result of select to show dictionary)
207
-            'tabfieldvalue'=>array('label,content'),						// List of fields (list of fields to edit a record)
208
-            'tabfieldinsert'=>array('label,content,entity'),					// List of fields (list of fields for insert)
209
-            'tabrowid'=>array('rowid'),											// Name of columns with primary key (try to always name it 'rowid')
210
-            'tabcond'=>array($conf->subtotal->enabled)	
202
+			'tabname'=>array(MAIN_DB_PREFIX.'c_subtotal_free_text'),		// List of tables we want to see into dictonnary editor
203
+			'tablib'=>array($langs->trans('subtotalFreeLineDictionary')),													// Label of tables
204
+			'tabsql'=>array('SELECT f.rowid as rowid, f.label, f.content, f.entity, f.active FROM '.MAIN_DB_PREFIX.'c_subtotal_free_text as f WHERE f.entity='.$conf->entity),	// Request to select fields
205
+			'tabsqlsort'=>array('label ASC'),																					// Sort order
206
+			'tabfield'=>array('label,content'),							// List of fields (result of select to show dictionary)
207
+			'tabfieldvalue'=>array('label,content'),						// List of fields (list of fields to edit a record)
208
+			'tabfieldinsert'=>array('label,content,entity'),					// List of fields (list of fields for insert)
209
+			'tabrowid'=>array('rowid'),											// Name of columns with primary key (try to always name it 'rowid')
210
+			'tabcond'=>array($conf->subtotal->enabled)	
211 211
 		);
212
-        /* Example:
212
+		/* Example:
213 213
           // This is to avoid warnings
214 214
           if (! isset($conf->titre->enabled)) $conf->titre->enabled=0;
215 215
           $this->dictionnaries=array(
@@ -250,223 +250,223 @@  discard block
 block discarded – undo
250 250
           );
251 251
          */
252 252
 
253
-        // Boxes
254
-        // Add here list of php file(s) stored in core/boxes that contains class to show a box.
255
-        $this->boxes = array(); // Boxes list
253
+		// Boxes
254
+		// Add here list of php file(s) stored in core/boxes that contains class to show a box.
255
+		$this->boxes = array(); // Boxes list
256 256
        
257
-        /*
257
+		/*
258 258
           $this->boxes[$r][1] = "myboxb.php";
259 259
           $r++;
260 260
          */
261 261
 
262
-        // Permissions
263
-        $this->rights = array(); // Permission array used by this module
264
-        $r = 0;
262
+		// Permissions
263
+		$this->rights = array(); // Permission array used by this module
264
+		$r = 0;
265 265
 
266
-        // Add here list of permission defined by
267
-        // an id, a label, a boolean and two constant strings.
268
-        // Example:
269
-        //// Permission id (must not be already used)
270
-        //$this->rights[$r][0] = 2000;
271
-        //// Permission label
272
-        //$this->rights[$r][1] = 'Permision label';
273
-        //// Permission by default for new user (0/1)
274
-        //$this->rights[$r][3] = 1;
275
-        //// In php code, permission will be checked by test
276
-        //// if ($user->rights->permkey->level1->level2)
277
-        //$this->rights[$r][4] = 'level1';
278
-        //// In php code, permission will be checked by test
279
-        //// if ($user->rights->permkey->level1->level2)
280
-        //$this->rights[$r][5] = 'level2';
281
-        //$r++;
282
-        // Main menu entries
283
-        $this->menus = array(); // List of menus to add
284
-        $r = 0;
266
+		// Add here list of permission defined by
267
+		// an id, a label, a boolean and two constant strings.
268
+		// Example:
269
+		//// Permission id (must not be already used)
270
+		//$this->rights[$r][0] = 2000;
271
+		//// Permission label
272
+		//$this->rights[$r][1] = 'Permision label';
273
+		//// Permission by default for new user (0/1)
274
+		//$this->rights[$r][3] = 1;
275
+		//// In php code, permission will be checked by test
276
+		//// if ($user->rights->permkey->level1->level2)
277
+		//$this->rights[$r][4] = 'level1';
278
+		//// In php code, permission will be checked by test
279
+		//// if ($user->rights->permkey->level1->level2)
280
+		//$this->rights[$r][5] = 'level2';
281
+		//$r++;
282
+		// Main menu entries
283
+		$this->menus = array(); // List of menus to add
284
+		$r = 0;
285 285
 
286
-        // Add here entries to declare new menus
287
-        //
288
-        // Example to declare a new Top Menu entry and its Left menu entry:
289
-        //$this->menu[$r]=array(
290
-        //	// Put 0 if this is a top menu
291
-        //	'fk_menu'=>0,
292
-        //	// This is a Top menu entry
293
-        //	'type'=>'top',
294
-        //	'titre'=>'titre top menu',
295
-        //	'mainmenu'=>'titre',
296
-        //	'leftmenu'=>'titre',
297
-        //	'url'=>'/titre/pagetop.php',
298
-        //	// Lang file to use (without .lang) by module.
299
-        //	// File must be in langs/code_CODE/ directory.
300
-        //	'langs'=>'mylangfile',
301
-        //	'position'=>100,
302
-        //	// Define condition to show or hide menu entry.
303
-        //	// Use '$conf->titre->enabled' if entry must be visible if module is enabled.
304
-        //	'enabled'=>'$conf->titre->enabled',
305
-        //	// Use 'perms'=>'$user->rights->titre->level1->level2'
306
-        //	// if you want your menu with a permission rules
307
-        //	'perms'=>'1',
308
-        //	'target'=>'',
309
-        //	// 0=Menu for internal users, 1=external users, 2=both
310
-        //	'user'=>2
311
-        //);
312
-        //$r++;
313
-        //$this->menu[$r]=array(
314
-        //	// Use r=value where r is index key used for the parent menu entry
315
-        //	// (higher parent must be a top menu entry)
316
-        //	'fk_menu'=>'r=0',
317
-        //	// This is a Left menu entry
318
-        //	'type'=>'left',
319
-        //	'titre'=>'titre left menu',
320
-        //	'mainmenu'=>'titre',
321
-        //	'leftmenu'=>'titre',
322
-        //	'url'=>'/titre/pagelevel1.php',
323
-        //	// Lang file to use (without .lang) by module.
324
-        //	// File must be in langs/code_CODE/ directory.
325
-        //	'langs'=>'mylangfile',
326
-        //	'position'=>100,
327
-        //	// Define condition to show or hide menu entry.
328
-        //	// Use '$conf->titre->enabled' if entry must be visible if module is enabled.
329
-        //	'enabled'=>'$conf->titre->enabled',
330
-        //	// Use 'perms'=>'$user->rights->titre->level1->level2'
331
-        //	// if you want your menu with a permission rules
332
-        //	'perms'=>'1',
333
-        //	'target'=>'',
334
-        //	// 0=Menu for internal users, 1=external users, 2=both
335
-        //	'user'=>2
336
-        //);
337
-        //$r++;
338
-        //
339
-        // Example to declare a Left Menu entry into an existing Top menu entry:
340
-        //$this->menu[$r]=array(
341
-        //	// Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy'
342
-        //	'fk_menu'=>'fk_mainmenu=mainmenucode',
343
-        //	// This is a Left menu entry
344
-        //	'type'=>'left',
345
-        //	'titre'=>'titre left menu',
346
-        //	'mainmenu'=>'mainmenucode',
347
-        //	'leftmenu'=>'titre',
348
-        //	'url'=>'/titre/pagelevel2.php',
349
-        //	// Lang file to use (without .lang) by module.
350
-        //	// File must be in langs/code_CODE/ directory.
351
-        //	'langs'=>'mylangfile',
352
-        //	'position'=>100,
353
-        //	// Define condition to show or hide menu entry.
354
-        //	// Use '$conf->titre->enabled' if entry must be visible if module is enabled.
355
-        //	// Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
356
-        //	'enabled'=>'$conf->titre->enabled',
357
-        //	// Use 'perms'=>'$user->rights->titre->level1->level2'
358
-        //	// if you want your menu with a permission rules
359
-        //	'perms'=>'1',
360
-        //	'target'=>'',
361
-        //	// 0=Menu for internal users, 1=external users, 2=both
362
-        //	'user'=>2
363
-        //);
364
-        //$r++;
365
-        // Exports
366
-        $r = 1;
286
+		// Add here entries to declare new menus
287
+		//
288
+		// Example to declare a new Top Menu entry and its Left menu entry:
289
+		//$this->menu[$r]=array(
290
+		//	// Put 0 if this is a top menu
291
+		//	'fk_menu'=>0,
292
+		//	// This is a Top menu entry
293
+		//	'type'=>'top',
294
+		//	'titre'=>'titre top menu',
295
+		//	'mainmenu'=>'titre',
296
+		//	'leftmenu'=>'titre',
297
+		//	'url'=>'/titre/pagetop.php',
298
+		//	// Lang file to use (without .lang) by module.
299
+		//	// File must be in langs/code_CODE/ directory.
300
+		//	'langs'=>'mylangfile',
301
+		//	'position'=>100,
302
+		//	// Define condition to show or hide menu entry.
303
+		//	// Use '$conf->titre->enabled' if entry must be visible if module is enabled.
304
+		//	'enabled'=>'$conf->titre->enabled',
305
+		//	// Use 'perms'=>'$user->rights->titre->level1->level2'
306
+		//	// if you want your menu with a permission rules
307
+		//	'perms'=>'1',
308
+		//	'target'=>'',
309
+		//	// 0=Menu for internal users, 1=external users, 2=both
310
+		//	'user'=>2
311
+		//);
312
+		//$r++;
313
+		//$this->menu[$r]=array(
314
+		//	// Use r=value where r is index key used for the parent menu entry
315
+		//	// (higher parent must be a top menu entry)
316
+		//	'fk_menu'=>'r=0',
317
+		//	// This is a Left menu entry
318
+		//	'type'=>'left',
319
+		//	'titre'=>'titre left menu',
320
+		//	'mainmenu'=>'titre',
321
+		//	'leftmenu'=>'titre',
322
+		//	'url'=>'/titre/pagelevel1.php',
323
+		//	// Lang file to use (without .lang) by module.
324
+		//	// File must be in langs/code_CODE/ directory.
325
+		//	'langs'=>'mylangfile',
326
+		//	'position'=>100,
327
+		//	// Define condition to show or hide menu entry.
328
+		//	// Use '$conf->titre->enabled' if entry must be visible if module is enabled.
329
+		//	'enabled'=>'$conf->titre->enabled',
330
+		//	// Use 'perms'=>'$user->rights->titre->level1->level2'
331
+		//	// if you want your menu with a permission rules
332
+		//	'perms'=>'1',
333
+		//	'target'=>'',
334
+		//	// 0=Menu for internal users, 1=external users, 2=both
335
+		//	'user'=>2
336
+		//);
337
+		//$r++;
338
+		//
339
+		// Example to declare a Left Menu entry into an existing Top menu entry:
340
+		//$this->menu[$r]=array(
341
+		//	// Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy'
342
+		//	'fk_menu'=>'fk_mainmenu=mainmenucode',
343
+		//	// This is a Left menu entry
344
+		//	'type'=>'left',
345
+		//	'titre'=>'titre left menu',
346
+		//	'mainmenu'=>'mainmenucode',
347
+		//	'leftmenu'=>'titre',
348
+		//	'url'=>'/titre/pagelevel2.php',
349
+		//	// Lang file to use (without .lang) by module.
350
+		//	// File must be in langs/code_CODE/ directory.
351
+		//	'langs'=>'mylangfile',
352
+		//	'position'=>100,
353
+		//	// Define condition to show or hide menu entry.
354
+		//	// Use '$conf->titre->enabled' if entry must be visible if module is enabled.
355
+		//	// Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
356
+		//	'enabled'=>'$conf->titre->enabled',
357
+		//	// Use 'perms'=>'$user->rights->titre->level1->level2'
358
+		//	// if you want your menu with a permission rules
359
+		//	'perms'=>'1',
360
+		//	'target'=>'',
361
+		//	// 0=Menu for internal users, 1=external users, 2=both
362
+		//	'user'=>2
363
+		//);
364
+		//$r++;
365
+		// Exports
366
+		$r = 1;
367 367
 
368
-        // Example:
369
-        //$this->export_code[$r]=$this->rights_class.'_'.$r;
370
-        //// Translation key (used only if key ExportDataset_xxx_z not found)
371
-        //$this->export_label[$r]='CustomersInvoicesAndInvoiceLines';
372
-        //// Condition to show export in list (ie: '$user->id==3').
373
-        //// Set to 1 to always show when module is enabled.
374
-        //$this->export_enabled[$r]='1';
375
-        //$this->export_permission[$r]=array(array("facture","facture","export"));
376
-        //$this->export_fields_array[$r]=array(
377
-        //	's.rowid'=>"IdCompany",
378
-        //	's.nom'=>'CompanyName',
379
-        //	's.address'=>'Address',
380
-        //	's.cp'=>'Zip',
381
-        //	's.ville'=>'Town',
382
-        //	's.fk_pays'=>'Country',
383
-        //	's.tel'=>'Phone',
384
-        //	's.siren'=>'ProfId1',
385
-        //	's.siret'=>'ProfId2',
386
-        //	's.ape'=>'ProfId3',
387
-        //	's.idprof4'=>'ProfId4',
388
-        //	's.code_compta'=>'CustomerAccountancyCode',
389
-        //	's.code_compta_fournisseur'=>'SupplierAccountancyCode',
390
-        //	'f.rowid'=>"InvoiceId",
391
-        //	'f.facnumber'=>"InvoiceRef",
392
-        //	'f.datec'=>"InvoiceDateCreation",
393
-        //	'f.datef'=>"DateInvoice",
394
-        //	'f.total'=>"TotalHT",
395
-        //	'f.total_ttc'=>"TotalTTC",
396
-        //	'f.tva'=>"TotalVAT",
397
-        //	'f.paye'=>"InvoicePaid",
398
-        //	'f.fk_statut'=>'InvoiceStatus',
399
-        //	'f.note'=>"InvoiceNote",
400
-        //	'fd.rowid'=>'LineId',
401
-        //	'fd.description'=>"LineDescription",
402
-        //	'fd.price'=>"LineUnitPrice",
403
-        //	'fd.tva_tx'=>"LineVATRate",
404
-        //	'fd.qty'=>"LineQty",
405
-        //	'fd.total_ht'=>"LineTotalHT",
406
-        //	'fd.total_tva'=>"LineTotalTVA",
407
-        //	'fd.total_ttc'=>"LineTotalTTC",
408
-        //	'fd.date_start'=>"DateStart",
409
-        //	'fd.date_end'=>"DateEnd",
410
-        //	'fd.fk_product'=>'ProductId',
411
-        //	'p.ref'=>'ProductRef'
412
-        //);
413
-        //$this->export_entities_array[$r]=array('s.rowid'=>"company",
414
-        //	's.nom'=>'company',
415
-        //	's.address'=>'company',
416
-        //	's.cp'=>'company',
417
-        //	's.ville'=>'company',
418
-        //	's.fk_pays'=>'company',
419
-        //	's.tel'=>'company',
420
-        //	's.siren'=>'company',
421
-        //	's.siret'=>'company',
422
-        //	's.ape'=>'company',
423
-        //	's.idprof4'=>'company',
424
-        //	's.code_compta'=>'company',
425
-        //	's.code_compta_fournisseur'=>'company',
426
-        //	'f.rowid'=>"invoice",
427
-        //	'f.facnumber'=>"invoice",
428
-        //	'f.datec'=>"invoice",
429
-        //	'f.datef'=>"invoice",
430
-        //	'f.total'=>"invoice",
431
-        //	'f.total_ttc'=>"invoice",
432
-        //	'f.tva'=>"invoice",
433
-        //	'f.paye'=>"invoice",
434
-        //	'f.fk_statut'=>'invoice',
435
-        //	'f.note'=>"invoice",
436
-        //	'fd.rowid'=>'invoice_line',
437
-        //	'fd.description'=>"invoice_line",
438
-        //	'fd.price'=>"invoice_line",
439
-        //	'fd.total_ht'=>"invoice_line",
440
-        //	'fd.total_tva'=>"invoice_line",
441
-        //	'fd.total_ttc'=>"invoice_line",
442
-        //	'fd.tva_tx'=>"invoice_line",
443
-        //	'fd.qty'=>"invoice_line",
444
-        //	'fd.date_start'=>"invoice_line",
445
-        //	'fd.date_end'=>"invoice_line",
446
-        //	'fd.fk_product'=>'product',
447
-        //	'p.ref'=>'product'
448
-        //);
449
-        //$this->export_sql_start[$r] = 'SELECT DISTINCT ';
450
-        //$this->export_sql_end[$r] = ' FROM (' . MAIN_DB_PREFIX . 'facture as f, '
451
-        //	. MAIN_DB_PREFIX . 'facturedet as fd, ' . MAIN_DB_PREFIX . 'societe as s)';
452
-        //$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX
453
-        //	. 'product as p on (fd.fk_product = p.rowid)';
454
-        //$this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid '
455
-        //	. 'AND f.rowid = fd.fk_facture';
456
-        //$r++;
457
-    }
368
+		// Example:
369
+		//$this->export_code[$r]=$this->rights_class.'_'.$r;
370
+		//// Translation key (used only if key ExportDataset_xxx_z not found)
371
+		//$this->export_label[$r]='CustomersInvoicesAndInvoiceLines';
372
+		//// Condition to show export in list (ie: '$user->id==3').
373
+		//// Set to 1 to always show when module is enabled.
374
+		//$this->export_enabled[$r]='1';
375
+		//$this->export_permission[$r]=array(array("facture","facture","export"));
376
+		//$this->export_fields_array[$r]=array(
377
+		//	's.rowid'=>"IdCompany",
378
+		//	's.nom'=>'CompanyName',
379
+		//	's.address'=>'Address',
380
+		//	's.cp'=>'Zip',
381
+		//	's.ville'=>'Town',
382
+		//	's.fk_pays'=>'Country',
383
+		//	's.tel'=>'Phone',
384
+		//	's.siren'=>'ProfId1',
385
+		//	's.siret'=>'ProfId2',
386
+		//	's.ape'=>'ProfId3',
387
+		//	's.idprof4'=>'ProfId4',
388
+		//	's.code_compta'=>'CustomerAccountancyCode',
389
+		//	's.code_compta_fournisseur'=>'SupplierAccountancyCode',
390
+		//	'f.rowid'=>"InvoiceId",
391
+		//	'f.facnumber'=>"InvoiceRef",
392
+		//	'f.datec'=>"InvoiceDateCreation",
393
+		//	'f.datef'=>"DateInvoice",
394
+		//	'f.total'=>"TotalHT",
395
+		//	'f.total_ttc'=>"TotalTTC",
396
+		//	'f.tva'=>"TotalVAT",
397
+		//	'f.paye'=>"InvoicePaid",
398
+		//	'f.fk_statut'=>'InvoiceStatus',
399
+		//	'f.note'=>"InvoiceNote",
400
+		//	'fd.rowid'=>'LineId',
401
+		//	'fd.description'=>"LineDescription",
402
+		//	'fd.price'=>"LineUnitPrice",
403
+		//	'fd.tva_tx'=>"LineVATRate",
404
+		//	'fd.qty'=>"LineQty",
405
+		//	'fd.total_ht'=>"LineTotalHT",
406
+		//	'fd.total_tva'=>"LineTotalTVA",
407
+		//	'fd.total_ttc'=>"LineTotalTTC",
408
+		//	'fd.date_start'=>"DateStart",
409
+		//	'fd.date_end'=>"DateEnd",
410
+		//	'fd.fk_product'=>'ProductId',
411
+		//	'p.ref'=>'ProductRef'
412
+		//);
413
+		//$this->export_entities_array[$r]=array('s.rowid'=>"company",
414
+		//	's.nom'=>'company',
415
+		//	's.address'=>'company',
416
+		//	's.cp'=>'company',
417
+		//	's.ville'=>'company',
418
+		//	's.fk_pays'=>'company',
419
+		//	's.tel'=>'company',
420
+		//	's.siren'=>'company',
421
+		//	's.siret'=>'company',
422
+		//	's.ape'=>'company',
423
+		//	's.idprof4'=>'company',
424
+		//	's.code_compta'=>'company',
425
+		//	's.code_compta_fournisseur'=>'company',
426
+		//	'f.rowid'=>"invoice",
427
+		//	'f.facnumber'=>"invoice",
428
+		//	'f.datec'=>"invoice",
429
+		//	'f.datef'=>"invoice",
430
+		//	'f.total'=>"invoice",
431
+		//	'f.total_ttc'=>"invoice",
432
+		//	'f.tva'=>"invoice",
433
+		//	'f.paye'=>"invoice",
434
+		//	'f.fk_statut'=>'invoice',
435
+		//	'f.note'=>"invoice",
436
+		//	'fd.rowid'=>'invoice_line',
437
+		//	'fd.description'=>"invoice_line",
438
+		//	'fd.price'=>"invoice_line",
439
+		//	'fd.total_ht'=>"invoice_line",
440
+		//	'fd.total_tva'=>"invoice_line",
441
+		//	'fd.total_ttc'=>"invoice_line",
442
+		//	'fd.tva_tx'=>"invoice_line",
443
+		//	'fd.qty'=>"invoice_line",
444
+		//	'fd.date_start'=>"invoice_line",
445
+		//	'fd.date_end'=>"invoice_line",
446
+		//	'fd.fk_product'=>'product',
447
+		//	'p.ref'=>'product'
448
+		//);
449
+		//$this->export_sql_start[$r] = 'SELECT DISTINCT ';
450
+		//$this->export_sql_end[$r] = ' FROM (' . MAIN_DB_PREFIX . 'facture as f, '
451
+		//	. MAIN_DB_PREFIX . 'facturedet as fd, ' . MAIN_DB_PREFIX . 'societe as s)';
452
+		//$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX
453
+		//	. 'product as p on (fd.fk_product = p.rowid)';
454
+		//$this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid '
455
+		//	. 'AND f.rowid = fd.fk_facture';
456
+		//$r++;
457
+	}
458 458
 
459
-    /**
460
-     * Function called when module is enabled.
461
-     * The init function add constants, boxes, permissions and menus
462
-     * (defined in constructor) into Dolibarr database.
463
-     * It also creates data directories
464
-     *
465
-     * 	@param		string	$options	Options when enabling module ('', 'noboxes')
466
-     * 	@return		int					1 if OK, 0 if KO
467
-     */
468
-    public function init($options = '')
469
-    {
459
+	/**
460
+	 * Function called when module is enabled.
461
+	 * The init function add constants, boxes, permissions and menus
462
+	 * (defined in constructor) into Dolibarr database.
463
+	 * It also creates data directories
464
+	 *
465
+	 * 	@param		string	$options	Options when enabling module ('', 'noboxes')
466
+	 * 	@return		int					1 if OK, 0 if KO
467
+	 */
468
+	public function init($options = '')
469
+	{
470 470
 	  	global $conf, $db;
471 471
 		
472 472
 		
@@ -474,46 +474,46 @@  discard block
 block discarded – undo
474 474
 			exit("Attention, ce module rentre ne conflit avec le module Jalon/Milestones. Merci de le désactiver auparavant.");
475 475
 		}
476 476
       */
477
-	    $sql = array();
477
+		$sql = array();
478 478
 
479
-        $result = $this->loadTables();
480
-        dol_include_once('/core/class/extrafields.class.php');
479
+		$result = $this->loadTables();
480
+		dol_include_once('/core/class/extrafields.class.php');
481 481
 	
482
-        $extra = new ExtraFields($db); // propaldet, commandedet, facturedet
483
-        $TElementType = array('propaldet', 'commandedet', 'facturedet', 'supplier_proposaldet', 'commande_fournisseurdet', 'facture_fourn_det');
484
-        foreach($TElementType as $element_type) {
485
-            $extra->addExtraField('show_total_ht', 'Afficher le Total HT sur le sous-total', 'int', 0, 10, $element_type, 0, 0, '', unserialize('a:1:{s:7:"options";a:1:{s:0:"";N;}}'), 0, '', 0, 1);
486
-            $extra->addExtraField('show_reduc', 'Afficher la réduction sur le sous-total', 'int', 0, 10, $element_type, 0, 0, '', unserialize('a:1:{s:7:"options";a:1:{s:0:"";N;}}'), 0, '', 0, 1);
487
-        }
482
+		$extra = new ExtraFields($db); // propaldet, commandedet, facturedet
483
+		$TElementType = array('propaldet', 'commandedet', 'facturedet', 'supplier_proposaldet', 'commande_fournisseurdet', 'facture_fourn_det');
484
+		foreach($TElementType as $element_type) {
485
+			$extra->addExtraField('show_total_ht', 'Afficher le Total HT sur le sous-total', 'int', 0, 10, $element_type, 0, 0, '', unserialize('a:1:{s:7:"options";a:1:{s:0:"";N;}}'), 0, '', 0, 1);
486
+			$extra->addExtraField('show_reduc', 'Afficher la réduction sur le sous-total', 'int', 0, 10, $element_type, 0, 0, '', unserialize('a:1:{s:7:"options";a:1:{s:0:"";N;}}'), 0, '', 0, 1);
487
+		}
488 488
 		
489
-        return $this->_init($sql, $options);
490
-    }
489
+		return $this->_init($sql, $options);
490
+	}
491 491
 
492
-    /**
493
-     * Function called when module is disabled.
494
-     * Remove from database constants, boxes and permissions from Dolibarr database.
495
-     * Data directories are not deleted
496
-     *
497
-     * 	@param		string	$options	Options when enabling module ('', 'noboxes')
498
-     * 	@return		int					1 if OK, 0 if KO
499
-     */
500
-    public function remove($options = '')
501
-    {
502
-        $sql = array();
492
+	/**
493
+	 * Function called when module is disabled.
494
+	 * Remove from database constants, boxes and permissions from Dolibarr database.
495
+	 * Data directories are not deleted
496
+	 *
497
+	 * 	@param		string	$options	Options when enabling module ('', 'noboxes')
498
+	 * 	@return		int					1 if OK, 0 if KO
499
+	 */
500
+	public function remove($options = '')
501
+	{
502
+		$sql = array();
503 503
 
504
-        return $this->_remove($sql, $options);
505
-    }
504
+		return $this->_remove($sql, $options);
505
+	}
506 506
 
507
-    /**
508
-     * Create tables, keys and data required by module
509
-     * Files llx_table1.sql, llx_table1.key.sql llx_data.sql with create table, create keys
510
-     * and create data commands must be stored in directory /titre/sql/
511
-     * This function is called by this->init
512
-     *
513
-     * 	@return		int		<=0 if KO, >0 if OK
514
-     */
515
-    private function loadTables()
516
-    {
517
-        return $this->_load_tables('/subtotal/sql/');
518
-    }
507
+	/**
508
+	 * Create tables, keys and data required by module
509
+	 * Files llx_table1.sql, llx_table1.key.sql llx_data.sql with create table, create keys
510
+	 * and create data commands must be stored in directory /titre/sql/
511
+	 * This function is called by this->init
512
+	 *
513
+	 * 	@return		int		<=0 if KO, >0 if OK
514
+	 */
515
+	private function loadTables()
516
+	{
517
+		return $this->_load_tables('/subtotal/sql/');
518
+	}
519 519
 }
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  * 	\ingroup	titre
24 24
  * 	\brief		Description and activation file for module titre
25 25
  */
26
-include_once DOL_DOCUMENT_ROOT . "/core/modules/DolibarrModules.class.php";
26
+include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php";
27 27
 
28 28
 /**
29 29
  * Description and activation class for module titre
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $this->version = '3.2.0';
67 67
         // Key used in llx_const table to save module status enabled/disabled
68 68
         // (where MYMODULE is value of property name of module in uppercase)
69
-        $this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
69
+        $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
70 70
         // Where to store the module in setup page
71 71
         // (0=common,1=interface,2=others,3=very specific)
72 72
         $this->special = 2;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         // List of modules id that must be enabled if this module is enabled
129 129
         $this->depends = array();
130 130
 
131
-		$this->conflictwith=array('modMilestone');
131
+		$this->conflictwith = array('modMilestone');
132 132
         // List of modules id to disable if this one is disabled
133 133
         $this->requiredby = array();
134 134
         // Minimum version of PHP required by module
@@ -193,20 +193,20 @@  discard block
 block discarded – undo
193 193
         // 'categories_x'		to add a tab in category view
194 194
         // (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
195 195
         // Dictionnaries
196
-        if (! isset($conf->subtotal->enabled)) {
197
-            $conf->subtotal=new stdClass();
196
+        if (!isset($conf->subtotal->enabled)) {
197
+            $conf->subtotal = new stdClass();
198 198
             $conf->subtotal->enabled = 0;
199 199
         }
200 200
         $this->dictionaries = array(
201 201
 			'langs'=>'subtotal@subtotal',
202
-            'tabname'=>array(MAIN_DB_PREFIX.'c_subtotal_free_text'),		// List of tables we want to see into dictonnary editor
203
-            'tablib'=>array($langs->trans('subtotalFreeLineDictionary')),													// Label of tables
204
-            'tabsql'=>array('SELECT f.rowid as rowid, f.label, f.content, f.entity, f.active FROM '.MAIN_DB_PREFIX.'c_subtotal_free_text as f WHERE f.entity='.$conf->entity),	// Request to select fields
205
-            'tabsqlsort'=>array('label ASC'),																					// Sort order
206
-            'tabfield'=>array('label,content'),							// List of fields (result of select to show dictionary)
207
-            'tabfieldvalue'=>array('label,content'),						// List of fields (list of fields to edit a record)
208
-            'tabfieldinsert'=>array('label,content,entity'),					// List of fields (list of fields for insert)
209
-            'tabrowid'=>array('rowid'),											// Name of columns with primary key (try to always name it 'rowid')
202
+            'tabname'=>array(MAIN_DB_PREFIX.'c_subtotal_free_text'), // List of tables we want to see into dictonnary editor
203
+            'tablib'=>array($langs->trans('subtotalFreeLineDictionary')), // Label of tables
204
+            'tabsql'=>array('SELECT f.rowid as rowid, f.label, f.content, f.entity, f.active FROM '.MAIN_DB_PREFIX.'c_subtotal_free_text as f WHERE f.entity='.$conf->entity), // Request to select fields
205
+            'tabsqlsort'=>array('label ASC'), // Sort order
206
+            'tabfield'=>array('label,content'), // List of fields (result of select to show dictionary)
207
+            'tabfieldvalue'=>array('label,content'), // List of fields (list of fields to edit a record)
208
+            'tabfieldinsert'=>array('label,content,entity'), // List of fields (list of fields for insert)
209
+            'tabrowid'=>array('rowid'), // Name of columns with primary key (try to always name it 'rowid')
210 210
             'tabcond'=>array($conf->subtotal->enabled)	
211 211
 		);
212 212
         /* Example:
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 	
482 482
         $extra = new ExtraFields($db); // propaldet, commandedet, facturedet
483 483
         $TElementType = array('propaldet', 'commandedet', 'facturedet', 'supplier_proposaldet', 'commande_fournisseurdet', 'facture_fourn_det');
484
-        foreach($TElementType as $element_type) {
484
+        foreach ($TElementType as $element_type) {
485 485
             $extra->addExtraField('show_total_ht', 'Afficher le Total HT sur le sous-total', 'int', 0, 10, $element_type, 0, 0, '', unserialize('a:1:{s:7:"options";a:1:{s:0:"";N;}}'), 0, '', 0, 1);
486 486
             $extra->addExtraField('show_reduc', 'Afficher la réduction sur le sous-total', 'int', 0, 10, $element_type, 0, 0, '', unserialize('a:1:{s:7:"options";a:1:{s:0:"";N;}}'), 0, '', 0, 1);
487 487
         }
Please login to merge, or discard this patch.