Private GIT

Skip to content
Snippets Groups Projects
Commit 9a5b16cb authored by Maximilien Bersoult's avatar Maximilien Bersoult
Browse files

* Fix size of columns for route in table cfg_wizards

* Fix replace base url in wizards
* Use the objectBaseUrl in ListController if it's defined
parent 0a98c497
No related branches found
No related tags found
No related merge requests found
...@@ -123,8 +123,10 @@ abstract class ListController extends Controller ...@@ -123,8 +123,10 @@ abstract class ListController extends Controller
static::$moduleName = Informations::getModuleFromPath($rc->getFileName()); static::$moduleName = Informations::getModuleFromPath($rc->getFileName());
static::$moduleShortName = Informations::getModuleSlugName(static::$moduleName); static::$moduleShortName = Informations::getModuleSlugName(static::$moduleName);
if ($this->objectBaseUrl === '' || is_null($this->objectBaseUrl)) {
$this->objectBaseUrl = '/' . static::$moduleShortName . '/' . static::$objectName; $this->objectBaseUrl = '/' . static::$moduleShortName . '/' . static::$objectName;
} }
}
/** /**
* List view for object * List view for object
......
...@@ -65,8 +65,6 @@ class Wizard extends Generator ...@@ -65,8 +65,6 @@ class Wizard extends Generator
$di = Di::getDefault(); $di = Di::getDefault();
$dbconn = $di->get('db_centreon'); $dbconn = $di->get('db_centreon');
$route = $this->formRoute; $route = $this->formRoute;
$baseUrl = rtrim($di->get('config')->get('global', 'base_url'), '/');
$route = str_replace($baseUrl, '', $route);
$query = "SELECT f.field_id as field_id, w.name as wizard_name, s.name as step_name, $query = "SELECT f.field_id as field_id, w.name as wizard_name, s.name as step_name,
s.rank as step_rank, sf.mandatory as mandatory, s.rank as step_rank, sf.mandatory as mandatory,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<table name="cfg_forms_wizards" phpName="FormWizard" idMethod="native"> <table name="cfg_forms_wizards" phpName="FormWizard" idMethod="native">
<column name="wizard_id" phpName="WizardId" type="INTEGER" size="10" sqlType="int(10) unsigned" primaryKey="true" autoIncrement="true" required="true"/> <column name="wizard_id" phpName="WizardId" type="INTEGER" size="10" sqlType="int(10) unsigned" primaryKey="true" autoIncrement="true" required="true"/>
<column name="name" phpName="Name" type="VARCHAR" size="45" required="true"/> <column name="name" phpName="Name" type="VARCHAR" size="45" required="true"/>
<column name="route" phpName="Route" type="VARCHAR" size="45" required="true"/> <column name="route" phpName="Route" type="VARCHAR" size="255" required="true"/>
<column name="module_id" phpName="ModuleId" type="INTEGER" size="10" sqlType="int(10) unsigned" primaryKey="true" required="true"/> <column name="module_id" phpName="ModuleId" type="INTEGER" size="10" sqlType="int(10) unsigned" primaryKey="true" required="true"/>
<foreign-key foreignTable="cfg_modules" name="fk_wizard_module_1" onDelete="CASCADE" onUpdate="CASCADE"> <foreign-key foreignTable="cfg_modules" name="fk_wizard_module_1" onDelete="CASCADE" onUpdate="CASCADE">
<reference local="module_id" foreign="id"/> <reference local="module_id" foreign="id"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment