Skip to content

Commit

Permalink
Add space between properties and methods
Browse files Browse the repository at this point in the history
  • Loading branch information
shama authored and rchavik committed Mar 11, 2012
1 parent 90ecf20 commit e65a600
Show file tree
Hide file tree
Showing 63 changed files with 247 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class AppController extends Controller {
'Session',
'RequestHandler',
);

/**
* Helpers
*
Expand All @@ -45,6 +46,7 @@ class AppController extends Controller {
'Layout',
'Custom',
);

/**
* Models
*
Expand All @@ -57,27 +59,31 @@ class AppController extends Controller {
'Setting',
'Node',
);

/**
* Cache pagination results
*
* @var boolean
* @access public
*/
public $usePaginationCache = true;

/**
* View
*
* @var string
* @access public
*/
public $view = 'Theme';

/**
* Theme
*
* @var string
* @access public
*/
public $theme;

/**
* Constructor
*
Expand All @@ -95,6 +101,7 @@ public function __construct() {
$this->Component->triggerCallback('startup', $this);
}
}

/**
* beforeFilter
*
Expand Down Expand Up @@ -130,6 +137,7 @@ public function beforeFilter() {
Configure::write('Config.language', $this->params['locale']);
}
}

/**
* afterFilter callback
* Disable debug mode on JSON pages to prevent the script execution time to be appended to the page
Expand All @@ -143,6 +151,7 @@ public function afterFilter() {
Configure::write('debug', 0);
}
}

/**
* blackHoleCallback for SecurityComponent
*
Expand Down
4 changes: 4 additions & 0 deletions app_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class AppModel extends Model {
* @var string
*/
public $useCache = true;

/**
* Constructor
*
Expand All @@ -31,6 +32,7 @@ public function __construct($id = false, $table = null, $ds = null) {
Croogo::applyHookProperties('Hook.model_properties');
parent::__construct($id, $table, $ds);
}

/**
* Override find function to use caching
*
Expand Down Expand Up @@ -66,6 +68,7 @@ public function find($type, $options = array()) {
}
return $results;
}

/**
* Check if find() was already cached
*
Expand All @@ -90,6 +93,7 @@ function _findCached($type, $options) {
}
return false;
}

/**
* Updates multiple model records based on a set of conditions.
*
Expand Down
4 changes: 4 additions & 0 deletions controllers/attachments_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,23 @@ class AttachmentsController extends AppController {
* @access public
*/
public $name = 'Attachments';

/**
* Models used by the Controller
*
* @var array
* @access public
*/
public $uses = array('Node');

/**
* Helpers used by the Controller
*
* @var array
* @access public
*/
public $helpers = array('Filemanager', 'Text', 'Image');

/**
* Node type
*
Expand All @@ -45,6 +48,7 @@ class AttachmentsController extends AppController {
* @access public
*/
public $type = 'attachment';

/**
* Uploads directory
*
Expand Down
1 change: 1 addition & 0 deletions controllers/blocks_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class BlocksController extends AppController {
* @access public
*/
public $name = 'Blocks';

/**
* Models used by the Controller
*
Expand Down
2 changes: 2 additions & 0 deletions controllers/comments_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class CommentsController extends AppController {
* @access public
*/
public $name = 'Comments';

/**
* Components
*
Expand All @@ -30,6 +31,7 @@ class CommentsController extends AppController {
'Email',
'Recaptcha',
);

/**
* Models used by the Controller
*
Expand Down
26 changes: 26 additions & 0 deletions controllers/components/croogo.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class CroogoComponent extends Object {
public $components = array(
'Session',
);

/**
* Role ID of current user
*
Expand All @@ -30,6 +31,7 @@ class CroogoComponent extends Object {
* @access public
*/
public $roleId = 3;

/**
* Menus for layout
*
Expand Down Expand Up @@ -65,6 +67,7 @@ class CroogoComponent extends Object {
* @access public
*/
public $nodes_for_layout = array();

