Merge pull request #260 from Asturyan/master

Fix "Undefined variable: ex" and add translation to jQplot title on Dashboard
This commit is contained in:
Manuel Raynaud
2014-03-21 23:11:55 +01:00
5 changed files with 1928 additions and 1920 deletions

View File

@@ -335,15 +335,17 @@ abstract class AbstractCrudController extends BaseAdminController
$error_msg = $ex->getMessage(); $error_msg = $ex->getMessage();
} }
$this->setupFormErrorContext( if (false !== $error_msg) {
$this->getTranslator()->trans("%obj creation", array('%obj' => $this->objectName)), $this->setupFormErrorContext(
$error_msg, $this->getTranslator()->trans("%obj creation", array('%obj' => $this->objectName)),
$creationForm, $error_msg,
$ex $creationForm,
); $ex
);
// 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();
}
} }
/** /**
@@ -435,15 +437,17 @@ abstract class AbstractCrudController extends BaseAdminController
$error_msg = $ex->getMessage();*/ $error_msg = $ex->getMessage();*/
} }
// At this point, the form has errors, and should be redisplayed. if (false !== $error_msg) {
$this->setupFormErrorContext( // At this point, the form has errors, and should be redisplayed.
$this->getTranslator()->trans("%obj modification", array('%obj' => $this->objectName)), $this->setupFormErrorContext(
$error_msg, $this->getTranslator()->trans("%obj modification", array('%obj' => $this->objectName)),
$changeForm, $error_msg,
$ex $changeForm,
); $ex
);
return $this->renderEditionTemplate(); return $this->renderEditionTemplate();
}
} }
/** /**

View File

@@ -221,15 +221,17 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
// Pass it to the parser // Pass it to the parser
$this->getParserContext()->addForm($changeForm); $this->getParserContext()->addForm($changeForm);
} }
$this->setupFormErrorContext( if (false !== $error_msg) {
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)), $this->setupFormErrorContext(
$error_msg, $this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
$updateSeoForm, $error_msg,
$ex $updateSeoForm,
); $ex
);
// At this point, the form has errors, and should be redisplayed.
return $this->renderEditionTemplate(); // At this point, the form has errors, and should be redisplayed.
return $this->renderEditionTemplate();
}
} }
} }

View File

@@ -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();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff