Fixes inconsistency in component partial folder names
This is a breaking change that will require further attention - refs #1854 Eg: myComponent, the default component partial would use lower case folders - /plugins/acme/test/components/mycomponent/default.htm The theme component partial override would use case sensitive folders - /themes/foobar/partials/myComponent/default.htm This is fixed as - /themes/foobar/partials/mycomponent/default.htm Minor code fix to ModelBehavior class
This commit is contained in:
parent
6aa60305a0
commit
87f8f8feb1
|
|
@ -818,7 +818,7 @@ class Controller
|
|||
* Check if the theme has an override
|
||||
*/
|
||||
if (strpos($partialName, '/') === false) {
|
||||
$overrideName = $componentObj->alias . '/' . $partialName;
|
||||
$overrideName = strtolower($componentObj->alias) . '/' . $partialName;
|
||||
$partial = Partial::loadCached($this->theme, $overrideName);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@ class ModelBehavior extends ModelBehaviorBase
|
|||
/*
|
||||
* Validate model properties
|
||||
*/
|
||||
foreach ($this->requiredProperties as $property)
|
||||
{
|
||||
foreach ($this->requiredProperties as $property) {
|
||||
if (!isset($model->{$property})) {
|
||||
throw new ApplicationException(Lang::get('system::lang.behavior.missing_property', [
|
||||
'class' => get_class($model),
|
||||
|
|
|
|||
Loading…
Reference in New Issue