/**
* Blocks data: contains parsed value of bb-code like strings
*
Expand All @@ -76,6 +79,7 @@ class CroogoComponent extends Object {
'vocabularies' => array(),
'nodes' => array(),
);

/**
* Startup
*
Expand All @@ -100,6 +104,7 @@ public function startup(&$controller) {
$this->__adminData();
}
}

/**
* Set variables for admin layout
*
Expand Down Expand Up @@ -132,6 +137,7 @@ private function __adminData() {
));
$this->controller->set('vocabularies_for_admin_layout', $vocabularies);
}

/**
* Blocks
*
Expand Down Expand Up @@ -190,6 +196,7 @@ public function blocks() {
$this->blocks_for_layout[$regionAlias] = $blocks;
}
}

/**
* Process blocks for bb-code like strings
*
Expand All @@ -205,6 +212,7 @@ public function processBlocksData($blocks) {
)));
}
}

/**
* Menus
*
Expand Down Expand Up @@ -263,6 +271,7 @@ public function menus() {
}
}
}

/**
* Vocabularies
*
Expand Down Expand Up @@ -309,6 +318,7 @@ public function vocabularies() {
}
}
}

/**
* Types
*
Expand All @@ -328,6 +338,7 @@ public function types() {
$this->types_for_layout[$alias] = $type;
}
}

/**
* Nodes
*
Expand Down Expand Up @@ -365,6 +376,7 @@ public function nodes() {
$this->nodes_for_layout[$alias] = $node;
}
}

/**
* Converts formatted string to array
*
Expand All @@ -390,6 +402,7 @@ public function stringToArray($string) {

return $stringArr;
}

/**
* beforeRender
*
Expand Down Expand Up @@ -418,6 +431,7 @@ public function beforeRender(&$controller) {
array_unshift($appInstance->helpers, APP.'views'.DS.'themed'.DS.$controller->theme.DS.'helpers'.DS);
}
}

/**
* Extracts parameters from 'filter' named parameter.
*
Expand All @@ -435,6 +449,7 @@ public function extractFilter() {
}
return $filterData;
}

/**
* Get URL relative to the app
*
Expand All @@ -450,6 +465,7 @@ public function getRelativePath($url = '/') {
$path = '/' . str_replace(Router::url('/', true), '', $absoluteUrl);
return $path;
}

/**
* ACL: add ACO
*
Expand Down Expand Up @@ -554,6 +570,7 @@ public function addAco($action, $allowRoles = array()) {
}
}
}

/**
* ACL: remove ACO
*
Expand All @@ -568,6 +585,7 @@ public function removeAco($action) {
$this->controller->Acl->Aco->delete($acoNode['0']['Aco']['id']);
}
}

/**
* Loads plugin's bootstrap.php file
*
Expand All @@ -590,6 +608,7 @@ public function addPluginBootstrap($plugin) {
}
$this->controller->Setting->write('Hook.bootstraps', $plugins);
}

/**
* Plugin name will be removed from Hook.bootstraps
*
Expand All @@ -615,6 +634,7 @@ public function removePluginBootstrap($plugin) {
}
$this->controller->Setting->write('Hook.bootstraps', $plugins);
}

/**
* Parses bb-code like string.
*
Expand Down Expand Up @@ -660,6 +680,7 @@ public function parseString($exp, $text, $options = array()) {
}
return $output;
}

/**
* Get theme alises (folder names)
*
Expand All @@ -684,6 +705,7 @@ public function getThemes() {
}
return $themes;
}

/**
* Get the content of theme.yml file
*
Expand All @@ -708,6 +730,7 @@ public function getThemeData($alias = null) {
$themeData = Spyc::YAMLLoad(file_get_contents($ymlLocation));
return $themeData;
}

/**
* Get plugin alises (folder names)
*
Expand All @@ -732,6 +755,7 @@ public function getPlugins() {
}
return $plugins;
}

/**
* Get the content of plugin.yml file
*
Expand All @@ -750,6 +774,7 @@ public function getPluginData($alias = null) {
}
return false;
}

/**
* Check if plugin is dependent on any other plugin.
* If yes, check if that plugin is available in plugins directory.
Expand All @@ -775,6 +800,7 @@ public function checkPluginDependency($plugin = null) {
}
return true;
}

/**
* Check if plugin is active
*
Expand Down
2 changes: 2 additions & 0 deletions controllers/contacts_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class ContactsController extends AppController {
* @access public
*/
public $name = 'Contacts';

/**
* Components
*
Expand All @@ -30,6 +31,7 @@ class ContactsController extends AppController {
'Email',
'Recaptcha',
);

/**
* Models used by the Controller
*
Expand Down
2 changes: 2 additions & 0 deletions controllers/filemanager_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ class FilemanagerController extends AppController {
* @access public
*/
public $name = 'Filemanager';

/**
* Models used by the Controller
*
* @var array
* @access public
*/
public $uses = array('Setting', 'User');

/**
* Helpers used by the Controller
*
Expand Down
Loading

0 comments on commit e65a600

Please sign in to comment.