fix incompatible php code

This commit is contained in:
Rodney Figaro 2017-01-10 11:59:14 +01:00
parent fb852e6301
commit f44f955329
2 changed files with 7 additions and 7 deletions

View File

@ -1,9 +1,9 @@
<?php
define('FORM_DIR', __DIR__.'/../templates/form/');
class FormBuilder
{
const FORM_DIR = __DIR__.'/../templates/form/';
private $class_name;
private $table_name;
private $identifier;
@ -59,7 +59,7 @@ class FormBuilder
];
$smarty->assign($smarty_params);
echo $smarty->fetch(self::FORM_DIR.'form_edit.tpl');
echo $smarty->fetch(FORM_DIR.'form_edit.tpl');
}
@ -84,7 +84,7 @@ class FormBuilder
private function prepareTemplatePath(&$field)
{
$field['template'] = self::FORM_DIR.$field['type'].'.tpl';
$field['template'] = FORM_DIR.$field['type'].'.tpl';
}
private function prepareFileInput(&$field)
@ -138,7 +138,7 @@ class FormBuilder
$rows = $field['options_raw'];
$keys = $field['options_map'];
$options = [];
$options = array();
foreach($rows as $row) {
$options_row['value'] = $row[$keys[0]];
$options_row['label'] = $row[$keys[1]];

View File

@ -89,7 +89,7 @@ class GuideCategory extends ObjectModel
if ($exclude_id!='0') {
$sql .= " AND a.`id_guide_category` <> '".intval($exclude_id)."'";
}
$rows = [];
$rows = array();
self::findRecursiveData(
$rows,
$sql,
@ -114,7 +114,7 @@ class GuideCategory extends ObjectModel
if ($exclude_id!='0') {
$sql .= " AND a.`id_category_family` <> '".intval($exclude_id)."'";
}
$rows = [];
$rows = array;
self::findRecursiveData(
$rows,
$sql,