This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 
<?php
    defined('C5_EXECUTE') or die("Access Denied.");
    class Concrete5_Controller_PageType_CoreStack extends Controller {
    
        public function on_start() {
            $c = Page::getByPath('/dashboard/blocks/stacks');
            $cp = new Permissions($c);
            if ($cp->canViewPage()) {
                $c = Page::getCurrentPage();
                $pcp = new Permissions($c);
                if ((!$pcp->canViewPageVersions()) || ($_GET['vtask'] != 'view_versions' && $_GET['vtask'] != 'compare')) {
                    $cID = $c->getCollectionID();
                    $this->redirect('/dashboard/blocks/stacks','view_details', $cID);       
                } else {
                    $this->theme = 'dashboard';
                }
            } else {
                global $c; // ugh
                $v = View::getInstance();
                $c = new Page();
                $c->loadError(COLLECTION_NOT_FOUND);
                $v->setCollectionObject($c);
                $this->c = $c;
                $cont = Loader::controller("/page_not_found");
                $v->setController($cont);               
                $v->render('/page_not_found');
            }
        }       
    }