Permalink
Browse files

Removing the "offline" functionality. The overall features of sympal …

…should be cored down and well-defined so that it's a solid toolkit for 1.0, not a sprawling set of half-features.
  • Loading branch information...
1 parent 2fedb0c commit d4b219e5804973eab3d6dda0405962aea37db3aa @weaverryan weaverryan committed May 19, 2010
View
6 config/app.yml
@@ -1,12 +1,6 @@
all:
sympal_config:
- # Configure whether or not the Sympal system is online
- offline:
- enabled: false
- module: sympal_default
- action: offline
-
# Configure internationalization
i18n: false
View
45 lib/events/sfSympalControllerChangeActionListener.class.php
@@ -1,45 +0,0 @@
-<?php
-
-/**
- * Listener class for controller.change_action
- *
- * @package sfSympalPlugin
- * @subpackage events
- * @author Jonathan H. Wage <jonwage@gmail.com>
- * @since 2010-03-27
- * @version svn:$Id$ $Author$
- */
-class sfSympalControllerChangeActionListener extends sfSympalListener
-{
- private
- $_checkedOnline = false;
-
- public function getEventName()
- {
- return 'controller.change_action';
- }
-
- public function run(sfEvent $event)
- {
- $this->_checkOnlineConfiguration();
- }
-
- /**
- * Check if Sympal is not online and act accordingly
- *
- * @return void
- */
- private function _checkOnlineConfiguration()
- {
- if (sfSympalConfig::get('offline', 'enabled', false) && !$this->_checkedOnline)
- {
- $this->_checkedOnline = true;
- $this->_invoker->getSymfonyContext()->getController()->forward(
- sfSympalConfig::get('offline', 'module'),
- sfSympalConfig::get('offline', 'action')
- );
-
- throw new sfStopException();
- }
- }
-}
View
3 lib/util/sfSympalContext.php
@@ -94,9 +94,6 @@ protected function _registerExtendingClasses()
*/
protected function _registerListeners()
{
- // The controller.change_action event
- new sfSympalControllerChangeActionListener($this->_dispatcher, $this);
-
$this->_dispatcher->connect('template.filter_parameters', array($this, 'filterTemplateParameters'));
}
View
7 modules/sympal_default/lib/Basesympal_defaultActions.class.php
@@ -21,13 +21,6 @@ public function executeUnpublished_content(sfWebRequest $request)
}
/**
- * Default action called when sympal is in "offline" mode
- */
- public function executeOffline(sfWebRequest $request)
- {
- }
-
- /**
* Renders the sitemap
*/
public function executeSitemap(sfWebRequest $request)
View
3 modules/sympal_default/templates/offlineSuccess.php
@@ -1,3 +0,0 @@
-<h1><?php echo __('Offline') ?></h1>
-
-<p><?php echo __('We apologize but the site is currently offline. Check back soon!') ?></p>

0 comments on commit d4b219e

Please sign in to comment.