Merge pull request #260 from Asturyan/master
Fix "Undefined variable: ex" and add translation to jQplot title on Dashboard
This commit is contained in:
@@ -335,6 +335,7 @@ abstract class AbstractCrudController extends BaseAdminController
|
|||||||
$error_msg = $ex->getMessage();
|
$error_msg = $ex->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (false !== $error_msg) {
|
||||||
$this->setupFormErrorContext(
|
$this->setupFormErrorContext(
|
||||||
$this->getTranslator()->trans("%obj creation", array('%obj' => $this->objectName)),
|
$this->getTranslator()->trans("%obj creation", array('%obj' => $this->objectName)),
|
||||||
$error_msg,
|
$error_msg,
|
||||||
@@ -345,6 +346,7 @@ abstract class AbstractCrudController extends BaseAdminController
|
|||||||
// At this point, the form has error, and should be redisplayed.
|
// At this point, the form has error, and should be redisplayed.
|
||||||
return $this->renderList();
|
return $this->renderList();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a object for modification, and display the edit template.
|
* Load a object for modification, and display the edit template.
|
||||||
@@ -435,6 +437,7 @@ abstract class AbstractCrudController extends BaseAdminController
|
|||||||
$error_msg = $ex->getMessage();*/
|
$error_msg = $ex->getMessage();*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (false !== $error_msg) {
|
||||||
// At this point, the form has errors, and should be redisplayed.
|
// At this point, the form has errors, and should be redisplayed.
|
||||||
$this->setupFormErrorContext(
|
$this->setupFormErrorContext(
|
||||||
$this->getTranslator()->trans("%obj modification", array('%obj' => $this->objectName)),
|
$this->getTranslator()->trans("%obj modification", array('%obj' => $this->objectName)),
|
||||||
@@ -445,6 +448,7 @@ abstract class AbstractCrudController extends BaseAdminController
|
|||||||
|
|
||||||
return $this->renderEditionTemplate();
|
return $this->renderEditionTemplate();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update object position (only for objects whichsupport that)
|
* Update object position (only for objects whichsupport that)
|
||||||
|
|||||||
@@ -222,6 +222,7 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
|
|||||||
$this->getParserContext()->addForm($changeForm);
|
$this->getParserContext()->addForm($changeForm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (false !== $error_msg) {
|
||||||
$this->setupFormErrorContext(
|
$this->setupFormErrorContext(
|
||||||
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
|
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
|
||||||
$error_msg,
|
$error_msg,
|
||||||
@@ -232,4 +233,5 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
|
|||||||
// At this point, the form has errors, and should be redisplayed.
|
// At this point, the form has errors, and should be redisplayed.
|
||||||
return $this->renderEditionTemplate();
|
return $this->renderEditionTemplate();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class HomeController extends BaseAdminController
|
|||||||
|
|
||||||
$data = new \stdClass();
|
$data = new \stdClass();
|
||||||
|
|
||||||
$data->title = "Stats on " . $this->getRequest()->query->get('month', date('m')) . "/" . $this->getRequest()->query->get('year', date('Y'));
|
$data->title = $this->getTranslator()->trans("Stats on %month/%year", array('%month' => $this->getRequest()->query->get('month', date('m')), '%year' => $this->getRequest()->query->get('year', date('Y'))));
|
||||||
|
|
||||||
/* sales */
|
/* sales */
|
||||||
$saleSeries = new \stdClass();
|
$saleSeries = new \stdClass();
|
||||||
|
|||||||
@@ -753,6 +753,7 @@ return array(
|
|||||||
'Sorry, variable ID=%id was not found.' => 'Sorry, variable ID=%id was not found.',
|
'Sorry, variable ID=%id was not found.' => 'Sorry, variable ID=%id was not found.',
|
||||||
'Source IP' => 'Source IP',
|
'Source IP' => 'Source IP',
|
||||||
'Source IP :' => 'Source IP :',
|
'Source IP :' => 'Source IP :',
|
||||||
|
'Stats on %month/%year' => 'Stats on %month/%year',
|
||||||
'Status' => 'Status',
|
'Status' => 'Status',
|
||||||
'Stock' => 'Stock',
|
'Stock' => 'Stock',
|
||||||
'Store' => 'Store',
|
'Store' => 'Store',
|
||||||
|
|||||||
@@ -752,6 +752,7 @@ return array(
|
|||||||
'Sorry, variable ID=%id was not found.' => 'Désolé, la variable ID=%id n\'a pas été trouvé',
|
'Sorry, variable ID=%id was not found.' => 'Désolé, la variable ID=%id n\'a pas été trouvé',
|
||||||
'Source IP' => 'IP source',
|
'Source IP' => 'IP source',
|
||||||
'Source IP :' => 'IP source : ',
|
'Source IP :' => 'IP source : ',
|
||||||
|
'Stats on %month/%year' => 'Statistiques du %month/%year',
|
||||||
'Status' => 'Etat',
|
'Status' => 'Etat',
|
||||||
'Stock' => 'Stock',
|
'Stock' => 'Stock',
|
||||||
'Store' => 'Information boutique',
|
'Store' => 'Information boutique',
|
||||||
|
|||||||
Reference in New Issue
Block a user