mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
update
This commit is contained in:
@@ -37,8 +37,8 @@ class modOpenSurvey extends DolibarrModules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
public function __construct($db)
|
||||
{
|
||||
global $langs, $conf;
|
||||
|
||||
$this->db = $db;
|
||||
@@ -83,7 +83,7 @@ class modOpenSurvey extends DolibarrModules
|
||||
$this->const = array(); // List of parameters
|
||||
|
||||
// Dictionaries
|
||||
$this->dictionaries = array();
|
||||
$this->dictionaries = array();
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array(); // List of boxes
|
||||
@@ -119,73 +119,73 @@ class modOpenSurvey extends DolibarrModules
|
||||
$r++;
|
||||
|
||||
|
||||
// Menus
|
||||
//-------
|
||||
$r = 0;
|
||||
$this->menu[$r] = array(
|
||||
'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left',
|
||||
'titre'=>'Survey',
|
||||
'mainmenu'=>'tools',
|
||||
'leftmenu'=>'opensurvey',
|
||||
'url'=>'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey',
|
||||
'langs'=>'opensurvey',
|
||||
'position'=>200,
|
||||
'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||
'perms'=>'$user->rights->opensurvey->read',
|
||||
'target'=>'',
|
||||
'user'=>0,
|
||||
);
|
||||
$r++;
|
||||
// Menus
|
||||
//-------
|
||||
$r = 0;
|
||||
$this->menu[$r] = array(
|
||||
'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left',
|
||||
'titre'=>'Survey',
|
||||
'mainmenu'=>'tools',
|
||||
'leftmenu'=>'opensurvey',
|
||||
'url'=>'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey',
|
||||
'langs'=>'opensurvey',
|
||||
'position'=>200,
|
||||
'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||
'perms'=>'$user->rights->opensurvey->read',
|
||||
'target'=>'',
|
||||
'user'=>0,
|
||||
);
|
||||
$r++;
|
||||
|
||||
$this->menu[$r] = array(
|
||||
'fk_menu'=>'fk_mainmenu=tools,fk_leftmenu=opensurvey', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left',
|
||||
'titre'=>'NewSurvey',
|
||||
'mainmenu'=>'tools',
|
||||
'leftmenu'=>'opensurvey_new',
|
||||
'url'=>'/opensurvey/wizard/index.php',
|
||||
'langs'=>'opensurvey',
|
||||
'position'=>210,
|
||||
'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||
'perms'=>'$user->rights->opensurvey->write',
|
||||
'target'=>'',
|
||||
'user'=>0,
|
||||
);
|
||||
$r++;
|
||||
$this->menu[$r] = array(
|
||||
'fk_menu'=>'fk_mainmenu=tools,fk_leftmenu=opensurvey', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left',
|
||||
'titre'=>'NewSurvey',
|
||||
'mainmenu'=>'tools',
|
||||
'leftmenu'=>'opensurvey_new',
|
||||
'url'=>'/opensurvey/wizard/index.php',
|
||||
'langs'=>'opensurvey',
|
||||
'position'=>210,
|
||||
'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||
'perms'=>'$user->rights->opensurvey->write',
|
||||
'target'=>'',
|
||||
'user'=>0,
|
||||
);
|
||||
$r++;
|
||||
|
||||
$this->menu[$r] = array(
|
||||
'fk_menu'=>'fk_mainmenu=tools,fk_leftmenu=opensurvey', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left',
|
||||
'titre'=>'List',
|
||||
'mainmenu'=>'tools',
|
||||
'leftmenu'=>'opensurvey_list',
|
||||
'url'=>'/opensurvey/list.php',
|
||||
'langs'=>'opensurvey',
|
||||
'position'=>220,
|
||||
'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||
'perms'=>'$user->rights->opensurvey->read',
|
||||
'target'=>'',
|
||||
'user'=>0,
|
||||
);
|
||||
$r++;
|
||||
}
|
||||
$this->menu[$r] = array(
|
||||
'fk_menu'=>'fk_mainmenu=tools,fk_leftmenu=opensurvey', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left',
|
||||
'titre'=>'List',
|
||||
'mainmenu'=>'tools',
|
||||
'leftmenu'=>'opensurvey_list',
|
||||
'url'=>'/opensurvey/list.php',
|
||||
'langs'=>'opensurvey',
|
||||
'position'=>220,
|
||||
'enabled'=>'$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||
'perms'=>'$user->rights->opensurvey->read',
|
||||
'target'=>'',
|
||||
'user'=>0,
|
||||
);
|
||||
$r++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called when module is enabled.
|
||||
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||
* It also creates data directories
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function init($options = '')
|
||||
{
|
||||
// Permissions
|
||||
$this->remove($options);
|
||||
public function init($options = '')
|
||||
{
|
||||
// Permissions
|
||||
$this->remove($options);
|
||||
|
||||
$sql = array();
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql, $options);
|
||||
}
|
||||
return $this->_init($sql, $options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user