From fee0cb995bc4b61059fd866f699b43de80043d7e Mon Sep 17 00:00:00 2001 From: Jamie Snape Date: Tue, 10 Jun 2014 13:56:59 -0400 Subject: [PATCH] Consistently use lowercase true, false, null --- core/controllers/ImportController.php | 2 +- core/controllers/components/ApidocsComponent.php | 2 +- core/controllers/components/MIDAS2MigrationComponent.php | 2 +- core/controllers/components/UtilityComponent.php | 2 +- core/models/base/CommunityModelBase.php | 4 ++-- .../dicomserver/controllers/components/ServerComponent.php | 2 +- modules/oai/controllers/IndexController.php | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/controllers/ImportController.php b/core/controllers/ImportController.php index 5be65a5c9..72c293cb2 100644 --- a/core/controllers/ImportController.php +++ b/core/controllers/ImportController.php @@ -251,7 +251,7 @@ private function _recursiveParseDirectory($path, $currentdir) // Upload the bitstream $assetstoreDao = $this->Assetstore->load($this->assetstoreid); $this->Component->Upload->uploadBitstream($bitstreamDao, - $assetstoreDao, TRUE); + $assetstoreDao, true); $this->ItemRevision->addBitstream($itemRevisionDao, $bitstreamDao); } // end new revision diff --git a/core/controllers/components/ApidocsComponent.php b/core/controllers/components/ApidocsComponent.php index 3cd16f858..ae4cdeb06 100644 --- a/core/controllers/components/ApidocsComponent.php +++ b/core/controllers/components/ApidocsComponent.php @@ -115,7 +115,7 @@ public function getWebApiDocs($resource, $module = '') } if(!empty($path)) { - $tokens = preg_split('@/@', $path, NULL, PREG_SPLIT_NO_EMPTY); + $tokens = preg_split('@/@', $path, null, PREG_SPLIT_NO_EMPTY); $count = count($tokens); if(empty($module) & !empty($tokens)) // core { diff --git a/core/controllers/components/MIDAS2MigrationComponent.php b/core/controllers/components/MIDAS2MigrationComponent.php index 31f738412..b52cc085a 100644 --- a/core/controllers/components/MIDAS2MigrationComponent.php +++ b/core/controllers/components/MIDAS2MigrationComponent.php @@ -536,7 +536,7 @@ function migrate($userid) { $privacy = MIDAS_COMMUNITY_PUBLIC; } - $communityDao = $Community->createCommunity($name, $short_description, $privacy, NULL); // no user + $communityDao = $Community->createCommunity($name, $short_description, $privacy, null); // no user // Add the users to the community // MIDAS2 was not using the group heavily so we ignore them. This would have to be a manual step diff --git a/core/controllers/components/UtilityComponent.php b/core/controllers/components/UtilityComponent.php index f798d4f77..eadfc4bc5 100644 --- a/core/controllers/components/UtilityComponent.php +++ b/core/controllers/components/UtilityComponent.php @@ -101,7 +101,7 @@ public function getAllModules() public static function extractPathParams() { $request = Zend_Controller_Front::getInstance()->getRequest(); - $allTokens = preg_split('@/@', $request->getPathInfo(), NULL, PREG_SPLIT_NO_EMPTY); + $allTokens = preg_split('@/@', $request->getPathInfo(), null, PREG_SPLIT_NO_EMPTY); $tokens = array(); $i = 0; diff --git a/core/models/base/CommunityModelBase.php b/core/models/base/CommunityModelBase.php index b1acb9cd1..74c8d05be 100644 --- a/core/models/base/CommunityModelBase.php +++ b/core/models/base/CommunityModelBase.php @@ -163,7 +163,7 @@ function createCommunity($name, $description, $privacy, $user, $canJoin = null, $communityDao->setMembergroupId($memberGroup->getKey()); $this->save($communityDao); - if($user != NULL) + if($user != null) { $groupModel->addUser($adminGroup, $user); $groupModel->addUser($memberGroup, $user); @@ -190,7 +190,7 @@ function createCommunity($name, $description, $privacy, $user, $canJoin = null, $folderpolicygroupModel->createPolicy($moderatorsGroup, $folderPublic, MIDAS_POLICY_WRITE); $folderpolicygroupModel->createPolicy($memberGroup, $folderPublic, MIDAS_POLICY_READ); $folderpolicygroupModel->createPolicy($anonymousGroup, $folderPublic, MIDAS_POLICY_READ); - if($user != NULL) + if($user != null) { $feedpolicygroupModel->createPolicy($anonymousGroup, $feed, MIDAS_POLICY_READ); } diff --git a/modules/dicomserver/controllers/components/ServerComponent.php b/modules/dicomserver/controllers/components/ServerComponent.php index 652ca780c..a9099b583 100644 --- a/modules/dicomserver/controllers/components/ServerComponent.php +++ b/modules/dicomserver/controllers/components/ServerComponent.php @@ -40,7 +40,7 @@ public function isDICOMServerWorking() } $ret['Reception Directory Writable'] = array(is_writable($receptionDir)); $peer_aes = $modulesConfig['dicomserver']->peer_aes; - if (!empty($peer_aes) && strpos($peer_aes, '(') !== FALSE && strpos($peer_aes, ')') !== FALSE) + if (!empty($peer_aes) && strpos($peer_aes, '(') !== false && strpos($peer_aes, ')') !== false) { $ret['Peer AE List Not Empty'] = array(true, "At least one peer AE is given"); } diff --git a/modules/oai/controllers/IndexController.php b/modules/oai/controllers/IndexController.php index 0d9a35768..0b2b397c6 100644 --- a/modules/oai/controllers/IndexController.php +++ b/modules/oai/controllers/IndexController.php @@ -161,12 +161,12 @@ function indexAction() { if(in_array('gzip', $compression) && ini_get('output_buffering')) { - //$compress = TRUE; - $compress = FALSE; + //$compress = true; + $compress = false; } else { - $compress = FALSE; + $compress = false; } }