Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Remove demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Feb 12, 2016
1 parent 50a13f0 commit 2d36ccc
Show file tree
Hide file tree
Showing 19 changed files with 4 additions and 606 deletions.
21 changes: 0 additions & 21 deletions core/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,6 @@ public function preDispatch()

// Init Dynamic Help (the order makes sense for the animation)
if ($this->view->isDynamicHelp) {
if ($this->isDemoMode()) {
$this->addDynamicHelp('.loginLink', MIDAS_DEMO_DYNAMIC_HELP, 'bottom left', 'top right');
}

if ($this->logged) {
$this->addDynamicHelp(
'#startingGuideLink',
Expand Down Expand Up @@ -434,23 +430,6 @@ public function addDynamicHelp($selector, $text, $location = 'bottom right', $ar
);
}

/**
* Check if demo mode is set.
*
* @return bool
*/
public function isDemoMode()
{
if (in_array('demo', Zend_Registry::get('modulesEnable'))) {
/** @var SettingModel $settingModel */
$settingModel = MidasLoader::loadModel('Setting');

return $settingModel->getValueByName('enabled', 'demo');
}

return false;
}

/** Disable the layout. */
public function disableLayout()
{
Expand Down
10 changes: 0 additions & 10 deletions core/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ class AdminController extends AppController
public $_components = array('Upgrade', 'Utility', 'MIDAS2Migration');
public $_forms = array('Admin', 'Assetstore', 'Migrate');

/** init the controller */
public function init()
{
if ($this->isDemoMode()) {
$this->disableView();

return false;
}
}

/** run a task */
public function taskAction()
{
Expand Down
2 changes: 1 addition & 1 deletion core/controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ public function userexistsAction()
/** Settings page action */
public function settingsAction()
{
if (!$this->logged || $this->isDemoMode()) {
if (!$this->logged) {
$this->disableView();

return false;
Expand Down
25 changes: 0 additions & 25 deletions modules/demo/AppController.php

This file was deleted.

24 changes: 0 additions & 24 deletions modules/demo/Bootstrap.php

This file was deleted.

42 changes: 0 additions & 42 deletions modules/demo/Notification.php

This file was deleted.

8 changes: 0 additions & 8 deletions modules/demo/configs/module.ini

This file was deleted.

36 changes: 0 additions & 36 deletions modules/demo/constant/module.php

This file was deleted.

88 changes: 0 additions & 88 deletions modules/demo/controllers/AdminController.php

This file was deleted.

Loading

0 comments on commit 2d36ccc

Please sign in to comment.