From 28a7f13fa63ced73b87f794b4e0a6cbb882755e0 Mon Sep 17 00:00:00 2001 From: Mirko Pagliai Date: Tue, 19 Jan 2016 12:18:51 +0100 Subject: [PATCH] updated APIs --- API/404.html | 1 + API/annotation-group-todo.html | 1 + ...ms.Controller.Admin.BannersController.html | 14 +- ...ller.Admin.BannersPositionsController.html | 14 +- ...eCms.Controller.Admin.PagesController.html | 24 +- ...ntroller.Admin.PhotosAlbumsController.html | 14 +- ...Cms.Controller.Admin.PhotosController.html | 24 +- ...oller.Admin.PostsCategoriesController.html | 14 +- ...eCms.Controller.Admin.PostsController.html | 14 +- ...eCms.Controller.Admin.UsersController.html | 22 +- ...ontroller.Admin.UsersGroupsController.html | 18 +- ...Cms.Controller.PhotosAlbumsController.html | 4 +- ....Controller.PostsCategoriesController.html | 8 +- ...-MeCms.Controller.PostsTagsController.html | 6 +- ...lass-MeCms.Controller.UsersController.html | 16 +- API/class-MeCms.Error.ExceptionRenderer.html | 11 +- API/class-MeCms.Shell.InstallShell.html | 1 + API/class-MeCms.Shell.UpdateShell.html | 312 ++++++++++++ API/class-MeCms.Shell.UserShell.html | 1 + API/elementlist.js | 2 +- API/index.html | 3 +- API/namespace-MeCms.Controller.Admin.html | 2 +- API/namespace-MeCms.Controller.Component.html | 2 +- API/namespace-MeCms.Controller.html | 2 +- API/namespace-MeCms.Error.html | 2 +- API/namespace-MeCms.Form.html | 2 +- API/namespace-MeCms.Mailer.html | 2 +- API/namespace-MeCms.Model.Behavior.html | 2 +- API/namespace-MeCms.Model.Entity.html | 2 +- API/namespace-MeCms.Model.Table.html | 2 +- API/namespace-MeCms.Model.Validation.html | 2 +- API/namespace-MeCms.Model.html | 2 +- API/namespace-MeCms.Shell.html | 7 +- API/namespace-MeCms.Utility.html | 2 +- API/namespace-MeCms.View.Cell.html | 2 +- API/namespace-MeCms.View.Helper.html | 2 +- API/namespace-MeCms.View.View.html | 2 +- API/namespace-MeCms.View.html | 2 +- API/namespace-MeCms.html | 2 +- ...ms.Controller.Admin.BannersController.html | 71 ++- ...ller.Admin.BannersPositionsController.html | 81 ++-- ...eCms.Controller.Admin.PagesController.html | 207 ++++---- ...ntroller.Admin.PhotosAlbumsController.html | 81 ++-- ...Cms.Controller.Admin.PhotosController.html | 274 ++++++----- ...oller.Admin.PostsCategoriesController.html | 81 ++-- ...eCms.Controller.Admin.PostsController.html | 89 ++-- ....Controller.Admin.PostsTagsController.html | 3 +- ...ms.Controller.Admin.SystemsController.html | 3 +- ...MeCms.Controller.Admin.TagsController.html | 3 +- ...eCms.Controller.Admin.UsersController.html | 218 +++++---- ...ontroller.Admin.UsersGroupsController.html | 142 +++--- ...-class-MeCms.Controller.AppController.html | 3 +- ...ss-MeCms.Controller.BannersController.html | 13 +- ...ms.Controller.Component.AuthComponent.html | 3 +- ...ontroller.Component.KcFinderComponent.html | 3 +- ...ontroller.Component.SecurityComponent.html | 3 +- ...lass-MeCms.Controller.PagesController.html | 5 +- ...Cms.Controller.PhotosAlbumsController.html | 21 +- ...ass-MeCms.Controller.PhotosController.html | 5 +- ....Controller.PostsCategoriesController.html | 135 +++--- ...lass-MeCms.Controller.PostsController.html | 5 +- ...-MeCms.Controller.PostsTagsController.html | 117 ++--- ...ss-MeCms.Controller.SystemsController.html | 3 +- ...lass-MeCms.Controller.UsersController.html | 448 +++++++++--------- ...e-class-MeCms.Error.ExceptionRenderer.html | 98 ++-- API/source-class-MeCms.Form.ContactForm.html | 3 +- API/source-class-MeCms.Mailer.Mailer.html | 3 +- API/source-class-MeCms.Mailer.UserMailer.html | 3 +- ...ass-MeCms.Model.Behavior.TreeBehavior.html | 3 +- ...ource-class-MeCms.Model.Entity.Banner.html | 3 +- ...ss-MeCms.Model.Entity.BannersPosition.html | 3 +- API/source-class-MeCms.Model.Entity.Page.html | 3 +- ...source-class-MeCms.Model.Entity.Photo.html | 3 +- ...-class-MeCms.Model.Entity.PhotosAlbum.html | 3 +- API/source-class-MeCms.Model.Entity.Post.html | 3 +- ...lass-MeCms.Model.Entity.PostsCategory.html | 3 +- ...rce-class-MeCms.Model.Entity.PostsTag.html | 3 +- API/source-class-MeCms.Model.Entity.Tag.html | 3 +- API/source-class-MeCms.Model.Entity.User.html | 3 +- ...e-class-MeCms.Model.Entity.UsersGroup.html | 3 +- ...urce-class-MeCms.Model.Table.AppTable.html | 3 +- ...Cms.Model.Table.BannersPositionsTable.html | 3 +- ...-class-MeCms.Model.Table.BannersTable.html | 3 +- ...ce-class-MeCms.Model.Table.PagesTable.html | 3 +- ...s-MeCms.Model.Table.PhotosAlbumsTable.html | 3 +- ...e-class-MeCms.Model.Table.PhotosTable.html | 3 +- ...eCms.Model.Table.PostsCategoriesTable.html | 3 +- ...ce-class-MeCms.Model.Table.PostsTable.html | 3 +- ...lass-MeCms.Model.Table.PostsTagsTable.html | 3 +- ...rce-class-MeCms.Model.Table.TagsTable.html | 3 +- ...ss-MeCms.Model.Table.UsersGroupsTable.html | 3 +- ...ce-class-MeCms.Model.Table.UsersTable.html | 3 +- ...s-MeCms.Model.Validation.AppValidator.html | 3 +- ...eCms.Model.Validation.BannerValidator.html | 3 +- ...l.Validation.BannersPositionValidator.html | 3 +- ...-MeCms.Model.Validation.PageValidator.html | 3 +- ...MeCms.Model.Validation.PhotoValidator.html | 3 +- ...Model.Validation.PhotosAlbumValidator.html | 3 +- ...-MeCms.Model.Validation.PostValidator.html | 7 +- ...del.Validation.PostsCategoryValidator.html | 3 +- ...s-MeCms.Model.Validation.TagValidator.html | 7 +- ...-MeCms.Model.Validation.UserValidator.html | 3 +- ....Model.Validation.UsersGroupValidator.html | 3 +- ...source-class-MeCms.Shell.InstallShell.html | 3 +- API/source-class-MeCms.Shell.UpdateShell.html | 311 ++++++++++++ API/source-class-MeCms.Shell.UserShell.html | 3 +- ...source-class-MeCms.Utility.BannerFile.html | 3 +- API/source-class-MeCms.Utility.PhotoFile.html | 3 +- ...source-class-MeCms.Utility.StaticPage.html | 3 +- ...ource-class-MeCms.View.Cell.PagesCell.html | 3 +- ...urce-class-MeCms.View.Cell.PhotosCell.html | 3 +- ...ource-class-MeCms.View.Cell.PostsCell.html | 3 +- ...ce-class-MeCms.View.Helper.AuthHelper.html | 3 +- ...s-MeCms.View.Helper.MenuBuilderHelper.html | 3 +- ...s-MeCms.View.Helper.MenuDefaultHelper.html | 7 +- ...ource-class-MeCms.View.View.AdminView.html | 3 +- API/source-class-MeCms.View.View.AppView.html | 3 +- 117 files changed, 1889 insertions(+), 1267 deletions(-) create mode 100644 API/class-MeCms.Shell.UpdateShell.html create mode 100644 API/source-class-MeCms.Shell.UpdateShell.html diff --git a/API/404.html b/API/404.html index ccfe1b74c..4b5c4bfc1 100644 --- a/API/404.html +++ b/API/404.html @@ -190,6 +190,7 @@

Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • diff --git a/API/annotation-group-todo.html b/API/annotation-group-todo.html index e5c21d426..bc20fc53c 100644 --- a/API/annotation-group-todo.html +++ b/API/annotation-group-todo.html @@ -189,6 +189,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • diff --git a/API/class-MeCms.Controller.Admin.BannersController.html b/API/class-MeCms.Controller.Admin.BannersController.html index 6ef5f8070..99282be05 100644 --- a/API/class-MeCms.Controller.Admin.BannersController.html +++ b/API/class-MeCms.Controller.Admin.BannersController.html @@ -220,7 +220,7 @@

    Class BannersController

    Namespace: MeCms\Controller\Admin
    - Located at Controller/Admin/BannersController.php + Located at Controller/Admin/BannersController.php
    @@ -402,7 +402,7 @@

    Uses

    # - edit( string $id = NULL ) + edit( string $id = NULL )

    Edits banner

    @@ -419,10 +419,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    @@ -441,7 +437,7 @@

    Throws

    # - delete( string $id = NULL ) + delete( string $id = NULL )

    Deletes banner

    @@ -458,10 +454,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    diff --git a/API/class-MeCms.Controller.Admin.BannersPositionsController.html b/API/class-MeCms.Controller.Admin.BannersPositionsController.html index f0e21cc0a..6747cda34 100644 --- a/API/class-MeCms.Controller.Admin.BannersPositionsController.html +++ b/API/class-MeCms.Controller.Admin.BannersPositionsController.html @@ -220,7 +220,7 @@

    Class BannersPositionsController

    Namespace: MeCms\Controller\Admin
    - Located at Controller/Admin/BannersPositionsController.php + Located at Controller/Admin/BannersPositionsController.php
    @@ -345,7 +345,7 @@

    Overrides

    # - edit( string $id = NULL ) + edit( string $id = NULL )

    Edits banners position

    @@ -362,10 +362,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    @@ -384,7 +380,7 @@

    Throws

    # - delete( string $id = NULL ) + delete( string $id = NULL )

    Deletes banners position

    @@ -401,10 +397,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    diff --git a/API/class-MeCms.Controller.Admin.PagesController.html b/API/class-MeCms.Controller.Admin.PagesController.html index 26f1ca79e..edb7ed72c 100644 --- a/API/class-MeCms.Controller.Admin.PagesController.html +++ b/API/class-MeCms.Controller.Admin.PagesController.html @@ -220,7 +220,7 @@

    Class PagesController

    Namespace: MeCms\Controller\Admin
    - Located at Controller/Admin/PagesController.php + Located at Controller/Admin/PagesController.php
    @@ -240,7 +240,7 @@

    Class PagesController

    # - beforeRender( Cake\Event\Event $event ) + beforeRender( Cake\Event\Event $event )

    Called after the controller action is run, but before the view is rendered. @@ -288,7 +288,7 @@

    Overrides

    # - isAuthorized( array $user = NULL ) + isAuthorized( array $user = NULL )

    Check if the provided user is authorized for the request

    @@ -334,7 +334,7 @@

    Overrides

    # - index( ) + index( )

    Lists pages

    @@ -404,7 +404,7 @@

    Uses

    # - add( ) + add( )

    Adds page

    @@ -434,7 +434,7 @@

    Uses

    # - edit( string $id = NULL ) + edit( string $id = NULL )

    Edits page

    @@ -451,10 +451,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    @@ -473,7 +469,7 @@

    Throws

    # - delete( string $id = NULL ) + delete( string $id = NULL )

    Deletes page

    @@ -490,10 +486,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    @@ -538,7 +530,7 @@

    Throws

    - $Pages + $Pages
    diff --git a/API/class-MeCms.Controller.Admin.PhotosAlbumsController.html b/API/class-MeCms.Controller.Admin.PhotosAlbumsController.html index 1f970f225..17bb11dd5 100644 --- a/API/class-MeCms.Controller.Admin.PhotosAlbumsController.html +++ b/API/class-MeCms.Controller.Admin.PhotosAlbumsController.html @@ -220,7 +220,7 @@

    Class PhotosAlbumsController

    Namespace: MeCms\Controller\Admin
    - Located at Controller/Admin/PhotosAlbumsController.php + Located at Controller/Admin/PhotosAlbumsController.php
    @@ -391,7 +391,7 @@

    Overrides

    # - edit( string $id = NULL ) + edit( string $id = NULL )

    Edits photos album

    @@ -408,10 +408,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    @@ -430,7 +426,7 @@

    Throws

    # - delete( string $id = NULL ) + delete( string $id = NULL )

    Deletes photos album

    @@ -447,10 +443,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    diff --git a/API/class-MeCms.Controller.Admin.PhotosController.html b/API/class-MeCms.Controller.Admin.PhotosController.html index 26fb09e25..fe6748ace 100644 --- a/API/class-MeCms.Controller.Admin.PhotosController.html +++ b/API/class-MeCms.Controller.Admin.PhotosController.html @@ -220,7 +220,7 @@

    Class PhotosController

    Namespace: MeCms\Controller\Admin
    - Located at Controller/Admin/PhotosController.php + Located at Controller/Admin/PhotosController.php
    @@ -240,7 +240,7 @@

    Class PhotosController

    # - beforeFilter( Cake\Event\Event $event ) + beforeFilter( Cake\Event\Event $event )

    Called before the controller action. @@ -287,7 +287,7 @@

    Overrides

    # - isAuthorized( array $user = NULL ) + isAuthorized( array $user = NULL )

    Check if the provided user is authorized for the request

    @@ -333,7 +333,7 @@

    Overrides

    # - index( string $album_id = NULL ) + index( string $album_id = NULL )

    Lists photos

    @@ -372,7 +372,7 @@

    Throws

    # - upload( ) + upload( )

    Uploads photos

    @@ -407,7 +407,7 @@

    Uses

    # - edit( string $id = NULL ) + edit( string $id = NULL )

    Edits photo

    @@ -424,10 +424,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    @@ -446,7 +442,7 @@

    Throws

    # - delete( string $id = NULL ) + delete( string $id = NULL )

    Deletes photo

    @@ -463,10 +459,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    @@ -511,7 +503,7 @@

    Throws

    - $Photos + $Photos
    diff --git a/API/class-MeCms.Controller.Admin.PostsCategoriesController.html b/API/class-MeCms.Controller.Admin.PostsCategoriesController.html index 223b7c2a4..d423a0c3e 100644 --- a/API/class-MeCms.Controller.Admin.PostsCategoriesController.html +++ b/API/class-MeCms.Controller.Admin.PostsCategoriesController.html @@ -220,7 +220,7 @@

    Class PostsCategoriesController

    Namespace: MeCms\Controller\Admin
    - Located at Controller/Admin/PostsCategoriesController.php + Located at Controller/Admin/PostsCategoriesController.php
    @@ -395,7 +395,7 @@

    Uses

    # - edit( string $id = NULL ) + edit( string $id = NULL )

    Edits posts category

    @@ -412,10 +412,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    @@ -434,7 +430,7 @@

    Throws

    # - delete( string $id = NULL ) + delete( string $id = NULL )

    Deletes posts category

    @@ -451,10 +447,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    diff --git a/API/class-MeCms.Controller.Admin.PostsController.html b/API/class-MeCms.Controller.Admin.PostsController.html index d76143fda..ac1944d13 100644 --- a/API/class-MeCms.Controller.Admin.PostsController.html +++ b/API/class-MeCms.Controller.Admin.PostsController.html @@ -220,7 +220,7 @@

    Class PostsController

    Namespace: MeCms\Controller\Admin
    - Located at Controller/Admin/PostsController.php + Located at Controller/Admin/PostsController.php
    @@ -452,7 +452,7 @@

    Uses

    # - edit( string $id = NULL ) + edit( string $id = NULL )

    Edits post

    @@ -469,10 +469,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -

    Uses

    @@ -496,7 +492,7 @@

    Uses

    # - delete( string $id = NULL ) + delete( string $id = NULL )

    Deletes post

    @@ -513,10 +509,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    diff --git a/API/class-MeCms.Controller.Admin.UsersController.html b/API/class-MeCms.Controller.Admin.UsersController.html index efc24e094..34424b083 100644 --- a/API/class-MeCms.Controller.Admin.UsersController.html +++ b/API/class-MeCms.Controller.Admin.UsersController.html @@ -223,7 +223,7 @@

    Class UsersController

    Namespace: MeCms\Controller\Admin
    - Located at Controller/Admin/UsersController.php + Located at Controller/Admin/UsersController.php
    @@ -437,7 +437,7 @@

    Throws

    # - edit( string $id = NULL ) + edit( string $id = NULL )

    Edits user

    @@ -454,10 +454,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -

    Uses

    @@ -480,7 +476,7 @@

    Uses

    # - delete( string $id = NULL ) + delete( string $id = NULL )

    Deletes user

    @@ -497,10 +493,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -

    Uses

    @@ -523,7 +515,7 @@

    Uses

    # - activate( string $id ) + activate( string $id )

    Activates account

    @@ -540,10 +532,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    @@ -562,7 +550,7 @@

    Throws

    # - change_password( ) + change_password( )

    Changes the user's password

    diff --git a/API/class-MeCms.Controller.Admin.UsersGroupsController.html b/API/class-MeCms.Controller.Admin.UsersGroupsController.html index 2ca037110..60108b7c2 100644 --- a/API/class-MeCms.Controller.Admin.UsersGroupsController.html +++ b/API/class-MeCms.Controller.Admin.UsersGroupsController.html @@ -220,7 +220,7 @@

    Class UsersGroupsController

    Namespace: MeCms\Controller\Admin
    - Located at Controller/Admin/UsersGroupsController.php + Located at Controller/Admin/UsersGroupsController.php
    @@ -285,7 +285,7 @@

    Overrides

    # - index( ) + index( )

    Lists usersGroups

    @@ -315,7 +315,7 @@

    Overrides

    # - add( ) + add( )

    Adds users group

    @@ -345,7 +345,7 @@

    Overrides

    # - edit( string $id = NULL ) + edit( string $id = NULL )

    Edits users group

    @@ -362,10 +362,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    @@ -384,7 +380,7 @@

    Throws

    # - delete( string $id = NULL ) + delete( string $id = NULL )

    Deletes users group

    @@ -401,10 +397,6 @@

    Parameters

    -

    Throws

    -
    - Cake\Network\Exception\NotFoundException -
    diff --git a/API/class-MeCms.Controller.PhotosAlbumsController.html b/API/class-MeCms.Controller.PhotosAlbumsController.html index d6d75fa41..50f7724ea 100644 --- a/API/class-MeCms.Controller.PhotosAlbumsController.html +++ b/API/class-MeCms.Controller.PhotosAlbumsController.html @@ -218,7 +218,7 @@

    Class PhotosAlbumsController

    Namespace: MeCms\Controller
    - Located at Controller/PhotosAlbumsController.php + Located at Controller/PhotosAlbumsController.php
    @@ -268,7 +268,7 @@

    Class PhotosAlbumsController

    # - view( string $slug = NULL ) + view( string $slug = NULL )

    Views album

    diff --git a/API/class-MeCms.Controller.PostsCategoriesController.html b/API/class-MeCms.Controller.PostsCategoriesController.html index a12b349bd..ff3945c9e 100644 --- a/API/class-MeCms.Controller.PostsCategoriesController.html +++ b/API/class-MeCms.Controller.PostsCategoriesController.html @@ -218,7 +218,7 @@

    Class PostsCategoriesController

    Namespace: MeCms\Controller
    - Located at Controller/PostsCategoriesController.php + Located at Controller/PostsCategoriesController.php
    @@ -238,7 +238,7 @@

    Class PostsCategoriesController

    # - index( ) + index( )

    Lists posts categories

    @@ -268,7 +268,7 @@

    Class PostsCategoriesController

    # - view( string $category = NULL ) + view( string $category = NULL )

    Lists posts for a category

    @@ -335,7 +335,7 @@

    Uses

    - $PostsCategories + $PostsCategories
    diff --git a/API/class-MeCms.Controller.PostsTagsController.html b/API/class-MeCms.Controller.PostsTagsController.html index 77e6e81b6..e54b4e545 100644 --- a/API/class-MeCms.Controller.PostsTagsController.html +++ b/API/class-MeCms.Controller.PostsTagsController.html @@ -218,7 +218,7 @@

    Class PostsTagsController

    Namespace: MeCms\Controller
    - Located at Controller/PostsTagsController.php + Located at Controller/PostsTagsController.php
    @@ -238,7 +238,7 @@

    Class PostsTagsController

    # - view( string $tag ) + view( string $tag )

    Lists posts for a tag

    @@ -305,7 +305,7 @@

    Uses

    - $PostsTags + $PostsTags
    diff --git a/API/class-MeCms.Controller.UsersController.html b/API/class-MeCms.Controller.UsersController.html index 06b8b53cc..4d33350c4 100644 --- a/API/class-MeCms.Controller.UsersController.html +++ b/API/class-MeCms.Controller.UsersController.html @@ -221,7 +221,7 @@

    Class UsersController

    Namespace: MeCms\Controller
    - Located at Controller/UsersController.php + Located at Controller/UsersController.php
    @@ -444,7 +444,7 @@

    Uses

    # - forgot_password( ) + forgot_password( )

    Requests a new password

    @@ -481,7 +481,7 @@

    Uses

    # - login( ) + login( )

    Login

    @@ -519,7 +519,7 @@

    Uses

    # - logout( ) + logout( )

    Logout

    @@ -557,7 +557,7 @@

    Uses

    # - resend_activation( ) + resend_activation( )

    Resends the activation mail

    @@ -593,7 +593,7 @@

    Uses

    # - reset_password( string $id, string $token ) + reset_password( string $id, string $token )

    Resets password

    @@ -639,7 +639,7 @@

    Uses

    # - _send_activation_mail( object $user ) + _send_activation_mail( object $user )

    Internal function to send the activation mail

    @@ -689,7 +689,7 @@

    Used by

    # - signup( ) + signup( )

    Sign up

    diff --git a/API/class-MeCms.Error.ExceptionRenderer.html b/API/class-MeCms.Error.ExceptionRenderer.html index a41daca84..cf0e31ee7 100644 --- a/API/class-MeCms.Error.ExceptionRenderer.html +++ b/API/class-MeCms.Error.ExceptionRenderer.html @@ -177,7 +177,8 @@

    Class ExceptionRenderer

    When debug is false a CakeException will render 404 or 500 errors. If an uncaught exception is thrown and it is a type that ExceptionHandler does not know about it will be treated as a 500 error.

    -

    Rewrites ExceptionRenderer.

    +

    Rewrites ExceptionRenderer. +This allow to use the error layout and the error templates provided by MeCms.

    @@ -207,7 +208,7 @@

    Class ExceptionRenderer

    Namespace: MeCms\Error
    - Located at Error/ExceptionRenderer.php + Located at Error/ExceptionRenderer.php
    @@ -227,7 +228,7 @@

    Class ExceptionRenderer

    # - _outputMessage( string $template ) + _outputMessage( string $template )

    Generate the response using the controller object

    @@ -270,7 +271,7 @@

    Uses

    # - _outputMessageSafe( string $template ) + _outputMessageSafe( string $template )

    A safer way to render error messages, replaces all helpers, with basics and doesn't call component methods

    @@ -313,7 +314,7 @@

    Uses

    # - render( ) + render( )

    Renders the response for the exception

    diff --git a/API/class-MeCms.Shell.InstallShell.html b/API/class-MeCms.Shell.InstallShell.html index 978c454c7..7ec67bb84 100644 --- a/API/class-MeCms.Shell.InstallShell.html +++ b/API/class-MeCms.Shell.InstallShell.html @@ -125,6 +125,7 @@

    Namespaces

    Classes

    diff --git a/API/class-MeCms.Shell.UpdateShell.html b/API/class-MeCms.Shell.UpdateShell.html new file mode 100644 index 000000000..8681272b5 --- /dev/null +++ b/API/class-MeCms.Shell.UpdateShell.html @@ -0,0 +1,312 @@ + + + + + + Class MeCms\Shell\UpdateShell | MeCms API + + + + + + +
    + +
    + +
    + + + + + + diff --git a/API/class-MeCms.Shell.UserShell.html b/API/class-MeCms.Shell.UserShell.html index f14574583..fd9d11335 100644 --- a/API/class-MeCms.Shell.UserShell.html +++ b/API/class-MeCms.Shell.UserShell.html @@ -125,6 +125,7 @@

    Namespaces

    Classes

    diff --git a/API/elementlist.js b/API/elementlist.js index 48b1eb42c..7120a6556 100644 --- a/API/elementlist.js +++ b/API/elementlist.js @@ -1,3 +1,3 @@ var ApiGen = ApiGen || {}; -ApiGen.elements = [["c","MeCms\\Controller\\Admin\\BannersController"],["c","MeCms\\Controller\\Admin\\BannersPositionsController"],["c","MeCms\\Controller\\Admin\\PagesController"],["c","MeCms\\Controller\\Admin\\PhotosAlbumsController"],["c","MeCms\\Controller\\Admin\\PhotosController"],["c","MeCms\\Controller\\Admin\\PostsCategoriesController"],["c","MeCms\\Controller\\Admin\\PostsController"],["c","MeCms\\Controller\\Admin\\PostsTagsController"],["c","MeCms\\Controller\\Admin\\SystemsController"],["c","MeCms\\Controller\\Admin\\TagsController"],["c","MeCms\\Controller\\Admin\\UsersController"],["c","MeCms\\Controller\\Admin\\UsersGroupsController"],["c","MeCms\\Controller\\AppController"],["c","MeCms\\Controller\\BannersController"],["c","MeCms\\Controller\\Component\\AuthComponent"],["c","MeCms\\Controller\\Component\\KcFinderComponent"],["c","MeCms\\Controller\\Component\\SecurityComponent"],["c","MeCms\\Controller\\PagesController"],["c","MeCms\\Controller\\PhotosAlbumsController"],["c","MeCms\\Controller\\PhotosController"],["c","MeCms\\Controller\\PostsCategoriesController"],["c","MeCms\\Controller\\PostsController"],["c","MeCms\\Controller\\PostsTagsController"],["c","MeCms\\Controller\\SystemsController"],["c","MeCms\\Controller\\UsersController"],["c","MeCms\\Error\\ExceptionRenderer"],["c","MeCms\\Form\\ContactForm"],["c","MeCms\\Mailer\\Mailer"],["c","MeCms\\Mailer\\UserMailer"],["c","MeCms\\Model\\Behavior\\TreeBehavior"],["c","MeCms\\Model\\Entity\\Banner"],["c","MeCms\\Model\\Entity\\BannersPosition"],["c","MeCms\\Model\\Entity\\Page"],["c","MeCms\\Model\\Entity\\Photo"],["c","MeCms\\Model\\Entity\\PhotosAlbum"],["c","MeCms\\Model\\Entity\\Post"],["c","MeCms\\Model\\Entity\\PostsCategory"],["c","MeCms\\Model\\Entity\\PostsTag"],["c","MeCms\\Model\\Entity\\Tag"],["c","MeCms\\Model\\Entity\\User"],["c","MeCms\\Model\\Entity\\UsersGroup"],["c","MeCms\\Model\\Table\\AppTable"],["c","MeCms\\Model\\Table\\BannersPositionsTable"],["c","MeCms\\Model\\Table\\BannersTable"],["c","MeCms\\Model\\Table\\PagesTable"],["c","MeCms\\Model\\Table\\PhotosAlbumsTable"],["c","MeCms\\Model\\Table\\PhotosTable"],["c","MeCms\\Model\\Table\\PostsCategoriesTable"],["c","MeCms\\Model\\Table\\PostsTable"],["c","MeCms\\Model\\Table\\PostsTagsTable"],["c","MeCms\\Model\\Table\\TagsTable"],["c","MeCms\\Model\\Table\\UsersGroupsTable"],["c","MeCms\\Model\\Table\\UsersTable"],["c","MeCms\\Model\\Validation\\AppValidator"],["c","MeCms\\Model\\Validation\\BannersPositionValidator"],["c","MeCms\\Model\\Validation\\BannerValidator"],["c","MeCms\\Model\\Validation\\PageValidator"],["c","MeCms\\Model\\Validation\\PhotosAlbumValidator"],["c","MeCms\\Model\\Validation\\PhotoValidator"],["c","MeCms\\Model\\Validation\\PostsCategoryValidator"],["c","MeCms\\Model\\Validation\\PostValidator"],["c","MeCms\\Model\\Validation\\TagValidator"],["c","MeCms\\Model\\Validation\\UsersGroupValidator"],["c","MeCms\\Model\\Validation\\UserValidator"],["c","MeCms\\Shell\\InstallShell"],["c","MeCms\\Shell\\UserShell"],["c","MeCms\\Utility\\BannerFile"],["c","MeCms\\Utility\\PhotoFile"],["c","MeCms\\Utility\\StaticPage"],["c","MeCms\\View\\Cell\\PagesCell"],["c","MeCms\\View\\Cell\\PhotosCell"],["c","MeCms\\View\\Cell\\PostsCell"],["c","MeCms\\View\\Helper\\AuthHelper"],["c","MeCms\\View\\Helper\\MenuBuilderHelper"],["c","MeCms\\View\\Helper\\MenuDefaultHelper"],["c","MeCms\\View\\View\\AdminView"],["c","MeCms\\View\\View\\AppView"]]; +ApiGen.elements = [["c","MeCms\\Controller\\Admin\\BannersController"],["c","MeCms\\Controller\\Admin\\BannersPositionsController"],["c","MeCms\\Controller\\Admin\\PagesController"],["c","MeCms\\Controller\\Admin\\PhotosAlbumsController"],["c","MeCms\\Controller\\Admin\\PhotosController"],["c","MeCms\\Controller\\Admin\\PostsCategoriesController"],["c","MeCms\\Controller\\Admin\\PostsController"],["c","MeCms\\Controller\\Admin\\PostsTagsController"],["c","MeCms\\Controller\\Admin\\SystemsController"],["c","MeCms\\Controller\\Admin\\TagsController"],["c","MeCms\\Controller\\Admin\\UsersController"],["c","MeCms\\Controller\\Admin\\UsersGroupsController"],["c","MeCms\\Controller\\AppController"],["c","MeCms\\Controller\\BannersController"],["c","MeCms\\Controller\\Component\\AuthComponent"],["c","MeCms\\Controller\\Component\\KcFinderComponent"],["c","MeCms\\Controller\\Component\\SecurityComponent"],["c","MeCms\\Controller\\PagesController"],["c","MeCms\\Controller\\PhotosAlbumsController"],["c","MeCms\\Controller\\PhotosController"],["c","MeCms\\Controller\\PostsCategoriesController"],["c","MeCms\\Controller\\PostsController"],["c","MeCms\\Controller\\PostsTagsController"],["c","MeCms\\Controller\\SystemsController"],["c","MeCms\\Controller\\UsersController"],["c","MeCms\\Error\\ExceptionRenderer"],["c","MeCms\\Form\\ContactForm"],["c","MeCms\\Mailer\\Mailer"],["c","MeCms\\Mailer\\UserMailer"],["c","MeCms\\Model\\Behavior\\TreeBehavior"],["c","MeCms\\Model\\Entity\\Banner"],["c","MeCms\\Model\\Entity\\BannersPosition"],["c","MeCms\\Model\\Entity\\Page"],["c","MeCms\\Model\\Entity\\Photo"],["c","MeCms\\Model\\Entity\\PhotosAlbum"],["c","MeCms\\Model\\Entity\\Post"],["c","MeCms\\Model\\Entity\\PostsCategory"],["c","MeCms\\Model\\Entity\\PostsTag"],["c","MeCms\\Model\\Entity\\Tag"],["c","MeCms\\Model\\Entity\\User"],["c","MeCms\\Model\\Entity\\UsersGroup"],["c","MeCms\\Model\\Table\\AppTable"],["c","MeCms\\Model\\Table\\BannersPositionsTable"],["c","MeCms\\Model\\Table\\BannersTable"],["c","MeCms\\Model\\Table\\PagesTable"],["c","MeCms\\Model\\Table\\PhotosAlbumsTable"],["c","MeCms\\Model\\Table\\PhotosTable"],["c","MeCms\\Model\\Table\\PostsCategoriesTable"],["c","MeCms\\Model\\Table\\PostsTable"],["c","MeCms\\Model\\Table\\PostsTagsTable"],["c","MeCms\\Model\\Table\\TagsTable"],["c","MeCms\\Model\\Table\\UsersGroupsTable"],["c","MeCms\\Model\\Table\\UsersTable"],["c","MeCms\\Model\\Validation\\AppValidator"],["c","MeCms\\Model\\Validation\\BannersPositionValidator"],["c","MeCms\\Model\\Validation\\BannerValidator"],["c","MeCms\\Model\\Validation\\PageValidator"],["c","MeCms\\Model\\Validation\\PhotosAlbumValidator"],["c","MeCms\\Model\\Validation\\PhotoValidator"],["c","MeCms\\Model\\Validation\\PostsCategoryValidator"],["c","MeCms\\Model\\Validation\\PostValidator"],["c","MeCms\\Model\\Validation\\TagValidator"],["c","MeCms\\Model\\Validation\\UsersGroupValidator"],["c","MeCms\\Model\\Validation\\UserValidator"],["c","MeCms\\Shell\\InstallShell"],["c","MeCms\\Shell\\UpdateShell"],["c","MeCms\\Shell\\UserShell"],["c","MeCms\\Utility\\BannerFile"],["c","MeCms\\Utility\\PhotoFile"],["c","MeCms\\Utility\\StaticPage"],["c","MeCms\\View\\Cell\\PagesCell"],["c","MeCms\\View\\Cell\\PhotosCell"],["c","MeCms\\View\\Cell\\PostsCell"],["c","MeCms\\View\\Helper\\AuthHelper"],["c","MeCms\\View\\Helper\\MenuBuilderHelper"],["c","MeCms\\View\\Helper\\MenuDefaultHelper"],["c","MeCms\\View\\View\\AdminView"],["c","MeCms\\View\\View\\AppView"]]; diff --git a/API/index.html b/API/index.html index 46eae82c8..67c55d49e 100644 --- a/API/index.html +++ b/API/index.html @@ -188,6 +188,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -311,6 +312,6 @@

    MeCms API

    - + diff --git a/API/namespace-MeCms.Controller.Admin.html b/API/namespace-MeCms.Controller.Admin.html index fb3afcf1e..3f30627e6 100644 --- a/API/namespace-MeCms.Controller.Admin.html +++ b/API/namespace-MeCms.Controller.Admin.html @@ -246,6 +246,6 @@

    Namespace MeCms\ - + diff --git a/API/namespace-MeCms.Controller.Component.html b/API/namespace-MeCms.Controller.Component.html index 4a9772df7..727034cfe 100644 --- a/API/namespace-MeCms.Controller.Component.html +++ b/API/namespace-MeCms.Controller.Component.html @@ -201,6 +201,6 @@

    Namespace MeCms\ - + diff --git a/API/namespace-MeCms.Controller.html b/API/namespace-MeCms.Controller.html index b91b0e62a..376666ca3 100644 --- a/API/namespace-MeCms.Controller.html +++ b/API/namespace-MeCms.Controller.html @@ -245,6 +245,6 @@

    Namespace MeCms\Controller

    - + diff --git a/API/namespace-MeCms.Error.html b/API/namespace-MeCms.Error.html index 5260ba148..384111353 100644 --- a/API/namespace-MeCms.Error.html +++ b/API/namespace-MeCms.Error.html @@ -194,6 +194,6 @@

    Namespace MeCms\Error

    - + diff --git a/API/namespace-MeCms.Form.html b/API/namespace-MeCms.Form.html index 927c804f8..f8a321ce4 100644 --- a/API/namespace-MeCms.Form.html +++ b/API/namespace-MeCms.Form.html @@ -191,6 +191,6 @@

    Namespace MeCms\Form

    - + diff --git a/API/namespace-MeCms.Mailer.html b/API/namespace-MeCms.Mailer.html index 78eda783d..139221f8f 100644 --- a/API/namespace-MeCms.Mailer.html +++ b/API/namespace-MeCms.Mailer.html @@ -196,6 +196,6 @@

    Namespace MeCms\Mailer

    - + diff --git a/API/namespace-MeCms.Model.Behavior.html b/API/namespace-MeCms.Model.Behavior.html index 49a858dff..637442651 100644 --- a/API/namespace-MeCms.Model.Behavior.html +++ b/API/namespace-MeCms.Model.Behavior.html @@ -192,6 +192,6 @@

    Namespace MeCms\ - + diff --git a/API/namespace-MeCms.Model.Entity.html b/API/namespace-MeCms.Model.Entity.html index 8651d12ab..bf343dc10 100644 --- a/API/namespace-MeCms.Model.Entity.html +++ b/API/namespace-MeCms.Model.Entity.html @@ -241,6 +241,6 @@

    Namespace MeCms\ - + diff --git a/API/namespace-MeCms.Model.Table.html b/API/namespace-MeCms.Model.Table.html index 7bcb8f229..5a9fdb94f 100644 --- a/API/namespace-MeCms.Model.Table.html +++ b/API/namespace-MeCms.Model.Table.html @@ -246,6 +246,6 @@

    Namespace MeCms\ - + diff --git a/API/namespace-MeCms.Model.Validation.html b/API/namespace-MeCms.Model.Validation.html index dcbb9d0c1..d17c6a584 100644 --- a/API/namespace-MeCms.Model.Validation.html +++ b/API/namespace-MeCms.Model.Validation.html @@ -252,6 +252,6 @@

    Namespace MeCms\ - + diff --git a/API/namespace-MeCms.Model.html b/API/namespace-MeCms.Model.html index 05d49af17..0f04e2e6b 100644 --- a/API/namespace-MeCms.Model.html +++ b/API/namespace-MeCms.Model.html @@ -194,6 +194,6 @@

    Namespace MeCms\Model

    - + diff --git a/API/namespace-MeCms.Shell.html b/API/namespace-MeCms.Shell.html index c3585262b..ae6750aca 100644 --- a/API/namespace-MeCms.Shell.html +++ b/API/namespace-MeCms.Shell.html @@ -125,6 +125,7 @@

    Namespaces

    Classes

    @@ -178,6 +179,10 @@

    Namespace MeCms\Shell

    InstallShell Executes some tasks to make the system ready to work + + UpdateShell + Applies updates + UserShell Allows the user management @@ -196,6 +201,6 @@

    Namespace MeCms\Shell

    - + diff --git a/API/namespace-MeCms.Utility.html b/API/namespace-MeCms.Utility.html index 111f9c551..02fc41b37 100644 --- a/API/namespace-MeCms.Utility.html +++ b/API/namespace-MeCms.Utility.html @@ -201,6 +201,6 @@

    Namespace MeCms\Utility

    - + diff --git a/API/namespace-MeCms.View.Cell.html b/API/namespace-MeCms.View.Cell.html index bd26046d5..036f0539b 100644 --- a/API/namespace-MeCms.View.Cell.html +++ b/API/namespace-MeCms.View.Cell.html @@ -201,6 +201,6 @@

    Namespace MeCms\ - + diff --git a/API/namespace-MeCms.View.Helper.html b/API/namespace-MeCms.View.Helper.html index c2fa7118f..fca3511f3 100644 --- a/API/namespace-MeCms.View.Helper.html +++ b/API/namespace-MeCms.View.Helper.html @@ -201,6 +201,6 @@

    Namespace MeCms\ - + diff --git a/API/namespace-MeCms.View.View.html b/API/namespace-MeCms.View.View.html index 6577d2830..b9762494a 100644 --- a/API/namespace-MeCms.View.View.html +++ b/API/namespace-MeCms.View.View.html @@ -196,6 +196,6 @@

    Namespace MeCms\ - + diff --git a/API/namespace-MeCms.View.html b/API/namespace-MeCms.View.html index 132b9fe2e..4ae5ebcd6 100644 --- a/API/namespace-MeCms.View.html +++ b/API/namespace-MeCms.View.html @@ -191,6 +191,6 @@

    Namespace MeCms\View

    - + diff --git a/API/namespace-MeCms.html b/API/namespace-MeCms.html index 1de4d307b..893ee7ac8 100644 --- a/API/namespace-MeCms.html +++ b/API/namespace-MeCms.html @@ -206,6 +206,6 @@

    Namespace MeCms

    - + diff --git a/API/source-class-MeCms.Controller.Admin.BannersController.html b/API/source-class-MeCms.Controller.Admin.BannersController.html index 192efe4af..c2acb4b28 100644 --- a/API/source-class-MeCms.Controller.Admin.BannersController.html +++ b/API/source-class-MeCms.Controller.Admin.BannersController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -364,42 +365,40 @@

    Classes

    119: /** 120: * Edits banner 121: * @param string $id Banner ID -122: * @throws \Cake\Network\Exception\NotFoundException -123: */ -124: public function edit($id = NULL) { -125: $banner = $this->Banners->get($id); -126: -127: if($this->request->is(['patch', 'post', 'put'])) { -128: $banner = $this->Banners->patchEntity($banner, $this->request->data); -129: -130: if($this->Banners->save($banner)) { -131: $this->Flash->success(__d('me_cms', 'The banner has been saved')); -132: return $this->redirect(['action' => 'index']); -133: } -134: else -135: $this->Flash->error(__d('me_cms', 'The banner could not be saved')); -136: } -137: -138: $this->set(compact('banner')); -139: } -140: /** -141: * Deletes banner -142: * @param string $id Banner ID -143: * @throws \Cake\Network\Exception\NotFoundException -144: */ -145: public function delete($id = NULL) { -146: $this->request->allowMethod(['post', 'delete']); +122: */ +123: public function edit($id = NULL) { +124: $banner = $this->Banners->get($id); +125: +126: if($this->request->is(['patch', 'post', 'put'])) { +127: $banner = $this->Banners->patchEntity($banner, $this->request->data); +128: +129: if($this->Banners->save($banner)) { +130: $this->Flash->success(__d('me_cms', 'The banner has been saved')); +131: return $this->redirect(['action' => 'index']); +132: } +133: else +134: $this->Flash->error(__d('me_cms', 'The banner could not be saved')); +135: } +136: +137: $this->set(compact('banner')); +138: } +139: /** +140: * Deletes banner +141: * @param string $id Banner ID +142: */ +143: public function delete($id = NULL) { +144: $this->request->allowMethod(['post', 'delete']); +145: +146: $banner = $this->Banners->get($id); 147: -148: $banner = $this->Banners->get($id); -149: -150: if($this->Banners->delete($banner)) -151: $this->Flash->success(__d('me_cms', 'The banner has been deleted')); -152: else -153: $this->Flash->error(__d('me_cms', 'The banner could not be deleted')); -154: -155: return $this->redirect(['action' => 'index']); -156: } -157: } +148: if($this->Banners->delete($banner)) +149: $this->Flash->success(__d('me_cms', 'The banner has been deleted')); +150: else +151: $this->Flash->error(__d('me_cms', 'The banner could not be deleted')); +152: +153: return $this->redirect(['action' => 'index']); +154: } +155: }
    - + diff --git a/API/source-class-MeCms.Controller.Admin.BannersPositionsController.html b/API/source-class-MeCms.Controller.Admin.BannersPositionsController.html index 70e62765b..cbbf0749c 100644 --- a/API/source-class-MeCms.Controller.Admin.BannersPositionsController.html +++ b/API/source-class-MeCms.Controller.Admin.BannersPositionsController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -320,47 +321,45 @@

    Classes

    75: /** 76: * Edits banners position 77: * @param string $id Banners Position ID - 78: * @throws \Cake\Network\Exception\NotFoundException - 79: */ - 80: public function edit($id = NULL) { - 81: $position = $this->BannersPositions->get($id); - 82: - 83: if($this->request->is(['patch', 'post', 'put'])) { - 84: $position = $this->BannersPositions->patchEntity($position, $this->request->data); - 85: - 86: if($this->BannersPositions->save($position)) { - 87: $this->Flash->success(__d('me_cms', 'The banners position has been saved')); - 88: return $this->redirect(['action' => 'index']); - 89: } - 90: else - 91: $this->Flash->error(__d('me_cms', 'The banners position could not be saved')); - 92: } - 93: - 94: $this->set(compact('position')); - 95: } - 96: /** - 97: * Deletes banners position - 98: * @param string $id Banners Position ID - 99: * @throws \Cake\Network\Exception\NotFoundException -100: */ -101: public function delete($id = NULL) { -102: $this->request->allowMethod(['post', 'delete']); + 78: */ + 79: public function edit($id = NULL) { + 80: $position = $this->BannersPositions->get($id); + 81: + 82: if($this->request->is(['patch', 'post', 'put'])) { + 83: $position = $this->BannersPositions->patchEntity($position, $this->request->data); + 84: + 85: if($this->BannersPositions->save($position)) { + 86: $this->Flash->success(__d('me_cms', 'The banners position has been saved')); + 87: return $this->redirect(['action' => 'index']); + 88: } + 89: else + 90: $this->Flash->error(__d('me_cms', 'The banners position could not be saved')); + 91: } + 92: + 93: $this->set(compact('position')); + 94: } + 95: /** + 96: * Deletes banners position + 97: * @param string $id Banners Position ID + 98: */ + 99: public function delete($id = NULL) { +100: $this->request->allowMethod(['post', 'delete']); +101: +102: $position = $this->BannersPositions->get($id); 103: -104: $position = $this->BannersPositions->get($id); -105: -106: //Before deleting, it checks if the position has some banners -107: if(!$position->banner_count) { -108: if($this->BannersPositions->delete($position)) -109: $this->Flash->success(__d('me_cms', 'The banners position has been deleted')); -110: else -111: $this->Flash->error(__d('me_cms', 'The banners position could not be deleted')); -112: } -113: else -114: $this->Flash->alert(__d('me_cms', 'Before you delete this position, you have to delete its banners or assign them to another position')); -115: -116: return $this->redirect(['action' => 'index']); -117: } -118: } +104: //Before deleting, it checks if the position has some banners +105: if(!$position->banner_count) { +106: if($this->BannersPositions->delete($position)) +107: $this->Flash->success(__d('me_cms', 'The banners position has been deleted')); +108: else +109: $this->Flash->error(__d('me_cms', 'The banners position could not be deleted')); +110: } +111: else +112: $this->Flash->alert(__d('me_cms', 'Before you delete this position, you have to delete its banners or assign them to another position')); +113: +114: return $this->redirect(['action' => 'index']); +115: } +116: }
    - + diff --git a/API/source-class-MeCms.Controller.Admin.PagesController.html b/API/source-class-MeCms.Controller.Admin.PagesController.html index d4b1baeec..35fb12def 100644 --- a/API/source-class-MeCms.Controller.Admin.PagesController.html +++ b/API/source-class-MeCms.Controller.Admin.PagesController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -267,57 +268,57 @@

    Classes

    22: */ 23: namespace MeCms\Controller\Admin; 24: - 25: use MeCms\Controller\AppController; - 26: use MeCms\Utility\StaticPage; - 27: - 28: /** - 29: * Pages controller - 30: * @property \MeCms\Model\Table\PagesTable $Pages - 31: */ - 32: class PagesController extends AppController { - 33: /** - 34: * Called after the controller action is run, but before the view is rendered. - 35: * You can use this method to perform logic or set view variables that are required on every request. - 36: * @param \Cake\Event\Event $event An Event instance - 37: * @see http://api.cakephp.org/3.1/class-Cake.Controller.Controller.html#_beforeRender - 38: * @uses MeCms\Controller\AppController::beforeRender() - 39: * @uses MeCms\Controller\Component\KcFinderComponent::configure() - 40: */ - 41: public function beforeRender(\Cake\Event\Event $event) { - 42: parent::beforeRender($event); - 43: - 44: //Loads the KcFinder component and configures KCFinder - 45: $this->loadComponent('MeCms.KcFinder'); - 46: $this->KcFinder->configure(); - 47: } - 48: - 49: /** - 50: * Check if the provided user is authorized for the request - 51: * @param array $user The user to check the authorization of. If empty the user in the session will be used - 52: * @return bool TRUE if the user is authorized, otherwise FALSE - 53: * @uses MeCms\Controller\Component\AuthComponent::isGroup() - 54: * @uses MeTools\Network\Request::isAction() - 55: */ - 56: public function isAuthorized($user = NULL) { - 57: //Everyone can list pages and static pages - 58: if($this->request->isAction(['index', 'statics'])) - 59: return TRUE; - 60: - 61: //Only admins can delete pages - 62: if($this->request->isAction('delete')) - 63: return $this->Auth->isGroup('admin'); - 64: - 65: //Admins and managers can access other actions - 66: return $this->Auth->isGroup(['admin', 'manager']); - 67: } - 68: - 69: /** - 70: * Lists pages - 71: * @uses MeCms\Model\Table\PagesTable::queryFromFilter() - 72: */ - 73: public function index() { - 74: $query = $this->Pages->find() - 75: ->select(['id', 'title', 'slug', 'priority', 'active', 'created']); + 25: use Cake\I18n\Time; + 26: use MeCms\Controller\AppController; + 27: use MeCms\Utility\StaticPage; + 28: + 29: /** + 30: * Pages controller + 31: * @property \MeCms\Model\Table\PagesTable $Pages + 32: */ + 33: class PagesController extends AppController { + 34: /** + 35: * Called after the controller action is run, but before the view is rendered. + 36: * You can use this method to perform logic or set view variables that are required on every request. + 37: * @param \Cake\Event\Event $event An Event instance + 38: * @see http://api.cakephp.org/3.1/class-Cake.Controller.Controller.html#_beforeRender + 39: * @uses MeCms\Controller\AppController::beforeRender() + 40: * @uses MeCms\Controller\Component\KcFinderComponent::configure() + 41: */ + 42: public function beforeRender(\Cake\Event\Event $event) { + 43: parent::beforeRender($event); + 44: + 45: //Loads the KcFinder component and configures KCFinder + 46: $this->loadComponent('MeCms.KcFinder'); + 47: $this->KcFinder->configure(); + 48: } + 49: + 50: /** + 51: * Check if the provided user is authorized for the request + 52: * @param array $user The user to check the authorization of. If empty the user in the session will be used + 53: * @return bool TRUE if the user is authorized, otherwise FALSE + 54: * @uses MeCms\Controller\Component\AuthComponent::isGroup() + 55: * @uses MeTools\Network\Request::isAction() + 56: */ + 57: public function isAuthorized($user = NULL) { + 58: //Everyone can list pages and static pages + 59: if($this->request->isAction(['index', 'statics'])) + 60: return TRUE; + 61: + 62: //Only admins can delete pages + 63: if($this->request->isAction('delete')) + 64: return $this->Auth->isGroup('admin'); + 65: + 66: //Admins and managers can access other actions + 67: return $this->Auth->isGroup(['admin', 'manager']); + 68: } + 69: + 70: /** + 71: * Lists pages + 72: * @uses MeCms\Model\Table\PagesTable::queryFromFilter() + 73: */ + 74: public function index() { + 75: $query = $this->Pages->find()->select(['id', 'title', 'slug', 'priority', 'active', 'created']); 76: 77: $this->paginate['order'] = ['title' => 'ASC']; 78: @@ -341,58 +342,60 @@

    Classes

    96: $page = $this->Pages->newEntity(); 97: 98: if($this->request->is('post')) { - 99: $page = $this->Pages->patchEntity($page, $this->request->data); + 99: $this->request->data['created'] = new Time($this->request->data('created')); 100: -101: if($this->Pages->save($page)) { -102: $this->Flash->success(__d('me_cms', 'The page has been saved')); -103: return $this->redirect(['action' => 'index']); -104: } -105: else -106: $this->Flash->error(__d('me_cms', 'The page could not be saved')); -107: } -108: -109: $this->set(compact('page')); -110: } -111: -112: /** -113: * Edits page -114: * @param string $id Page ID -115: * @throws \Cake\Network\Exception\NotFoundException -116: */ -117: public function edit($id = NULL) { -118: $page = $this->Pages->get($id); -119: -120: if($this->request->is(['patch', 'post', 'put'])) { -121: $page = $this->Pages->patchEntity($page, $this->request->data); -122: -123: if($this->Pages->save($page)) { -124: $this->Flash->success(__d('me_cms', 'The page has been saved')); -125: return $this->redirect(['action' => 'index']); -126: } -127: else -128: $this->Flash->error(__d('me_cms', 'The page could not be saved')); -129: } -130: -131: $this->set(compact('page')); -132: } -133: /** -134: * Deletes page -135: * @param string $id Page ID -136: * @throws \Cake\Network\Exception\NotFoundException -137: */ -138: public function delete($id = NULL) { -139: $this->request->allowMethod(['post', 'delete']); -140: -141: $page = $this->Pages->get($id); +101: $page = $this->Pages->patchEntity($page, $this->request->data); +102: +103: if($this->Pages->save($page)) { +104: $this->Flash->success(__d('me_cms', 'The page has been saved')); +105: return $this->redirect(['action' => 'index']); +106: } +107: else +108: $this->Flash->error(__d('me_cms', 'The page could not be saved')); +109: } +110: +111: $this->set(compact('page')); +112: } +113: +114: /** +115: * Edits page +116: * @param string $id Page ID +117: */ +118: public function edit($id = NULL) { +119: $page = $this->Pages->get($id); +120: +121: if($this->request->is(['patch', 'post', 'put'])) { +122: $this->request->data['created'] = new Time($this->request->data('created')); +123: +124: $page = $this->Pages->patchEntity($page, $this->request->data); +125: +126: if($this->Pages->save($page)) { +127: $this->Flash->success(__d('me_cms', 'The page has been saved')); +128: return $this->redirect(['action' => 'index']); +129: } +130: else +131: $this->Flash->error(__d('me_cms', 'The page could not be saved')); +132: } +133: +134: $this->set(compact('page')); +135: } +136: /** +137: * Deletes page +138: * @param string $id Page ID +139: */ +140: public function delete($id = NULL) { +141: $this->request->allowMethod(['post', 'delete']); 142: -143: if($this->Pages->delete($page)) -144: $this->Flash->success(__d('me_cms', 'The page has been deleted')); -145: else -146: $this->Flash->error(__d('me_cms', 'The page could not be deleted')); -147: -148: return $this->redirect(['action' => 'index']); -149: } -150: } +143: $page = $this->Pages->get($id); +144: +145: if($this->Pages->delete($page)) +146: $this->Flash->success(__d('me_cms', 'The page has been deleted')); +147: else +148: $this->Flash->error(__d('me_cms', 'The page could not be deleted')); +149: +150: return $this->redirect(['action' => 'index']); +151: } +152: }
    - + diff --git a/API/source-class-MeCms.Controller.Admin.PhotosAlbumsController.html b/API/source-class-MeCms.Controller.Admin.PhotosAlbumsController.html index b27121f24..bb83000f9 100644 --- a/API/source-class-MeCms.Controller.Admin.PhotosAlbumsController.html +++ b/API/source-class-MeCms.Controller.Admin.PhotosAlbumsController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -343,47 +344,45 @@

    Classes

    98: /** 99: * Edits photos album 100: * @param string $id Photos Album ID -101: * @throws \Cake\Network\Exception\NotFoundException -102: */ -103: public function edit($id = NULL) { -104: $album = $this->PhotosAlbums->get($id); -105: -106: if($this->request->is(['patch', 'post', 'put'])) { -107: $album = $this->PhotosAlbums->patchEntity($album, $this->request->data); -108: -109: if($this->PhotosAlbums->save($album)) { -110: $this->Flash->success(__d('me_cms', 'The photos album has been saved')); -111: return $this->redirect(['action' => 'index']); -112: } -113: else -114: $this->Flash->error(__d('me_cms', 'The photos album could not be saved')); -115: } -116: -117: $this->set(compact('album')); -118: } -119: /** -120: * Deletes photos album -121: * @param string $id Photos Album ID -122: * @throws \Cake\Network\Exception\NotFoundException -123: */ -124: public function delete($id = NULL) { -125: $this->request->allowMethod(['post', 'delete']); +101: */ +102: public function edit($id = NULL) { +103: $album = $this->PhotosAlbums->get($id); +104: +105: if($this->request->is(['patch', 'post', 'put'])) { +106: $album = $this->PhotosAlbums->patchEntity($album, $this->request->data); +107: +108: if($this->PhotosAlbums->save($album)) { +109: $this->Flash->success(__d('me_cms', 'The photos album has been saved')); +110: return $this->redirect(['action' => 'index']); +111: } +112: else +113: $this->Flash->error(__d('me_cms', 'The photos album could not be saved')); +114: } +115: +116: $this->set(compact('album')); +117: } +118: /** +119: * Deletes photos album +120: * @param string $id Photos Album ID +121: */ +122: public function delete($id = NULL) { +123: $this->request->allowMethod(['post', 'delete']); +124: +125: $album = $this->PhotosAlbums->get($id); 126: -127: $album = $this->PhotosAlbums->get($id); -128: -129: //Before deleting, it checks if the album has some photos -130: if(!$album->photo_count) { -131: if($this->PhotosAlbums->delete($album)) -132: $this->Flash->success(__d('me_cms', 'The photos album has been deleted')); -133: else -134: $this->Flash->error(__d('me_cms', 'The photos album could not be deleted')); -135: } -136: else -137: $this->Flash->alert(__d('me_cms', 'Before you delete this album, you have to delete its photos or assign them to another album')); -138: -139: return $this->redirect(['action' => 'index']); -140: } -141: } +127: //Before deleting, it checks if the album has some photos +128: if(!$album->photo_count) { +129: if($this->PhotosAlbums->delete($album)) +130: $this->Flash->success(__d('me_cms', 'The photos album has been deleted')); +131: else +132: $this->Flash->error(__d('me_cms', 'The photos album could not be deleted')); +133: } +134: else +135: $this->Flash->alert(__d('me_cms', 'Before you delete this album, you have to delete its photos or assign them to another album')); +136: +137: return $this->redirect(['action' => 'index']); +138: } +139: }
    - + diff --git a/API/source-class-MeCms.Controller.Admin.PhotosController.html b/API/source-class-MeCms.Controller.Admin.PhotosController.html index 244fa24de..3d30fe61d 100644 --- a/API/source-class-MeCms.Controller.Admin.PhotosController.html +++ b/API/source-class-MeCms.Controller.Admin.PhotosController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -267,145 +268,140 @@

    Classes

    22: */ 23: namespace MeCms\Controller\Admin; 24: - 25: use MeCms\Controller\AppController; - 26: use MeCms\Utility\PhotoFile; - 27: - 28: /** - 29: * Photos controller - 30: * @property \MeCms\Model\Table\PhotosTable $Photos - 31: */ - 32: class PhotosController extends AppController { - 33: /** - 34: * Called before the controller action. - 35: * You can use this method to perform logic that needs to happen before each controller action. - 36: * @param \Cake\Event\Event $event An Event instance - 37: * @uses MeCms\Controller\AppController::beforeFilter() - 38: * @uses MeCms\Model\Table\PhotosAlbums::getList() - 39: * @uses MeCms\Utility\PhotoFile::check() - 40: * @uses MeCms\Utility\PhotoFile::folder() - 41: * @uses MeTools\Network\Request::isAction() - 42: */ - 43: public function beforeFilter(\Cake\Event\Event $event) { - 44: parent::beforeFilter($event); - 45: - 46: //Checks if the main folder and its subfolders are writable - 47: if(!PhotoFile::check()) { - 48: $this->Flash->error(__d('me_tools', 'File or directory `{0}` not writeable', rtr(PhotoFile::folder()))); - 49: $this->redirect(['_name' => 'dashboard']); - 50: } - 51: - 52: if($this->request->isAction(['index', 'edit', 'upload'])) { - 53: //Gets and sets albums - 54: $this->set('albums', $albums = $this->Photos->Albums->getList()); - 55: - 56: //Checks for albums - 57: if(empty($albums) && !$this->request->isAction('index')) { - 58: $this->Flash->alert(__d('me_cms', 'Before you can manage photos, you have to create at least an album')); - 59: $this->redirect(['controller' => 'PhotosAlbums', 'action' => 'index']); - 60: } - 61: } - 62: - 63: //See http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#disabling-csrf-and-post-data-validation-for-specific-actions - 64: $this->Security->config('unlockedActions', 'upload'); - 65: } - 66: - 67: /** - 68: * Check if the provided user is authorized for the request - 69: * @param array $user The user to check the authorization of. If empty the user in the session will be used - 70: * @return bool TRUE if the user is authorized, otherwise FALSE - 71: * @uses MeCms\Controller\Component\AuthComponent::isGroup() - 72: * @uses MeTools\Network\Request::isAction() - 73: */ - 74: public function isAuthorized($user = NULL) { - 75: //Only admins and managers can delete photos - 76: if($this->request->isAction('delete')) - 77: $this->Auth->isGroup(['admin', 'manager']); - 78: - 79: return TRUE; - 80: } - 81: - 82: /** - 83: * Lists photos - 84: * @param string $album_id Album ID - 85: * @throws \Cake\Network\Exception\NotFoundException - 86: */ - 87: public function index($album_id = NULL) { - 88: if(empty($album_id)) - 89: throw new \Cake\Network\Exception\NotFoundException(__d('me_cms', 'The album ID is missing')); - 90: - 91: $this->paginate['limit'] = $this->paginate['maxLimit'] = config('backend.photos'); - 92: $this->paginate['order'] = ['filename' => 'ASC']; + 25: use Cake\Datasource\Exception\RecordNotFoundException; + 26: use MeCms\Controller\AppController; + 27: use MeCms\Utility\PhotoFile; + 28: + 29: /** + 30: * Photos controller + 31: * @property \MeCms\Model\Table\PhotosTable $Photos + 32: */ + 33: class PhotosController extends AppController { + 34: /** + 35: * Called before the controller action. + 36: * You can use this method to perform logic that needs to happen before each controller action. + 37: * @param \Cake\Event\Event $event An Event instance + 38: * @uses MeCms\Controller\AppController::beforeFilter() + 39: * @uses MeCms\Model\Table\PhotosAlbums::getList() + 40: * @uses MeCms\Utility\PhotoFile::check() + 41: * @uses MeCms\Utility\PhotoFile::folder() + 42: * @uses MeTools\Network\Request::isAction() + 43: */ + 44: public function beforeFilter(\Cake\Event\Event $event) { + 45: parent::beforeFilter($event); + 46: + 47: //Checks if the main folder and its subfolders are writable + 48: if(!PhotoFile::check()) { + 49: $this->Flash->error(__d('me_tools', 'File or directory `{0}` not writeable', rtr(PhotoFile::folder()))); + 50: $this->redirect(['_name' => 'dashboard']); + 51: } + 52: + 53: if($this->request->isAction(['index', 'edit', 'upload'])) { + 54: //Gets and sets albums + 55: $this->set('albums', $albums = $this->Photos->Albums->getList()); + 56: + 57: //Checks for albums + 58: if(empty($albums) && !$this->request->isAction('index')) { + 59: $this->Flash->alert(__d('me_cms', 'Before you can manage photos, you have to create at least an album')); + 60: $this->redirect(['controller' => 'PhotosAlbums', 'action' => 'index']); + 61: } + 62: } + 63: + 64: //See http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#disabling-csrf-and-post-data-validation-for-specific-actions + 65: $this->Security->config('unlockedActions', 'upload'); + 66: } + 67: + 68: /** + 69: * Check if the provided user is authorized for the request + 70: * @param array $user The user to check the authorization of. If empty the user in the session will be used + 71: * @return bool TRUE if the user is authorized, otherwise FALSE + 72: * @uses MeCms\Controller\Component\AuthComponent::isGroup() + 73: * @uses MeTools\Network\Request::isAction() + 74: */ + 75: public function isAuthorized($user = NULL) { + 76: //Only admins and managers can delete photos + 77: if($this->request->isAction('delete')) + 78: $this->Auth->isGroup(['admin', 'manager']); + 79: + 80: return TRUE; + 81: } + 82: + 83: /** + 84: * Lists photos + 85: * @param string $album_id Album ID + 86: * @throws \Cake\Network\Exception\NotFoundException + 87: */ + 88: public function index($album_id = NULL) { + 89: $query = $this->Photos->find()->select(['id', 'album_id', 'filename'])->where(compact('album_id')); + 90: + 91: if($query->isEmpty()) + 92: throw new RecordNotFoundException(__d('me_cms', 'Record not found')); 93: - 94: $this->set('photos', $this->paginate( - 95: $this->Photos->find() - 96: ->select(['id', 'album_id', 'filename']) - 97: ->where(compact('album_id')) - 98: )); - 99: -100: $this->set(compact('album_id')); -101: } -102: -103: /** -104: * Uploads photos -105: * @uses MeCms\Controller\_upload() -106: * @uses MeCms\Utility\PhotoFile::folder() -107: */ -108: public function upload() { -109: //If there's only one album, it automatically sets the query value -110: if(!$this->request->query('album') && count($this->viewVars['albums']) < 2) -111: $this->request->query['album'] = fk($this->viewVars['albums']); -112: -113: $album = $this->request->query('album'); -114: -115: if($album && $this->request->data('file')) -116: //Checks if the file has been uploaded -117: if($filename = $this->_upload($this->request->data('file'), PhotoFile::folder($album))) -118: $this->Photos->save($this->Photos->newEntity([ -119: 'album_id' => $album, -120: 'filename' => basename($filename) -121: ])); -122: } -123: -124: /** -125: * Edits photo -126: * @param string $id Photo ID -127: * @throws \Cake\Network\Exception\NotFoundException -128: */ -129: public function edit($id = NULL) { -130: $photo = $this->Photos->get($id); -131: -132: if($this->request->is(['patch', 'post', 'put'])) { -133: $photo = $this->Photos->patchEntity($photo, $this->request->data); -134: -135: if($this->Photos->save($photo)) { -136: $this->Flash->success(__d('me_cms', 'The photo has been saved')); -137: return $this->redirect(['action' => 'index', $photo->album_id]); -138: } -139: else -140: $this->Flash->error(__d('me_cms', 'The photo could not be saved')); -141: } -142: -143: $this->set(compact('photo')); -144: } -145: -146: /** -147: * Deletes photo -148: * @param string $id Photo ID -149: * @throws \Cake\Network\Exception\NotFoundException -150: */ -151: public function delete($id = NULL) { -152: $this->request->allowMethod(['post', 'delete']); -153: -154: $photo = $this->Photos->get($id); -155: -156: if($this->Photos->delete($photo)) -157: $this->Flash->success(__d('me_cms', 'The photo has been deleted')); -158: else -159: $this->Flash->error(__d('me_cms', 'The photo could not be deleted')); -160: -161: return $this->redirect(['action' => 'index', $photo->album_id]); -162: } -163: } + 94: $this->paginate['limit'] = $this->paginate['maxLimit'] = config('backend.photos'); + 95: $this->paginate['order'] = ['filename' => 'ASC']; + 96: + 97: $this->set(am(['photos' => $this->paginate($query)], compact('album_id'))); + 98: } + 99: +100: /** +101: * Uploads photos +102: * @uses MeCms\Controller\_upload() +103: * @uses MeCms\Utility\PhotoFile::folder() +104: */ +105: public function upload() { +106: //If there's only one album, it automatically sets the query value +107: if(!$this->request->query('album') && count($this->viewVars['albums']) < 2) +108: $this->request->query['album'] = fk($this->viewVars['albums']); +109: +110: $album = $this->request->query('album'); +111: +112: if($album && $this->request->data('file')) +113: //Checks if the file has been uploaded +114: if($filename = $this->_upload($this->request->data('file'), PhotoFile::folder($album))) +115: $this->Photos->save($this->Photos->newEntity([ +116: 'album_id' => $album, +117: 'filename' => basename($filename) +118: ])); +119: } +120: +121: /** +122: * Edits photo +123: * @param string $id Photo ID +124: */ +125: public function edit($id = NULL) { +126: $photo = $this->Photos->get($id); +127: +128: if($this->request->is(['patch', 'post', 'put'])) { +129: $photo = $this->Photos->patchEntity($photo, $this->request->data); +130: +131: if($this->Photos->save($photo)) { +132: $this->Flash->success(__d('me_cms', 'The photo has been saved')); +133: return $this->redirect(['action' => 'index', $photo->album_id]); +134: } +135: else +136: $this->Flash->error(__d('me_cms', 'The photo could not be saved')); +137: } +138: +139: $this->set(compact('photo')); +140: } +141: +142: /** +143: * Deletes photo +144: * @param string $id Photo ID +145: */ +146: public function delete($id = NULL) { +147: $this->request->allowMethod(['post', 'delete']); +148: +149: $photo = $this->Photos->get($id); +150: +151: if($this->Photos->delete($photo)) +152: $this->Flash->success(__d('me_cms', 'The photo has been deleted')); +153: else +154: $this->Flash->error(__d('me_cms', 'The photo could not be deleted')); +155: +156: return $this->redirect(['action' => 'index', $photo->album_id]); +157: } +158: }
    - + diff --git a/API/source-class-MeCms.Controller.Admin.PostsCategoriesController.html b/API/source-class-MeCms.Controller.Admin.PostsCategoriesController.html index 8eaa4bd93..63874a8ce 100644 --- a/API/source-class-MeCms.Controller.Admin.PostsCategoriesController.html +++ b/API/source-class-MeCms.Controller.Admin.PostsCategoriesController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -349,47 +350,45 @@

    Classes

    104: /** 105: * Edits posts category 106: * @param string $id Posts category ID -107: * @throws \Cake\Network\Exception\NotFoundException -108: */ -109: public function edit($id = NULL) { -110: $category = $this->PostsCategories->get($id); -111: -112: if($this->request->is(['patch', 'post', 'put'])) { -113: $category = $this->PostsCategories->patchEntity($category, $this->request->data); -114: -115: if($this->PostsCategories->save($category)) { -116: $this->Flash->success(__d('me_cms', 'The posts category has been saved')); -117: return $this->redirect(['action' => 'index']); -118: } -119: else -120: $this->Flash->error(__d('me_cms', 'The posts category could not be saved')); -121: } -122: -123: $this->set(compact('category')); -124: } -125: /** -126: * Deletes posts category -127: * @param string $id Posts category ID -128: * @throws \Cake\Network\Exception\NotFoundException -129: */ -130: public function delete($id = NULL) { -131: $this->request->allowMethod(['post', 'delete']); +107: */ +108: public function edit($id = NULL) { +109: $category = $this->PostsCategories->get($id); +110: +111: if($this->request->is(['patch', 'post', 'put'])) { +112: $category = $this->PostsCategories->patchEntity($category, $this->request->data); +113: +114: if($this->PostsCategories->save($category)) { +115: $this->Flash->success(__d('me_cms', 'The posts category has been saved')); +116: return $this->redirect(['action' => 'index']); +117: } +118: else +119: $this->Flash->error(__d('me_cms', 'The posts category could not be saved')); +120: } +121: +122: $this->set(compact('category')); +123: } +124: /** +125: * Deletes posts category +126: * @param string $id Posts category ID +127: */ +128: public function delete($id = NULL) { +129: $this->request->allowMethod(['post', 'delete']); +130: +131: $category = $this->PostsCategories->get($id); 132: -133: $category = $this->PostsCategories->get($id); -134: -135: //Before deleting, it checks if the category has some posts -136: if(!$category->post_count) { -137: if($this->PostsCategories->delete($category)) -138: $this->Flash->success(__d('me_cms', 'The posts category has been deleted')); -139: else -140: $this->Flash->error(__d('me_cms', 'The posts category could not be deleted')); -141: } -142: else -143: $this->Flash->alert(__d('me_cms', 'Before you delete this category, you have to delete its posts or assign them to another category')); -144: -145: return $this->redirect(['action' => 'index']); -146: } -147: } +133: //Before deleting, it checks if the category has some posts +134: if(!$category->post_count) { +135: if($this->PostsCategories->delete($category)) +136: $this->Flash->success(__d('me_cms', 'The posts category has been deleted')); +137: else +138: $this->Flash->error(__d('me_cms', 'The posts category could not be deleted')); +139: } +140: else +141: $this->Flash->alert(__d('me_cms', 'Before you delete this category, you have to delete its posts or assign them to another category')); +142: +143: return $this->redirect(['action' => 'index']); +144: } +145: }
    - + diff --git a/API/source-class-MeCms.Controller.Admin.PostsController.html b/API/source-class-MeCms.Controller.Admin.PostsController.html index d1794eaf0..17c59339d 100644 --- a/API/source-class-MeCms.Controller.Admin.PostsController.html +++ b/API/source-class-MeCms.Controller.Admin.PostsController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -403,51 +404,49 @@

    Classes

    158: * @param string $id Post ID 159: * @uses MeCms\Controller\Component\AuthComponent::isGroup() 160: * @uses MeCms\Model\Table\PostsTable::buildTagsForRequestData() -161: * @throws \Cake\Network\Exception\NotFoundException -162: */ -163: public function edit($id = NULL) { -164: $post = $this->Posts->findById($id)->contain('Tags')->first(); -165: -166: if($this->request->is(['patch', 'post', 'put'])) { -167: //Only admins and managers can edit posts on behalf of other users -168: if(!$this->Auth->isGroup(['admin', 'manager'])) -169: $this->request->data('user_id', $this->Auth->user('id')); -170: -171: $this->request->data['created'] = new Time($this->request->data('created')); -172: -173: //Sets the request data with tags -174: $data = $this->Posts->buildTagsForRequestData($this->request->data); -175: -176: $post = $this->Posts->patchEntity($post, $data, ['associated' => ['Tags' => ['validate' => FALSE]]]); -177: -178: if($this->Posts->save($post)) { -179: $this->Flash->success(__d('me_cms', 'The post has been saved')); -180: return $this->redirect(['action' => 'index']); -181: } -182: else -183: $this->Flash->error(__d('me_cms', 'The post could not be saved')); -184: } -185: -186: $this->set(compact('post')); -187: } -188: /** -189: * Deletes post -190: * @param string $id Post ID -191: * @throws \Cake\Network\Exception\NotFoundException -192: */ -193: public function delete($id = NULL) { -194: $this->request->allowMethod(['post', 'delete']); +161: */ +162: public function edit($id = NULL) { +163: $post = $this->Posts->findById($id)->contain('Tags')->firstOrFail(); +164: +165: if($this->request->is(['patch', 'post', 'put'])) { +166: //Only admins and managers can edit posts on behalf of other users +167: if(!$this->Auth->isGroup(['admin', 'manager'])) +168: $this->request->data('user_id', $this->Auth->user('id')); +169: +170: $this->request->data['created'] = new Time($this->request->data('created')); +171: +172: //Sets the request data with tags +173: $data = $this->Posts->buildTagsForRequestData($this->request->data); +174: +175: $post = $this->Posts->patchEntity($post, $data, ['associated' => ['Tags' => ['validate' => FALSE]]]); +176: +177: if($this->Posts->save($post)) { +178: $this->Flash->success(__d('me_cms', 'The post has been saved')); +179: return $this->redirect(['action' => 'index']); +180: } +181: else +182: $this->Flash->error(__d('me_cms', 'The post could not be saved')); +183: } +184: +185: $this->set(compact('post')); +186: } +187: /** +188: * Deletes post +189: * @param string $id Post ID +190: */ +191: public function delete($id = NULL) { +192: $this->request->allowMethod(['post', 'delete']); +193: +194: $post = $this->Posts->get($id); 195: -196: $post = $this->Posts->get($id); -197: -198: if($this->Posts->delete($post)) -199: $this->Flash->success(__d('me_cms', 'The post has been deleted')); -200: else -201: $this->Flash->error(__d('me_cms', 'The post could not be deleted')); -202: -203: return $this->redirect(['action' => 'index']); -204: } -205: } +196: if($this->Posts->delete($post)) +197: $this->Flash->success(__d('me_cms', 'The post has been deleted')); +198: else +199: $this->Flash->error(__d('me_cms', 'The post could not be deleted')); +200: +201: return $this->redirect(['action' => 'index']); +202: } +203: }
    - + diff --git a/API/source-class-MeCms.Controller.Admin.PostsTagsController.html b/API/source-class-MeCms.Controller.Admin.PostsTagsController.html index 6ff287ea4..eca12b3df 100644 --- a/API/source-class-MeCms.Controller.Admin.PostsTagsController.html +++ b/API/source-class-MeCms.Controller.Admin.PostsTagsController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -296,6 +297,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Controller.Admin.SystemsController.html b/API/source-class-MeCms.Controller.Admin.SystemsController.html index 3a8baef1f..f2a8c813a 100644 --- a/API/source-class-MeCms.Controller.Admin.SystemsController.html +++ b/API/source-class-MeCms.Controller.Admin.SystemsController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -548,6 +549,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Controller.Admin.TagsController.html b/API/source-class-MeCms.Controller.Admin.TagsController.html index fb05db625..93fa6c16c 100644 --- a/API/source-class-MeCms.Controller.Admin.TagsController.html +++ b/API/source-class-MeCms.Controller.Admin.TagsController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -317,6 +318,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Controller.Admin.UsersController.html b/API/source-class-MeCms.Controller.Admin.UsersController.html index 43a8d9775..7ab6e8171 100644 --- a/API/source-class-MeCms.Controller.Admin.UsersController.html +++ b/API/source-class-MeCms.Controller.Admin.UsersController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -337,7 +338,7 @@

    Classes

    92: ->contain(['Groups' => ['fields' => ['label']]]) 93: ->select(['id', 'username', 'email', 'first_name', 'last_name', 'active', 'banned', 'post_count', 'created']) 94: ->where(['Users.id' => $id]) - 95: ->first() + 95: ->firstOrFail() 96: ); 97: } 98: @@ -365,114 +366,111 @@

    Classes

    120: * Edits user 121: * @param string $id User ID 122: * @uses MeCms\Controller\Component\AuthComponent::isFounder() -123: * @throws \Cake\Network\Exception\NotFoundException -124: */ -125: public function edit($id = NULL) { -126: $user = $this->Users->find() -127: ->select(['id', 'group_id', 'username', 'email', 'first_name', 'last_name', 'active']) -128: ->where(['Users.id' => $id]) -129: ->first(); -130: -131: //Only the admin founder can edit others admin users -132: if($user->group_id === 1 && !$this->Auth->isFounder()) { -133: $this->Flash->alert(__d('me_cms', 'Only the admin founder can edit other admin users')); -134: $this->redirect(['action' => 'index']); -135: } -136: -137: //It prevents a blank password is saved -138: if(!$this->request->data('password')) -139: unset($this->request->data['password'], $this->request->data['password_repeat']); -140: -141: $user = $this->Users->patchEntity($user, $this->request->data, ['validate' => 'EmptyPassword']); -142: -143: if($this->request->is(['patch', 'post', 'put'])) { -144: if($this->Users->save($user)) { -145: $this->Flash->success(__d('me_cms', 'The user has been saved')); -146: return $this->redirect(['action' => 'index']); -147: } -148: else -149: $this->Flash->error(__d('me_cms', 'The user could not be saved')); -150: } -151: -152: $this->set(compact('user')); -153: } -154: /** -155: * Deletes user -156: * @param string $id User ID -157: * @uses MeCms\Controller\Component\AuthComponent::isFounder() -158: * @throws \Cake\Network\Exception\NotFoundException -159: */ -160: public function delete($id = NULL) { -161: $this->request->allowMethod(['post', 'delete']); -162: -163: $user = $this->Users->find() -164: ->select(['id', 'group_id', 'post_count']) -165: ->where(['Users.id' => $id]) -166: ->first(); -167: -168: //You cannot delete the admin founder -169: if($user->id === 1) -170: $this->Flash->error(__d('me_cms', 'You cannot delete the admin founder')); -171: //Only the admin founder can delete others admin users -172: elseif($user->group_id === 1 && !$this->Auth->isFounder()) -173: $this->Flash->alert(__d('me_cms', 'Only the admin founder can edit other admin users')); -174: elseif(!empty($user->post_count)) -175: $this->Flash->alert(__d('me_cms', 'Before you delete this user, you have to delete his posts or assign them to another user')); -176: else { -177: if($this->Users->delete($user)) -178: $this->Flash->success(__d('me_cms', 'The user has been deleted')); -179: else -180: $this->Flash->error(__d('me_cms', 'The user could not be deleted')); -181: } -182: -183: return $this->redirect(['action' => 'index']); -184: } -185: -186: /** -187: * Activates account -188: * @param string $id User ID -189: * @throws \Cake\Network\Exception\NotFoundException -190: */ -191: public function activate($id) { -192: $user = $this->Users->get($id); -193: $user->active = TRUE; -194: -195: if($this->Users->save($user)) -196: $this->Flash->success(__d('me_cms', 'The account has been activated')); -197: else -198: $this->Flash->error(__d('me_cms', 'The account has not been activated')); -199: -200: return $this->redirect(['action' => 'index']); -201: } -202: -203: /** -204: * Changes the user's password -205: * @uses MeCms\Mailer\UserMailer::change_password() -206: */ -207: public function change_password() { -208: $user = $this->Users->find() -209: ->select(['id', 'email', 'first_name', 'last_name']) -210: ->where(['id' => $this->Auth->user('id')]) -211: ->first(); -212: -213: if($this->request->is(['patch', 'post', 'put'])) { -214: $user = $this->Users->patchEntity($user, $this->request->data); -215: -216: if($this->Users->save($user)) { -217: //Sends email -218: $this->getMailer('MeCms.User') -219: ->send('change_password', [$user]); -220: -221: $this->Flash->success(__d('me_cms', 'The password has been edited')); -222: return $this->redirect(['_name' => 'dashboard']); -223: } -224: else -225: $this->Flash->error(__d('me_cms', 'The password has not been edited')); -226: } -227: -228: $this->set(compact('user')); -229: } -230: } +123: */ +124: public function edit($id = NULL) { +125: $user = $this->Users->find() +126: ->select(['id', 'group_id', 'username', 'email', 'first_name', 'last_name', 'active']) +127: ->where(['Users.id' => $id]) +128: ->firstOrFail(); +129: +130: //Only the admin founder can edit others admin users +131: if($user->group_id === 1 && !$this->Auth->isFounder()) { +132: $this->Flash->alert(__d('me_cms', 'Only the admin founder can edit other admin users')); +133: $this->redirect(['action' => 'index']); +134: } +135: +136: //It prevents a blank password is saved +137: if(!$this->request->data('password')) +138: unset($this->request->data['password'], $this->request->data['password_repeat']); +139: +140: $user = $this->Users->patchEntity($user, $this->request->data, ['validate' => 'EmptyPassword']); +141: +142: if($this->request->is(['patch', 'post', 'put'])) { +143: if($this->Users->save($user)) { +144: $this->Flash->success(__d('me_cms', 'The user has been saved')); +145: return $this->redirect(['action' => 'index']); +146: } +147: else +148: $this->Flash->error(__d('me_cms', 'The user could not be saved')); +149: } +150: +151: $this->set(compact('user')); +152: } +153: /** +154: * Deletes user +155: * @param string $id User ID +156: * @uses MeCms\Controller\Component\AuthComponent::isFounder() +157: */ +158: public function delete($id = NULL) { +159: $this->request->allowMethod(['post', 'delete']); +160: +161: $user = $this->Users->find() +162: ->select(['id', 'group_id', 'post_count']) +163: ->where(['Users.id' => $id]) +164: ->firstOrFail(); +165: +166: //You cannot delete the admin founder +167: if($user->id === 1) +168: $this->Flash->error(__d('me_cms', 'You cannot delete the admin founder')); +169: //Only the admin founder can delete others admin users +170: elseif($user->group_id === 1 && !$this->Auth->isFounder()) +171: $this->Flash->alert(__d('me_cms', 'Only the admin founder can edit other admin users')); +172: elseif(!empty($user->post_count)) +173: $this->Flash->alert(__d('me_cms', 'Before you delete this user, you have to delete his posts or assign them to another user')); +174: else { +175: if($this->Users->delete($user)) +176: $this->Flash->success(__d('me_cms', 'The user has been deleted')); +177: else +178: $this->Flash->error(__d('me_cms', 'The user could not be deleted')); +179: } +180: +181: return $this->redirect(['action' => 'index']); +182: } +183: +184: /** +185: * Activates account +186: * @param string $id User ID +187: */ +188: public function activate($id) { +189: $user = $this->Users->get($id); +190: +191: $user->active = TRUE; +192: +193: if($this->Users->save($user)) +194: $this->Flash->success(__d('me_cms', 'The account has been activated')); +195: else +196: $this->Flash->error(__d('me_cms', 'The account has not been activated')); +197: +198: return $this->redirect(['action' => 'index']); +199: } +200: +201: /** +202: * Changes the user's password +203: * @uses MeCms\Mailer\UserMailer::change_password() +204: */ +205: public function change_password() { +206: $user = $this->Users->find() +207: ->select(['id', 'email', 'first_name', 'last_name']) +208: ->where(['id' => $this->Auth->user('id')]) +209: ->firstOrFail(); +210: +211: if($this->request->is(['patch', 'post', 'put'])) { +212: $user = $this->Users->patchEntity($user, $this->request->data); +213: +214: if($this->Users->save($user)) { +215: //Sends email +216: $this->getMailer('MeCms.User')->send('change_password', [$user]); +217: +218: $this->Flash->success(__d('me_cms', 'The password has been edited')); +219: return $this->redirect(['_name' => 'dashboard']); +220: } +221: else +222: $this->Flash->error(__d('me_cms', 'The password has not been edited')); +223: } +224: +225: $this->set(compact('user')); +226: } +227: }
    - + diff --git a/API/source-class-MeCms.Controller.Admin.UsersGroupsController.html b/API/source-class-MeCms.Controller.Admin.UsersGroupsController.html index 3f93c08c5..e5380431e 100644 --- a/API/source-class-MeCms.Controller.Admin.UsersGroupsController.html +++ b/API/source-class-MeCms.Controller.Admin.UsersGroupsController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -292,77 +293,74 @@

    Classes

    47: $this->paginate['order'] = ['name' => 'ASC']; 48: 49: $this->set('groups', $this->paginate( - 50: $this->UsersGroups->find() - 51: ->select(['id', 'name', 'label', 'user_count']) - 52: )); - 53: } - 54: - 55: /** - 56: * Adds users group - 57: */ - 58: public function add() { - 59: $group = $this->UsersGroups->newEntity(); - 60: - 61: if($this->request->is('post')) { - 62: $group = $this->UsersGroups->patchEntity($group, $this->request->data); - 63: - 64: if($this->UsersGroups->save($group)) { - 65: $this->Flash->success(__d('me_cms', 'The users group has been saved')); - 66: return $this->redirect(['action' => 'index']); - 67: } - 68: else - 69: $this->Flash->error(__d('me_cms', 'The users group could not be saved')); - 70: } - 71: - 72: $this->set(compact('group')); - 73: } - 74: - 75: /** - 76: * Edits users group - 77: * @param string $id Users Group ID - 78: * @throws \Cake\Network\Exception\NotFoundException - 79: */ - 80: public function edit($id = NULL) { - 81: $group = $this->UsersGroups->get($id); - 82: - 83: if($this->request->is(['patch', 'post', 'put'])) { - 84: $group = $this->UsersGroups->patchEntity($group, $this->request->data); - 85: - 86: if($this->UsersGroups->save($group)) { - 87: $this->Flash->success(__d('me_cms', 'The users group has been saved')); - 88: return $this->redirect(['action' => 'index']); - 89: } - 90: else - 91: $this->Flash->error(__d('me_cms', 'The users group could not be saved')); - 92: } - 93: - 94: $this->set(compact('group')); - 95: } - 96: /** - 97: * Deletes users group - 98: * @param string $id Users Group ID - 99: * @throws \Cake\Network\Exception\NotFoundException -100: */ -101: public function delete($id = NULL) { -102: $this->request->allowMethod(['post', 'delete']); -103: -104: $group = $this->UsersGroups->get($id); -105: -106: //Before deleting, checks if the group is a necessary group or if the group has some users -107: if($id > 3 && !$group->user_count) { -108: if($this->UsersGroups->delete($group)) -109: $this->Flash->success(__d('me_cms', 'The users group has been deleted')); -110: else -111: $this->Flash->error(__d('me_cms', 'The users group could not be deleted')); -112: } -113: elseif($id <= 3) -114: $this->Flash->alert(__d('me_cms', 'You cannot delete this users group, because it\'s a necessary group')); -115: else -116: $this->Flash->alert(__d('me_cms', 'Before you delete this users group, you have to delete its users or assign them to another group')); -117: -118: return $this->redirect(['action' => 'index']); -119: } -120: } + 50: $this->UsersGroups->find()->select(['id', 'name', 'label', 'user_count']) + 51: )); + 52: } + 53: + 54: /** + 55: * Adds users group + 56: */ + 57: public function add() { + 58: $group = $this->UsersGroups->newEntity(); + 59: + 60: if($this->request->is('post')) { + 61: $group = $this->UsersGroups->patchEntity($group, $this->request->data); + 62: + 63: if($this->UsersGroups->save($group)) { + 64: $this->Flash->success(__d('me_cms', 'The users group has been saved')); + 65: return $this->redirect(['action' => 'index']); + 66: } + 67: else + 68: $this->Flash->error(__d('me_cms', 'The users group could not be saved')); + 69: } + 70: + 71: $this->set(compact('group')); + 72: } + 73: + 74: /** + 75: * Edits users group + 76: * @param string $id Users Group ID + 77: */ + 78: public function edit($id = NULL) { + 79: $group = $this->UsersGroups->get($id); + 80: + 81: if($this->request->is(['patch', 'post', 'put'])) { + 82: $group = $this->UsersGroups->patchEntity($group, $this->request->data); + 83: + 84: if($this->UsersGroups->save($group)) { + 85: $this->Flash->success(__d('me_cms', 'The users group has been saved')); + 86: return $this->redirect(['action' => 'index']); + 87: } + 88: else + 89: $this->Flash->error(__d('me_cms', 'The users group could not be saved')); + 90: } + 91: + 92: $this->set(compact('group')); + 93: } + 94: /** + 95: * Deletes users group + 96: * @param string $id Users Group ID + 97: */ + 98: public function delete($id = NULL) { + 99: $this->request->allowMethod(['post', 'delete']); +100: +101: $group = $this->UsersGroups->get($id); +102: +103: //Before deleting, checks if the group is a necessary group or if the group has some users +104: if($id > 3 && !$group->user_count) { +105: if($this->UsersGroups->delete($group)) +106: $this->Flash->success(__d('me_cms', 'The users group has been deleted')); +107: else +108: $this->Flash->error(__d('me_cms', 'The users group could not be deleted')); +109: } +110: elseif($id <= 3) +111: $this->Flash->alert(__d('me_cms', 'You cannot delete this users group, because it\'s a necessary group')); +112: else +113: $this->Flash->alert(__d('me_cms', 'Before you delete this users group, you have to delete its users or assign them to another group')); +114: +115: return $this->redirect(['action' => 'index']); +116: } +117: }
    - + diff --git a/API/source-class-MeCms.Controller.AppController.html b/API/source-class-MeCms.Controller.AppController.html index bda161644..e2de01b71 100644 --- a/API/source-class-MeCms.Controller.AppController.html +++ b/API/source-class-MeCms.Controller.AppController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -474,6 +475,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Controller.BannersController.html b/API/source-class-MeCms.Controller.BannersController.html index a5727bbc3..e08c506c5 100644 --- a/API/source-class-MeCms.Controller.BannersController.html +++ b/API/source-class-MeCms.Controller.BannersController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -283,11 +284,11 @@

    Classes

    38: $banner = $this->Banners->find('active') 39: ->select(['id', 'target']) 40: ->where(compact('id')) -41: ->limit(1) -42: ->cache(sprintf('view_%s', md5($id)), $this->Banners->cache) -43: ->first(); -44: -45: if(empty($banner) || empty($banner->target)) +41: ->cache(sprintf('view_%s', md5($id)), $this->Banners->cache) +42: ->firstOrFail(); +43: +44: //Checks for banner target +45: if(empty($banner->target)) 46: throw new \Cake\Network\Exception\NotFoundException(__d('me_cms', 'The banner target is missing')); 47: 48: //Increases the click count @@ -305,6 +306,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Controller.Component.AuthComponent.html b/API/source-class-MeCms.Controller.Component.AuthComponent.html index 55688706c..d4cc61d97 100644 --- a/API/source-class-MeCms.Controller.Component.AuthComponent.html +++ b/API/source-class-MeCms.Controller.Component.AuthComponent.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -422,6 +423,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Controller.Component.KcFinderComponent.html b/API/source-class-MeCms.Controller.Component.KcFinderComponent.html index 6e05d4ba5..6010df3ac 100644 --- a/API/source-class-MeCms.Controller.Component.KcFinderComponent.html +++ b/API/source-class-MeCms.Controller.Component.KcFinderComponent.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -407,6 +408,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Controller.Component.SecurityComponent.html b/API/source-class-MeCms.Controller.Component.SecurityComponent.html index d2cc4871f..0a3ce6b5e 100644 --- a/API/source-class-MeCms.Controller.Component.SecurityComponent.html +++ b/API/source-class-MeCms.Controller.Component.SecurityComponent.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -308,6 +309,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Controller.PagesController.html b/API/source-class-MeCms.Controller.PagesController.html index 032ba9d30..a906fef79 100644 --- a/API/source-class-MeCms.Controller.PagesController.html +++ b/API/source-class-MeCms.Controller.PagesController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -313,7 +314,7 @@

    Classes

    68: ->select(['title', 'subtitle', 'slug', 'text', 'created']) 69: ->where(compact('slug')) 70: ->cache(sprintf('view_%s', md5($slug)), $this->Pages->cache) -71: ->first()); +71: ->firstOrFail()); 72: } 73: } @@ -323,6 +324,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Controller.PhotosAlbumsController.html b/API/source-class-MeCms.Controller.PhotosAlbumsController.html index 6ea89de1a..652f48d8a 100644 --- a/API/source-class-MeCms.Controller.PhotosAlbumsController.html +++ b/API/source-class-MeCms.Controller.PhotosAlbumsController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -305,16 +306,14 @@

    Classes

    60: $this->redirect([$this->request->query('q')]); 61: 62: $this->set('album', $this->PhotosAlbums->find('active') -63: ->contain(['Photos' => [ -64: 'fields' => ['id', 'album_id', 'filename', 'description'] -65: ]]) -66: ->select(['id', 'title']) -67: ->where(compact('slug')) -68: ->cache(sprintf('albums_view_%s', md5($slug)), $this->PhotosAlbums->cache) -69: ->first() -70: ); -71: } -72: } +63: ->contain(['Photos' => ['fields' => ['id', 'album_id', 'filename', 'description']]]) +64: ->select(['id', 'title']) +65: ->where(compact('slug')) +66: ->cache(sprintf('albums_view_%s', md5($slug)), $this->PhotosAlbums->cache) +67: ->firstOrFail() +68: ); +69: } +70: }
    - + diff --git a/API/source-class-MeCms.Controller.PhotosController.html b/API/source-class-MeCms.Controller.PhotosController.html index 418dcfa83..469a34c00 100644 --- a/API/source-class-MeCms.Controller.PhotosController.html +++ b/API/source-class-MeCms.Controller.PhotosController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -284,7 +285,7 @@

    Classes

    39: ->select(['album_id', 'filename']) 40: ->where(compact('id')) 41: ->cache(sprintf('view_%s', md5($id)), $this->Photos->cache) -42: ->first() +42: ->firstOrFail() 43: ); 44: } 45: } @@ -295,6 +296,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Controller.PostsCategoriesController.html b/API/source-class-MeCms.Controller.PostsCategoriesController.html index 5c294e07e..be0b738f6 100644 --- a/API/source-class-MeCms.Controller.PostsCategoriesController.html +++ b/API/source-class-MeCms.Controller.PostsCategoriesController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -268,70 +269,74 @@

    Classes

    23: namespace MeCms\Controller; 24: 25: use Cake\Cache\Cache; -26: use MeCms\Controller\AppController; -27: -28: /** -29: * PostsCategories controller -30: * @property \MeCms\Model\Table\PostsCategoriesTable $PostsCategories -31: */ -32: class PostsCategoriesController extends AppController { -33: /** -34: * Lists posts categories -35: */ -36: public function index() { -37: $this->set('categories', $this->PostsCategories->find('active') -38: ->select(['title', 'slug']) -39: ->order(['title' => 'ASC']) -40: ->cache('categories_index', $this->PostsCategories->cache) -41: ->all()); -42: } -43: -44: /** -45: * Lists posts for a category -46: * @param string $category Category slug -47: * @uses MeCms\Model\Table\PostsTable::checkIfCacheIsValid() -48: */ -49: public function view($category = NULL) { -50: //The category can be passed as query string, from a widget -51: if($this->request->query('q')) -52: $this->redirect([$this->request->query('q')]); -53: -54: //Checks if the cache is valid -55: $this->PostsCategories->Posts->checkIfCacheIsValid(); -56: -57: //Sets the cache name -58: $cache = sprintf('index_category_%s_limit_%s_page_%s', md5($category), $this->paginate['limit'], $this->request->query('page') ? $this->request->query('page') : 1); -59: -60: //Tries to get data from the cache -61: list($posts, $paging) = array_values(Cache::readMany([$cache, sprintf('%s_paging', $cache)], $this->PostsCategories->cache)); -62: -63: //If the data are not available from the cache -64: if(empty($posts) || empty($paging)) { -65: $posts = $this->paginate( -66: $this->PostsCategories->Posts->find('active') -67: ->contain([ -68: 'Categories' => ['fields' => ['title', 'slug']], -69: 'Tags', -70: 'Users' => ['fields' => ['first_name', 'last_name']] -71: ]) -72: ->select(['id', 'title', 'subtitle', 'slug', 'text', 'created']) -73: ->where(['Categories.slug' => $category]) -74: ->order([sprintf('%s.created', $this->PostsCategories->Posts->alias()) => 'DESC']) -75: )->toArray(); -76: -77: //Writes on cache -78: Cache::writeMany([$cache => $posts, sprintf('%s_paging', $cache) => $this->request->param('paging')], $this->PostsCategories->cache); -79: } -80: //Else, sets the paging parameter -81: else -82: $this->request->params['paging'] = $paging; -83: -84: $this->set(compact('posts')); -85: -86: //Renders on a different view -87: $this->render('Posts/index'); -88: } -89: } +26: use Cake\Datasource\Exception\RecordNotFoundException; +27: use MeCms\Controller\AppController; +28: +29: /** +30: * PostsCategories controller +31: * @property \MeCms\Model\Table\PostsCategoriesTable $PostsCategories +32: */ +33: class PostsCategoriesController extends AppController { +34: /** +35: * Lists posts categories +36: */ +37: public function index() { +38: $this->set('categories', $this->PostsCategories->find('active') +39: ->select(['title', 'slug']) +40: ->order(['title' => 'ASC']) +41: ->cache('categories_index', $this->PostsCategories->cache) +42: ->all()); +43: } +44: +45: /** +46: * Lists posts for a category +47: * @param string $category Category slug +48: * @uses MeCms\Model\Table\PostsTable::checkIfCacheIsValid() +49: */ +50: public function view($category = NULL) { +51: //The category can be passed as query string, from a widget +52: if($this->request->query('q')) +53: $this->redirect([$this->request->query('q')]); +54: +55: //Checks if the cache is valid +56: $this->PostsCategories->Posts->checkIfCacheIsValid(); +57: +58: //Sets the cache name +59: $cache = sprintf('index_category_%s_limit_%s_page_%s', md5($category), $this->paginate['limit'], $this->request->query('page') ? $this->request->query('page') : 1); +60: +61: //Tries to get data from the cache +62: list($posts, $paging) = array_values(Cache::readMany([$cache, sprintf('%s_paging', $cache)], $this->PostsCategories->cache)); +63: +64: //If the data are not available from the cache +65: if(empty($posts) || empty($paging)) { +66: $query = $this->PostsCategories->Posts->find('active') +67: ->contain([ +68: 'Categories' => ['fields' => ['title', 'slug']], +69: 'Tags', +70: 'Users' => ['fields' => ['first_name', 'last_name']] +71: ]) +72: ->select(['id', 'title', 'subtitle', 'slug', 'text', 'created']) +73: ->where(['Categories.slug' => $category]) +74: ->order([sprintf('%s.created', $this->PostsCategories->Posts->alias()) => 'DESC']); +75: +76: if($query->isEmpty()) +77: throw new RecordNotFoundException(__d('me_cms', 'Record not found')); +78: +79: $posts = $this->paginate($query)->toArray(); +80: +81: //Writes on cache +82: Cache::writeMany([$cache => $posts, sprintf('%s_paging', $cache) => $this->request->param('paging')], $this->PostsCategories->cache); +83: } +84: //Else, sets the paging parameter +85: else +86: $this->request->params['paging'] = $paging; +87: +88: $this->set(compact('posts')); +89: +90: //Renders on a different view +91: $this->render('Posts/index'); +92: } +93: }
    - + diff --git a/API/source-class-MeCms.Controller.PostsController.html b/API/source-class-MeCms.Controller.PostsController.html index 65fe73a1b..9e0e6de75 100644 --- a/API/source-class-MeCms.Controller.PostsController.html +++ b/API/source-class-MeCms.Controller.PostsController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -465,7 +466,7 @@

    Classes

    220: ->select(['id', 'title', 'subtitle', 'slug', 'text', 'created']) 221: ->where([sprintf('%s.slug', $this->Posts->alias()) => $slug]) 222: ->cache(sprintf('view_%s', md5($slug)), $this->Posts->cache) -223: ->first()); +223: ->firstOrFail()); 224: 225: //Gets related posts 226: if(config('post.related.limit')) @@ -479,6 +480,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Controller.PostsTagsController.html b/API/source-class-MeCms.Controller.PostsTagsController.html index 96c0fbc97..2712efe96 100644 --- a/API/source-class-MeCms.Controller.PostsTagsController.html +++ b/API/source-class-MeCms.Controller.PostsTagsController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -268,61 +269,65 @@

    Classes

    23: namespace MeCms\Controller; 24: 25: use Cake\Cache\Cache; -26: use MeCms\Controller\AppController; -27: -28: /** -29: * PostsTags controller -30: * @property \MeCms\Model\Table\PostsTagsTable $PostsTags -31: */ -32: class PostsTagsController extends AppController { -33: /** -34: * Lists posts for a tag -35: * @param string $tag Tag name -36: * @uses MeCms\Model\Table\PostsTable::checkIfCacheIsValid() -37: */ -38: public function view($tag) { -39: //Checks if the cache is valid -40: $this->PostsTags->Posts->checkIfCacheIsValid(); -41: -42: //Sets the initial cache name -43: $cache = sprintf('index_tag_%s', md5($tag)); -44: -45: //Updates the cache name with the query limit and the number of the page -46: $cache = sprintf('%s_limit_%s', $cache, $this->paginate['limit']); -47: $cache = sprintf('%s_page_%s', $cache, $this->request->query('page') ? $this->request->query('page') : 1); -48: -49: //Tries to get data from the cache -50: list($posts, $paging) = array_values(Cache::readMany([$cache, sprintf('%s_paging', $cache)], $this->PostsTags->cache)); -51: -52: //If the data are not available from the cache -53: if(empty($posts) || empty($paging)) { -54: $posts = $this->paginate( -55: $this->PostsTags->Posts->find('active') -56: ->contain([ -57: 'Categories' => ['fields' => ['title', 'slug']], -58: 'Tags', -59: 'Users' => ['fields' => ['first_name', 'last_name']] -60: ]) -61: ->matching('Tags', function ($q) use ($tag) { -62: return $q->where(['Tags.tag' => $tag]); -63: }) -64: ->select(['id', 'title', 'subtitle', 'slug', 'text', 'created']) -65: ->order([sprintf('%s.created', $this->PostsTags->Posts->alias()) => 'DESC']) -66: )->toArray(); -67: -68: //Writes on cache -69: Cache::writeMany([$cache => $posts, sprintf('%s_paging', $cache) => $this->request->param('paging')], $this->PostsTags->cache); -70: } -71: //Else, sets the paging parameter -72: else -73: $this->request->params['paging'] = $paging; -74: -75: $this->set(compact('posts')); -76: -77: //Renders on a different view -78: $this->render('Posts/index'); -79: } -80: } +26: use Cake\Datasource\Exception\RecordNotFoundException; +27: use MeCms\Controller\AppController; +28: +29: /** +30: * PostsTags controller +31: * @property \MeCms\Model\Table\PostsTagsTable $PostsTags +32: */ +33: class PostsTagsController extends AppController { +34: /** +35: * Lists posts for a tag +36: * @param string $tag Tag name +37: * @uses MeCms\Model\Table\PostsTable::checkIfCacheIsValid() +38: */ +39: public function view($tag) { +40: //Checks if the cache is valid +41: $this->PostsTags->Posts->checkIfCacheIsValid(); +42: +43: //Sets the initial cache name +44: $cache = sprintf('index_tag_%s', md5($tag)); +45: +46: //Updates the cache name with the query limit and the number of the page +47: $cache = sprintf('%s_limit_%s', $cache, $this->paginate['limit']); +48: $cache = sprintf('%s_page_%s', $cache, $this->request->query('page') ? $this->request->query('page') : 1); +49: +50: //Tries to get data from the cache +51: list($posts, $paging) = array_values(Cache::readMany([$cache, sprintf('%s_paging', $cache)], $this->PostsTags->cache)); +52: +53: //If the data are not available from the cache +54: if(empty($posts) || empty($paging)) { +55: $query = $this->PostsTags->Posts->find('active') +56: ->contain([ +57: 'Categories' => ['fields' => ['title', 'slug']], +58: 'Tags', +59: 'Users' => ['fields' => ['first_name', 'last_name']] +60: ]) +61: ->matching('Tags', function ($q) use ($tag) { +62: return $q->where(['Tags.tag' => $tag]); +63: }) +64: ->select(['id', 'title', 'subtitle', 'slug', 'text', 'created']) +65: ->order([sprintf('%s.created', $this->PostsTags->Posts->alias()) => 'DESC']); +66: +67: if($query->isEmpty()) +68: throw new RecordNotFoundException(__d('me_cms', 'Record not found')); +69: +70: $posts = $this->paginate($query)->toArray(); +71: +72: //Writes on cache +73: Cache::writeMany([$cache => $posts, sprintf('%s_paging', $cache) => $this->request->param('paging')], $this->PostsTags->cache); +74: } +75: //Else, sets the paging parameter +76: else +77: $this->request->params['paging'] = $paging; +78: +79: $this->set(compact('posts')); +80: +81: //Renders on a different view +82: $this->render('Posts/index'); +83: } +84: }
    - + diff --git a/API/source-class-MeCms.Controller.SystemsController.html b/API/source-class-MeCms.Controller.SystemsController.html index 18667ef58..07f67aa14 100644 --- a/API/source-class-MeCms.Controller.SystemsController.html +++ b/API/source-class-MeCms.Controller.SystemsController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -338,6 +339,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Controller.UsersController.html b/API/source-class-MeCms.Controller.UsersController.html index ae17bed06..1eec97355 100644 --- a/API/source-class-MeCms.Controller.UsersController.html +++ b/API/source-class-MeCms.Controller.UsersController.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -368,10 +369,10 @@

    Classes

    123: ->where(compact('id')) 124: ->first(); 125: -126: $user->active = TRUE; -127: -128: if(empty($user)) -129: throw new \Cake\Network\Exception\NotFoundException(__d('me_cms', 'No account found')); +126: if($user->isEmpty()) +127: throw new \Cake\Network\Exception\NotFoundException(__d('me_cms', 'No account found')); +128: +129: $user->active = TRUE; 130: 131: if($this->Users->save($user)) { 132: //Deletes the token @@ -412,7 +413,7 @@

    Classes

    167: ->where(['email' => $this->request->data('email')]) 168: ->first(); 169: -170: if(!empty($user)) { +170: if(!$user->isEmpty()) { 171: //Gets the token 172: $token = $this->Token->create($user->email, ['type' => 'forgot_password', 'user_id' => $user->id]); 173: @@ -433,224 +434,223 @@

    Classes

    188: else 189: $entity = $this->Users->newEntity(NULL, ['validate' => 'NotUnique']); 190: -191: -192: $this->set('user', $entity); -193: -194: $this->viewBuilder()->layout('login'); -195: } -196: -197: /** -198: * Login -199: * @return boolean -200: * @uses _loginWithCookie() -201: */ -202: public function login() { -203: //Tries to login with cookies, if the login with cookies is enabled -204: if(config('users.cookies_login')) -205: $this->_loginWithCookie(); -206: -207: if($this->request->is('post')) { -208: if($user = $this->Auth->identify()) { -209: //Checks if the user is banned or if is disabled (the account should still be enabled) -210: if($user['banned'] || !$user['active']) { -211: if($user['banned']) -212: $this->Flash->error(__d('me_cms', 'Your account has been banned by an admin')); -213: elseif(!$user['active']) -214: $this->Flash->error(__d('me_cms', 'Your account has not been activated yet')); -215: -216: return $this->_logout(); -217: } -218: -219: //Saves the login data in a cookie, if it was requested -220: if($this->request->data('remember_me')) -221: $this->Cookie->config(['expires' => '+365 days']) -222: ->write('login', ['username' => $this->request->data('username'), 'password' => $this->request->data('password')]); -223: -224: $this->Auth->setUser($user); -225: return $this->redirect($this->Auth->redirectUrl()); -226: } -227: else -228: $this->Flash->error(__d('me_cms', 'Invalid username or password')); -229: } -230: -231: $this->viewBuilder()->layout('login'); -232: } -233: -234: /** -235: * Logout -236: * @return bool -237: * @uses _logout() -238: */ -239: public function logout() { -240: $this->Flash->success(__d('me_cms', 'You are successfully logged out')); -241: -242: return $this->_logout(); -243: } -244: -245: /** -246: * Resends the activation mail -247: * @uses MeTools\Controller\Component\Recaptcha::check() -248: * @uses MeTools\Controller\Component\Recaptcha::getError() -249: * @uses _send_activation_mail() -250: */ -251: public function resend_activation() { -252: //Checks if signup is enabled and if accounts will be enabled by the user via email -253: if(!config('users.signup') && config('users.activation') === 1) { -254: $this->Flash->error(__d('me_cms', 'Disabled')); -255: $this->redirect(['_name' => 'login']); -256: } -257: -258: if($this->request->is('post')) { -259: $entity = $this->Users->newEntity($this->request->data(), ['validate' => 'NotUnique']); -260: -261: //Checks for reCAPTCHA, if requested -262: if(config('security.recaptcha') && !$this->Recaptcha->check()) { -263: $this->Flash->error($this->Recaptcha->getError()); -264: } -265: elseif(!$entity->errors()) { -266: $user = $this->Users->find('pending') -267: ->select(['id', 'email', 'first_name', 'last_name']) -268: ->where(['email' => $this->request->data('email')]) -269: ->first(); -270: -271: if(!empty($user)) { -272: //Sends the activation mail -273: $this->_send_activation_mail($user); -274: -275: $this->Flash->success(__d('me_cms', 'We send you an email to activate your account')); -276: $this->redirect(['_name' => 'login']); -277: } -278: else -279: $this->Flash->error(__d('me_cms', 'No account found')); -280: } -281: else -282: $this->Flash->error(__d('me_cms', 'The form has not been filled in correctly')); -283: } -284: else -285: $entity = $this->Users->newEntity(NULL, ['validate' => 'OnlyCheck']); -286: -287: $this->set('user', $entity); -288: -289: $this->viewBuilder()->layout('login'); -290: } -291: -292: /** -293: * Resets password -294: * @param string $id User ID -295: * @param string $token Token -296: * @uses MeTools\Controller\Component\Token::check() -297: * @uses MeTools\Controller\Component\Token::delete() -298: * @throws \Cake\Network\Exception\NotFoundException -299: */ -300: public function reset_password($id, $token) { -301: //Checks for token -302: if(!$this->Token->check($token, ['type' => 'forgot_password', 'user_id' => $id])) { -303: $this->Flash->error(__d('me_cms', 'Invalid token')); -304: $this->redirect(['_name' => 'login']); -305: } -306: -307: $user = $this->Users->find('active') -308: ->select(['id']) -309: ->where(compact('id')) -310: ->first(); -311: -312: if(empty($user)) -313: throw new \Cake\Network\Exception\NotFoundException(__d('me_cms', 'No account found')); -314: -315: if($this->request->is(['patch', 'post', 'put'])) { -316: $user = $this->Users->patchEntity($user, $this->request->data); -317: -318: if($this->Users->save($user)) { -319: //Deletes the token -320: $this->Token->delete($token); -321: -322: $this->Flash->success(__d('me_cms', 'The password has been edited')); -323: $this->redirect(['_name' => 'login']); -324: } -325: else -326: $this->Flash->error(__d('me_cms', 'The password has not been edited')); -327: } -328: -329: $this->set(compact('user')); -330: -331: $this->viewBuilder()->layout('login'); -332: } -333: -334: /** -335: * Internal function to send the activation mail -336: * @param object $user Users entity -337: * @return boolean -338: * @uses MeCms\Mailer\UserMailer::activation_mail() -339: * @uses MeCms\Network\Email\Email -340: * @uses MeTools\Controller\Component\Token::create() -341: */ -342: protected function _send_activation_mail($user) { -343: //Gets the token -344: $token = $this->Token->create($user->email, ['type' => 'signup', 'user_id' => $user->id]); -345: -346: //Sends email -347: return $this->getMailer('MeCms.User') -348: ->set('url', Router::url(['_name' => 'activate_account', $user->id, $token], TRUE)) -349: ->send('activation_mail', [$user]); -350: } -351: -352: /** -353: * Sign up -354: * @uses MeTools\Controller\Component\Recaptcha::check() -355: * @uses MeTools\Controller\Component\Recaptcha::getError() -356: * @uses _send_activation_mail() -357: */ -358: public function signup() { -359: //Checks if signup is enabled -360: if(!config('users.signup')) { -361: $this->Flash->error(__d('me_cms', 'Disabled')); -362: $this->redirect(['_name' => 'login']); -363: } -364: -365: $this->request->data += [ -366: 'group_id' => config('users.default_group'), -367: 'active' => (bool) !config('users.activation') -368: ]; -369: -370: $user = $this->Users->newEntity(); -371: -372: if($this->request->is('post')) { -373: $user = $this->Users->patchEntity($user, $this->request->data); -374: -375: //Checks for reCAPTCHA, if requested -376: if(config('security.recaptcha') && !$this->Recaptcha->check()) { -377: $this->Flash->error($this->Recaptcha->getError()); -378: } -379: elseif($this->Users->save($user)) { -380: switch(config('users.activation')) { -381: //The account will be enabled by an administrator -382: case 2: -383: $this->Flash->success(__d('me_cms', 'The account has been created, but it needs to be activated by an admin')); -384: break; -385: //The account will be enabled by the user via email (default) -386: case 1: -387: //Sends the activation mail -388: $this->_send_activation_mail($user); -389: -390: $this->Flash->success(__d('me_cms', 'We send you an email to activate your account')); -391: break; -392: //No activation required, the account is immediately active -393: default: -394: $this->Flash->success(__d('me_cms', 'Account created. Now you can login')); -395: break; -396: } -397: -398: return $this->redirect(['action' => 'index']); -399: } -400: else -401: $this->Flash->error(__d('me_cms', 'The account has not been created')); -402: } -403: -404: $this->set(compact('user')); -405: -406: $this->viewBuilder()->layout('login'); -407: } -408: } +191: $this->set('user', $entity); +192: +193: $this->viewBuilder()->layout('login'); +194: } +195: +196: /** +197: * Login +198: * @return boolean +199: * @uses _loginWithCookie() +200: */ +201: public function login() { +202: //Tries to login with cookies, if the login with cookies is enabled +203: if(config('users.cookies_login')) +204: $this->_loginWithCookie(); +205: +206: if($this->request->is('post')) { +207: if($user = $this->Auth->identify()) { +208: //Checks if the user is banned or if is disabled (the account should still be enabled) +209: if($user['banned'] || !$user['active']) { +210: if($user['banned']) +211: $this->Flash->error(__d('me_cms', 'Your account has been banned by an admin')); +212: elseif(!$user['active']) +213: $this->Flash->error(__d('me_cms', 'Your account has not been activated yet')); +214: +215: return $this->_logout(); +216: } +217: +218: //Saves the login data in a cookie, if it was requested +219: if($this->request->data('remember_me')) +220: $this->Cookie->config(['expires' => '+365 days']) +221: ->write('login', ['username' => $this->request->data('username'), 'password' => $this->request->data('password')]); +222: +223: $this->Auth->setUser($user); +224: return $this->redirect($this->Auth->redirectUrl()); +225: } +226: else +227: $this->Flash->error(__d('me_cms', 'Invalid username or password')); +228: } +229: +230: $this->viewBuilder()->layout('login'); +231: } +232: +233: /** +234: * Logout +235: * @return bool +236: * @uses _logout() +237: */ +238: public function logout() { +239: $this->Flash->success(__d('me_cms', 'You are successfully logged out')); +240: +241: return $this->_logout(); +242: } +243: +244: /** +245: * Resends the activation mail +246: * @uses MeTools\Controller\Component\Recaptcha::check() +247: * @uses MeTools\Controller\Component\Recaptcha::getError() +248: * @uses _send_activation_mail() +249: */ +250: public function resend_activation() { +251: //Checks if signup is enabled and if accounts will be enabled by the user via email +252: if(!config('users.signup') && config('users.activation') === 1) { +253: $this->Flash->error(__d('me_cms', 'Disabled')); +254: $this->redirect(['_name' => 'login']); +255: } +256: +257: if($this->request->is('post')) { +258: $entity = $this->Users->newEntity($this->request->data(), ['validate' => 'NotUnique']); +259: +260: //Checks for reCAPTCHA, if requested +261: if(config('security.recaptcha') && !$this->Recaptcha->check()) { +262: $this->Flash->error($this->Recaptcha->getError()); +263: } +264: elseif(!$entity->errors()) { +265: $user = $this->Users->find('pending') +266: ->select(['id', 'email', 'first_name', 'last_name']) +267: ->where(['email' => $this->request->data('email')]) +268: ->first(); +269: +270: if(!$user->isEmpty()) { +271: //Sends the activation mail +272: $this->_send_activation_mail($user); +273: +274: $this->Flash->success(__d('me_cms', 'We send you an email to activate your account')); +275: $this->redirect(['_name' => 'login']); +276: } +277: else +278: $this->Flash->error(__d('me_cms', 'No account found')); +279: } +280: else +281: $this->Flash->error(__d('me_cms', 'The form has not been filled in correctly')); +282: } +283: else +284: $entity = $this->Users->newEntity(NULL, ['validate' => 'OnlyCheck']); +285: +286: $this->set('user', $entity); +287: +288: $this->viewBuilder()->layout('login'); +289: } +290: +291: /** +292: * Resets password +293: * @param string $id User ID +294: * @param string $token Token +295: * @uses MeTools\Controller\Component\Token::check() +296: * @uses MeTools\Controller\Component\Token::delete() +297: * @throws \Cake\Network\Exception\NotFoundException +298: */ +299: public function reset_password($id, $token) { +300: //Checks for token +301: if(!$this->Token->check($token, ['type' => 'forgot_password', 'user_id' => $id])) { +302: $this->Flash->error(__d('me_cms', 'Invalid token')); +303: $this->redirect(['_name' => 'login']); +304: } +305: +306: $user = $this->Users->find('active') +307: ->select(['id']) +308: ->where(compact('id')) +309: ->first(); +310: +311: if($user->isEmpty()) +312: throw new \Cake\Network\Exception\NotFoundException(__d('me_cms', 'No account found')); +313: +314: if($this->request->is(['patch', 'post', 'put'])) { +315: $user = $this->Users->patchEntity($user, $this->request->data); +316: +317: if($this->Users->save($user)) { +318: //Deletes the token +319: $this->Token->delete($token); +320: +321: $this->Flash->success(__d('me_cms', 'The password has been edited')); +322: $this->redirect(['_name' => 'login']); +323: } +324: else +325: $this->Flash->error(__d('me_cms', 'The password has not been edited')); +326: } +327: +328: $this->set(compact('user')); +329: +330: $this->viewBuilder()->layout('login'); +331: } +332: +333: /** +334: * Internal function to send the activation mail +335: * @param object $user Users entity +336: * @return boolean +337: * @uses MeCms\Mailer\UserMailer::activation_mail() +338: * @uses MeCms\Network\Email\Email +339: * @uses MeTools\Controller\Component\Token::create() +340: */ +341: protected function _send_activation_mail($user) { +342: //Gets the token +343: $token = $this->Token->create($user->email, ['type' => 'signup', 'user_id' => $user->id]); +344: +345: //Sends email +346: return $this->getMailer('MeCms.User') +347: ->set('url', Router::url(['_name' => 'activate_account', $user->id, $token], TRUE)) +348: ->send('activation_mail', [$user]); +349: } +350: +351: /** +352: * Sign up +353: * @uses MeTools\Controller\Component\Recaptcha::check() +354: * @uses MeTools\Controller\Component\Recaptcha::getError() +355: * @uses _send_activation_mail() +356: */ +357: public function signup() { +358: //Checks if signup is enabled +359: if(!config('users.signup')) { +360: $this->Flash->error(__d('me_cms', 'Disabled')); +361: $this->redirect(['_name' => 'login']); +362: } +363: +364: $this->request->data += [ +365: 'group_id' => config('users.default_group'), +366: 'active' => (bool) !config('users.activation') +367: ]; +368: +369: $user = $this->Users->newEntity(); +370: +371: if($this->request->is('post')) { +372: $user = $this->Users->patchEntity($user, $this->request->data); +373: +374: //Checks for reCAPTCHA, if requested +375: if(config('security.recaptcha') && !$this->Recaptcha->check()) { +376: $this->Flash->error($this->Recaptcha->getError()); +377: } +378: elseif($this->Users->save($user)) { +379: switch(config('users.activation')) { +380: //The account will be enabled by an administrator +381: case 2: +382: $this->Flash->success(__d('me_cms', 'The account has been created, but it needs to be activated by an admin')); +383: break; +384: //The account will be enabled by the user via email (default) +385: case 1: +386: //Sends the activation mail +387: $this->_send_activation_mail($user); +388: +389: $this->Flash->success(__d('me_cms', 'We send you an email to activate your account')); +390: break; +391: //No activation required, the account is immediately active +392: default: +393: $this->Flash->success(__d('me_cms', 'Account created. Now you can login')); +394: break; +395: } +396: +397: return $this->redirect(['action' => 'index']); +398: } +399: else +400: $this->Flash->error(__d('me_cms', 'The account has not been created')); +401: } +402: +403: $this->set(compact('user')); +404: +405: $this->viewBuilder()->layout('login'); +406: } +407: }
    - + diff --git a/API/source-class-MeCms.Error.ExceptionRenderer.html b/API/source-class-MeCms.Error.ExceptionRenderer.html index b499d563e..9b99ca1ac 100644 --- a/API/source-class-MeCms.Error.ExceptionRenderer.html +++ b/API/source-class-MeCms.Error.ExceptionRenderer.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -262,7 +263,7 @@

    Classes

    17: * 18: * @author Mirko Pagliai <mirko.pagliai@gmail.com> 19: * @copyright Copyright (c) 2016, Mirko Pagliai for Nova Atlantis Ltd -20: * @license http://www.gnu.org/licenses/agpl.txt AGPL License +20: * @license http://www.gnu.org/licenses/agpl.txt AGPL License 21: * @link http://git.novatlantis.it Nova Atlantis Ltd 22: * @see http://api.cakephp.org/3.1/class-Cake.Error.ExceptionRenderer.html ExceptionRenderer 23: */ @@ -277,52 +278,53 @@

    Classes

    32: * If an uncaught exception is thrown and it is a type that ExceptionHandler does not know about it will be treated as a 500 error. 33: * 34: * Rewrites {@link http://api.cakephp.org/3.1/class-Cake.Error.ExceptionRenderer.html ExceptionRenderer}. -35: */ -36: class ExceptionRenderer extends BaseExceptionRenderer { -37: /** -38: * Generate the response using the controller object -39: * @param string $template The template to render -40: * @return Cake\Network\Response A response object that can be sent -41: * @uses Cake\Error\ExceptionRenderer::_outputMessage() -42: */ -43: protected function _outputMessage($template) { -44: list($plugin, $template) = pluginSplit($template); -45: -46: //Sets template from MeCms -47: if(empty($plugin)) -48: $template = sprintf('MeCms.%s', $template); -49: -50: return parent::_outputMessage($template); -51: } -52: -53: /** -54: * A safer way to render error messages, replaces all helpers, with basics and doesn't call component methods -55: * @param string $template The template to render -56: * @return Cake\Network\Response A response object that can be sent -57: * @uses Cake\Error\ExceptionRenderer::_outputMessageSafe() -58: */ -59: protected function _outputMessageSafe($template) { -60: list($plugin, $template) = pluginSplit($template); -61: -62: //Sets template from MeCms -63: if(empty($plugin)) -64: $template = sprintf('MeCms.%s', $template); -65: -66: return parent::_outputMessageSafe($template); -67: } -68: -69: /** -70: * Renders the response for the exception -71: * @return Cake\Network\Response The response to be sent -72: * @uses Cake\Error\ExceptionRenderer::render() -73: */ -74: public function render() { -75: //Sets layout from MeCms -76: $this->controller->viewBuilder()->layout('MeCms.error'); -77: -78: return parent::render(); -79: } -80: } +35: * This allow to use the error layout and the error templates provided by MeCms. +36: */ +37: class ExceptionRenderer extends BaseExceptionRenderer { +38: /** +39: * Generate the response using the controller object +40: * @param string $template The template to render +41: * @return Cake\Network\Response A response object that can be sent +42: * @uses Cake\Error\ExceptionRenderer::_outputMessage() +43: */ +44: protected function _outputMessage($template) { +45: list($plugin, $template) = pluginSplit($template); +46: +47: //Sets template from MeCms +48: if(empty($plugin)) +49: $template = sprintf('MeCms.%s', $template); +50: +51: return parent::_outputMessage($template); +52: } +53: +54: /** +55: * A safer way to render error messages, replaces all helpers, with basics and doesn't call component methods +56: * @param string $template The template to render +57: * @return Cake\Network\Response A response object that can be sent +58: * @uses Cake\Error\ExceptionRenderer::_outputMessageSafe() +59: */ +60: protected function _outputMessageSafe($template) { +61: list($plugin, $template) = pluginSplit($template); +62: +63: //Sets template from MeCms +64: if(empty($plugin)) +65: $template = sprintf('MeCms.%s', $template); +66: +67: return parent::_outputMessageSafe($template); +68: } +69: +70: /** +71: * Renders the response for the exception +72: * @return Cake\Network\Response The response to be sent +73: * @uses Cake\Error\ExceptionRenderer::render() +74: */ +75: public function render() { +76: //Sets layout from MeCms +77: $this->controller->viewBuilder()->layout('MeCms.error'); +78: +79: return parent::render(); +80: } +81: }
    - + diff --git a/API/source-class-MeCms.Form.ContactForm.html b/API/source-class-MeCms.Form.ContactForm.html index cd42e087d..5d3dd2c76 100644 --- a/API/source-class-MeCms.Form.ContactForm.html +++ b/API/source-class-MeCms.Form.ContactForm.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -326,6 +327,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Mailer.Mailer.html b/API/source-class-MeCms.Mailer.Mailer.html index 7b9f9cdcb..25621804f 100644 --- a/API/source-class-MeCms.Mailer.Mailer.html +++ b/API/source-class-MeCms.Mailer.Mailer.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -299,6 +300,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Mailer.UserMailer.html b/API/source-class-MeCms.Mailer.UserMailer.html index 98c8bb246..17924c9cc 100644 --- a/API/source-class-MeCms.Mailer.UserMailer.html +++ b/API/source-class-MeCms.Mailer.UserMailer.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -317,6 +318,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Behavior.TreeBehavior.html b/API/source-class-MeCms.Model.Behavior.TreeBehavior.html index 3e81b4c33..55639a0a8 100644 --- a/API/source-class-MeCms.Model.Behavior.TreeBehavior.html +++ b/API/source-class-MeCms.Model.Behavior.TreeBehavior.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -304,6 +305,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Entity.Banner.html b/API/source-class-MeCms.Model.Entity.Banner.html index 578894321..56920971a 100644 --- a/API/source-class-MeCms.Model.Entity.Banner.html +++ b/API/source-class-MeCms.Model.Entity.Banner.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -313,6 +314,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Entity.BannersPosition.html b/API/source-class-MeCms.Model.Entity.BannersPosition.html index 7fc3340c2..fff88ad6d 100644 --- a/API/source-class-MeCms.Model.Entity.BannersPosition.html +++ b/API/source-class-MeCms.Model.Entity.BannersPosition.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -294,6 +295,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Entity.Page.html b/API/source-class-MeCms.Model.Entity.Page.html index 879d3b559..fe0120355 100644 --- a/API/source-class-MeCms.Model.Entity.Page.html +++ b/API/source-class-MeCms.Model.Entity.Page.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -299,6 +300,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Entity.Photo.html b/API/source-class-MeCms.Model.Entity.Photo.html index 9ff0ccb40..5161d017b 100644 --- a/API/source-class-MeCms.Model.Entity.Photo.html +++ b/API/source-class-MeCms.Model.Entity.Photo.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -310,6 +311,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Entity.PhotosAlbum.html b/API/source-class-MeCms.Model.Entity.PhotosAlbum.html index 5fe07bc7f..b3c9e6e62 100644 --- a/API/source-class-MeCms.Model.Entity.PhotosAlbum.html +++ b/API/source-class-MeCms.Model.Entity.PhotosAlbum.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -296,6 +297,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Entity.Post.html b/API/source-class-MeCms.Model.Entity.Post.html index b1279f16b..62262eee0 100644 --- a/API/source-class-MeCms.Model.Entity.Post.html +++ b/API/source-class-MeCms.Model.Entity.Post.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -333,6 +334,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Entity.PostsCategory.html b/API/source-class-MeCms.Model.Entity.PostsCategory.html index 39040b441..93431cca5 100644 --- a/API/source-class-MeCms.Model.Entity.PostsCategory.html +++ b/API/source-class-MeCms.Model.Entity.PostsCategory.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -300,6 +301,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Entity.PostsTag.html b/API/source-class-MeCms.Model.Entity.PostsTag.html index 61e7a4299..4aa52cf88 100644 --- a/API/source-class-MeCms.Model.Entity.PostsTag.html +++ b/API/source-class-MeCms.Model.Entity.PostsTag.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -293,6 +294,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Entity.Tag.html b/API/source-class-MeCms.Model.Entity.Tag.html index 380e2c093..bea55baed 100644 --- a/API/source-class-MeCms.Model.Entity.Tag.html +++ b/API/source-class-MeCms.Model.Entity.Tag.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -294,6 +295,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Entity.User.html b/API/source-class-MeCms.Model.Entity.User.html index dbb7f927a..95030162b 100644 --- a/API/source-class-MeCms.Model.Entity.User.html +++ b/API/source-class-MeCms.Model.Entity.User.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -331,6 +332,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Entity.UsersGroup.html b/API/source-class-MeCms.Model.Entity.UsersGroup.html index 00dcb912b..1e2366ade 100644 --- a/API/source-class-MeCms.Model.Entity.UsersGroup.html +++ b/API/source-class-MeCms.Model.Entity.UsersGroup.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -295,6 +296,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Table.AppTable.html b/API/source-class-MeCms.Model.Table.AppTable.html index 21164cc62..9a20cb662 100644 --- a/API/source-class-MeCms.Model.Table.AppTable.html +++ b/API/source-class-MeCms.Model.Table.AppTable.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -415,6 +416,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Table.BannersPositionsTable.html b/API/source-class-MeCms.Model.Table.BannersPositionsTable.html index ead9fc897..6046cdd87 100644 --- a/API/source-class-MeCms.Model.Table.BannersPositionsTable.html +++ b/API/source-class-MeCms.Model.Table.BannersPositionsTable.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -326,6 +327,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Table.BannersTable.html b/API/source-class-MeCms.Model.Table.BannersTable.html index 600744b1f..4dace3ce6 100644 --- a/API/source-class-MeCms.Model.Table.BannersTable.html +++ b/API/source-class-MeCms.Model.Table.BannersTable.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -374,6 +375,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Table.PagesTable.html b/API/source-class-MeCms.Model.Table.PagesTable.html index fcc3c46d6..32caaf53d 100644 --- a/API/source-class-MeCms.Model.Table.PagesTable.html +++ b/API/source-class-MeCms.Model.Table.PagesTable.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -312,6 +313,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Table.PhotosAlbumsTable.html b/API/source-class-MeCms.Model.Table.PhotosAlbumsTable.html index a26c9f1f7..8057678f6 100644 --- a/API/source-class-MeCms.Model.Table.PhotosAlbumsTable.html +++ b/API/source-class-MeCms.Model.Table.PhotosAlbumsTable.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -373,6 +374,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Table.PhotosTable.html b/API/source-class-MeCms.Model.Table.PhotosTable.html index fbe48373e..c3dfa6bcc 100644 --- a/API/source-class-MeCms.Model.Table.PhotosTable.html +++ b/API/source-class-MeCms.Model.Table.PhotosTable.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -360,6 +361,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Table.PostsCategoriesTable.html b/API/source-class-MeCms.Model.Table.PostsCategoriesTable.html index c1ab96a58..3a8386416 100644 --- a/API/source-class-MeCms.Model.Table.PostsCategoriesTable.html +++ b/API/source-class-MeCms.Model.Table.PostsCategoriesTable.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -371,6 +372,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Table.PostsTable.html b/API/source-class-MeCms.Model.Table.PostsTable.html index 7f05606e3..f917dda1e 100644 --- a/API/source-class-MeCms.Model.Table.PostsTable.html +++ b/API/source-class-MeCms.Model.Table.PostsTable.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -525,6 +526,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Table.PostsTagsTable.html b/API/source-class-MeCms.Model.Table.PostsTagsTable.html index 4e403a84e..c0ec9e60b 100644 --- a/API/source-class-MeCms.Model.Table.PostsTagsTable.html +++ b/API/source-class-MeCms.Model.Table.PostsTagsTable.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -337,6 +338,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Table.TagsTable.html b/API/source-class-MeCms.Model.Table.TagsTable.html index 8c2eb8a01..57361ca80 100644 --- a/API/source-class-MeCms.Model.Table.TagsTable.html +++ b/API/source-class-MeCms.Model.Table.TagsTable.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -353,6 +354,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Table.UsersGroupsTable.html b/API/source-class-MeCms.Model.Table.UsersGroupsTable.html index 6a8e8160e..0dcc31078 100644 --- a/API/source-class-MeCms.Model.Table.UsersGroupsTable.html +++ b/API/source-class-MeCms.Model.Table.UsersGroupsTable.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -327,6 +328,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Table.UsersTable.html b/API/source-class-MeCms.Model.Table.UsersTable.html index a90f0dd26..26ae55d47 100644 --- a/API/source-class-MeCms.Model.Table.UsersTable.html +++ b/API/source-class-MeCms.Model.Table.UsersTable.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -477,6 +478,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Validation.AppValidator.html b/API/source-class-MeCms.Model.Validation.AppValidator.html index 2eeec5de6..f4e5375c7 100644 --- a/API/source-class-MeCms.Model.Validation.AppValidator.html +++ b/API/source-class-MeCms.Model.Validation.AppValidator.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -462,6 +463,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Validation.BannerValidator.html b/API/source-class-MeCms.Model.Validation.BannerValidator.html index e22034fbd..2e6c577bf 100644 --- a/API/source-class-MeCms.Model.Validation.BannerValidator.html +++ b/API/source-class-MeCms.Model.Validation.BannerValidator.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -313,6 +314,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Validation.BannersPositionValidator.html b/API/source-class-MeCms.Model.Validation.BannersPositionValidator.html index faee8a72c..a711ddbd5 100644 --- a/API/source-class-MeCms.Model.Validation.BannersPositionValidator.html +++ b/API/source-class-MeCms.Model.Validation.BannersPositionValidator.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -306,6 +307,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Validation.PageValidator.html b/API/source-class-MeCms.Model.Validation.PageValidator.html index 58ce90bd0..db69a7623 100644 --- a/API/source-class-MeCms.Model.Validation.PageValidator.html +++ b/API/source-class-MeCms.Model.Validation.PageValidator.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -298,6 +299,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Validation.PhotoValidator.html b/API/source-class-MeCms.Model.Validation.PhotoValidator.html index 9543f8818..005ec43d0 100644 --- a/API/source-class-MeCms.Model.Validation.PhotoValidator.html +++ b/API/source-class-MeCms.Model.Validation.PhotoValidator.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -301,6 +302,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Validation.PhotosAlbumValidator.html b/API/source-class-MeCms.Model.Validation.PhotosAlbumValidator.html index fd1439933..798f7d086 100644 --- a/API/source-class-MeCms.Model.Validation.PhotosAlbumValidator.html +++ b/API/source-class-MeCms.Model.Validation.PhotosAlbumValidator.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -295,6 +296,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Validation.PostValidator.html b/API/source-class-MeCms.Model.Validation.PostValidator.html index fd9926b75..e1359b2af 100644 --- a/API/source-class-MeCms.Model.Validation.PostValidator.html +++ b/API/source-class-MeCms.Model.Validation.PostValidator.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -325,8 +326,8 @@

    Classes

    80: if(!empty($tag['id'])) 81: continue; 82: - 83: //Checks if the tag has between 3 and 20 chars - 84: if(empty($tag['tag']) || strlen($tag['tag']) < 3 || strlen($tag['tag'] > 20)) + 83: //Checks if the tag has between 3 and 30 chars + 84: if(empty($tag['tag']) || strlen($tag['tag']) < 3 || strlen($tag['tag'] > 30)) 85: return FALSE; 86: } 87: @@ -361,6 +362,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Validation.PostsCategoryValidator.html b/API/source-class-MeCms.Model.Validation.PostsCategoryValidator.html index 95b8fbcba..da0d4eafc 100644 --- a/API/source-class-MeCms.Model.Validation.PostsCategoryValidator.html +++ b/API/source-class-MeCms.Model.Validation.PostsCategoryValidator.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -295,6 +296,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Validation.TagValidator.html b/API/source-class-MeCms.Model.Validation.TagValidator.html index 9ca456443..aca92b648 100644 --- a/API/source-class-MeCms.Model.Validation.TagValidator.html +++ b/API/source-class-MeCms.Model.Validation.TagValidator.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -282,8 +283,8 @@

    Classes

    37: //Tag 38: $this->add('tag', [ 39: 'lengthBetween' => [ -40: 'message' => __d('me_cms', 'Must be between {0} and {1} chars', 3, 20), -41: 'rule' => ['lengthBetween', 3, 20] +40: 'message' => __d('me_cms', 'Must be between {0} and {1} chars', 3, 30), +41: 'rule' => ['lengthBetween', 3, 30] 42: ], 43: 'validTag' => [ 44: 'message' => sprintf('%s: %s', __d('me_cms', 'Allowed chars'), __d('me_cms', 'lowercase letters, numbers, dash')), @@ -313,6 +314,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Validation.UserValidator.html b/API/source-class-MeCms.Model.Validation.UserValidator.html index 8455ecff0..eb14cae67 100644 --- a/API/source-class-MeCms.Model.Validation.UserValidator.html +++ b/API/source-class-MeCms.Model.Validation.UserValidator.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -392,6 +393,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Model.Validation.UsersGroupValidator.html b/API/source-class-MeCms.Model.Validation.UsersGroupValidator.html index 5af8a8f4e..ee5dc97a5 100644 --- a/API/source-class-MeCms.Model.Validation.UsersGroupValidator.html +++ b/API/source-class-MeCms.Model.Validation.UsersGroupValidator.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -324,6 +325,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Shell.InstallShell.html b/API/source-class-MeCms.Shell.InstallShell.html index 9c90ba0e6..615e143da 100644 --- a/API/source-class-MeCms.Shell.InstallShell.html +++ b/API/source-class-MeCms.Shell.InstallShell.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -381,6 +382,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Shell.UpdateShell.html b/API/source-class-MeCms.Shell.UpdateShell.html new file mode 100644 index 000000000..eaac94601 --- /dev/null +++ b/API/source-class-MeCms.Shell.UpdateShell.html @@ -0,0 +1,311 @@ + + + + + + + File Shell/UpdateShell.php | MeCms API + + + + + + +
    + +
    + +
    + + + + + + diff --git a/API/source-class-MeCms.Shell.UserShell.html b/API/source-class-MeCms.Shell.UserShell.html index 3183bf85d..3a9a964e0 100644 --- a/API/source-class-MeCms.Shell.UserShell.html +++ b/API/source-class-MeCms.Shell.UserShell.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -458,6 +459,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Utility.BannerFile.html b/API/source-class-MeCms.Utility.BannerFile.html index 4ad9cdae6..a1d8232f7 100644 --- a/API/source-class-MeCms.Utility.BannerFile.html +++ b/API/source-class-MeCms.Utility.BannerFile.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -325,6 +326,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Utility.PhotoFile.html b/API/source-class-MeCms.Utility.PhotoFile.html index e7580b5ab..be4f0ff4c 100644 --- a/API/source-class-MeCms.Utility.PhotoFile.html +++ b/API/source-class-MeCms.Utility.PhotoFile.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -354,6 +355,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.Utility.StaticPage.html b/API/source-class-MeCms.Utility.StaticPage.html index a99124fb8..3efe1c4d6 100644 --- a/API/source-class-MeCms.Utility.StaticPage.html +++ b/API/source-class-MeCms.Utility.StaticPage.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -351,6 +352,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.View.Cell.PagesCell.html b/API/source-class-MeCms.View.Cell.PagesCell.html index 4c88d09f6..edc629ae3 100644 --- a/API/source-class-MeCms.View.Cell.PagesCell.html +++ b/API/source-class-MeCms.View.Cell.PagesCell.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -312,6 +313,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.View.Cell.PhotosCell.html b/API/source-class-MeCms.View.Cell.PhotosCell.html index 00ba016b6..f34d6857a 100644 --- a/API/source-class-MeCms.View.Cell.PhotosCell.html +++ b/API/source-class-MeCms.View.Cell.PhotosCell.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -370,6 +371,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.View.Cell.PostsCell.html b/API/source-class-MeCms.View.Cell.PostsCell.html index 6e394b054..4526d741c 100644 --- a/API/source-class-MeCms.View.Cell.PostsCell.html +++ b/API/source-class-MeCms.View.Cell.PostsCell.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -353,6 +354,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.View.Helper.AuthHelper.html b/API/source-class-MeCms.View.Helper.AuthHelper.html index 1729086e6..341ce600b 100644 --- a/API/source-class-MeCms.View.Helper.AuthHelper.html +++ b/API/source-class-MeCms.View.Helper.AuthHelper.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -292,6 +293,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.View.Helper.MenuBuilderHelper.html b/API/source-class-MeCms.View.Helper.MenuBuilderHelper.html index 8c8c7590e..4d40c4ec5 100644 --- a/API/source-class-MeCms.View.Helper.MenuBuilderHelper.html +++ b/API/source-class-MeCms.View.Helper.MenuBuilderHelper.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -342,6 +343,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.View.Helper.MenuDefaultHelper.html b/API/source-class-MeCms.View.Helper.MenuDefaultHelper.html index af91e7a94..d0f5d1766 100644 --- a/API/source-class-MeCms.View.Helper.MenuDefaultHelper.html +++ b/API/source-class-MeCms.View.Helper.MenuDefaultHelper.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -401,8 +402,8 @@

    Classes

    156: * @uses MeTools\View\Helper\HtmlHelper::link() 157: */ 158: public function _systems() { -159: //Only admins can access this controller -160: if(!$this->Auth->isGroup('admin')) +159: //Only admins and managers can access this controller +160: if(!$this->Auth->isGroup(['admin', 'manager'])) 161: return; 162: 163: $menu = [ @@ -428,6 +429,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.View.View.AdminView.html b/API/source-class-MeCms.View.View.AdminView.html index b3ff7497d..3baacd7d5 100644 --- a/API/source-class-MeCms.View.View.AdminView.html +++ b/API/source-class-MeCms.View.View.AdminView.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -371,6 +372,6 @@

    Classes

    - + diff --git a/API/source-class-MeCms.View.View.AppView.html b/API/source-class-MeCms.View.View.AppView.html index ab2e51f58..e79483e6c 100644 --- a/API/source-class-MeCms.View.View.AppView.html +++ b/API/source-class-MeCms.View.View.AppView.html @@ -190,6 +190,7 @@

    Classes

  • MeCms\Model\Validation\UsersGroupValidator
  • MeCms\Model\Validation\UserValidator
  • MeCms\Shell\InstallShell
  • +
  • MeCms\Shell\UpdateShell
  • MeCms\Shell\UserShell
  • MeCms\Utility\BannerFile
  • MeCms\Utility\PhotoFile
  • @@ -395,6 +396,6 @@

    Classes

    - +