Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing allowedExtensions in MLContent #608

Merged
merged 5 commits into from
Oct 2, 2020
Merged

add missing allowedExtensions in MLContent #608

merged 5 commits into from
Oct 2, 2020

Conversation

mjauvin
Copy link
Contributor

@mjauvin mjauvin commented Oct 2, 2020

@mjauvin mjauvin merged commit a52d08a into rainlab:master Oct 2, 2020
@mjauvin mjauvin deleted the allowed-extensions branch October 2, 2020 15:17
@mjauvin
Copy link
Contributor Author

mjauvin commented Oct 2, 2020

@LukeTowers This has been handled in Plugin.php for a while now.

        /*
         * Handle translated page URLs
         */
        Page::extend(function($page) {
            if (!$page->propertyExists('translatable')) {
                $page->addDynamicProperty('translatable', []);
            }
            $page->translatable = array_merge($page->translatable, ['title', 'description', 'meta_title', 'meta_description']);
            $page->extendClassWith('RainLab\Translate\Behaviors\TranslatablePageUrl');
            $page->extendClassWith('RainLab\Translate\Behaviors\TranslatablePage');
        });

This was causing the test to fail because the Page class had already been extended with the TranslatablePage behavior.

return;
}

if (Schema::hasColumn(self::TABLE_NAME, 'found')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjauvin just as an FYI, I know it doesn't really matter since migration files should probably never be extended, but I would prefer we always use static:: over self:: unless there's a really good reason to use self::. It's a better practice to keep since that will provide the most flexibility for developers looking to extend the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text files in Content section OctoberCMS 1.1
2 participants