aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggBatch.php8
-rw-r--r--engine/classes/ElggEntity.php28
-rw-r--r--engine/classes/ElggMemcache.php24
-rw-r--r--engine/classes/ElggWidget.php2
-rw-r--r--engine/classes/XMLRPCCall.php4
5 files changed, 24 insertions, 42 deletions
diff --git a/engine/classes/ElggBatch.php b/engine/classes/ElggBatch.php
index 2a97f9ff5..3d01133fa 100644
--- a/engine/classes/ElggBatch.php
+++ b/engine/classes/ElggBatch.php
@@ -236,13 +236,11 @@ class ElggBatch
}
// if original limit < chunk size, set limit to original limit
+ // else if the number of results we'll fetch if greater than the original limit
if ($this->limit < $this->chunkSize) {
$limit = $this->limit;
- }
-
- // if the number of results we'll fetch is greater than the original limit,
- // set the limit to the number of results remaining in the original limit
- elseif ($this->retrievedResults + $this->chunkSize > $this->limit) {
+ } elseif ($this->retrievedResults + $this->chunkSize > $this->limit) {
+ // set the limit to the number of results remaining in the original limit
$limit = $this->limit - $this->retrievedResults;
}
}
diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php
index df87082fe..2fa8e9939 100644
--- a/engine/classes/ElggEntity.php
+++ b/engine/classes/ElggEntity.php
@@ -1583,36 +1583,36 @@ abstract class ElggEntity extends ElggData implements
foreach ($this->attributes as $k => $v) {
$meta = NULL;
- if (in_array( $k, $exportable_values)) {
+ if (in_array($k, $exportable_values)) {
switch ($k) {
- case 'guid' : // Dont use guid in OpenDD
- case 'type' : // Type and subtype already taken care of
- case 'subtype' :
- break;
+ case 'guid': // Dont use guid in OpenDD
+ case 'type': // Type and subtype already taken care of
+ case 'subtype':
+ break;
- case 'time_created' : // Created = published
+ case 'time_created': // Created = published
$odd->setAttribute('published', date("r", $v));
- break;
+ break;
- case 'site_guid' : // Container
+ case 'site_guid': // Container
$k = 'site_uuid';
$v = guid_to_uuid($v);
$meta = new ODDMetaData($uuid . "attr/$k/", $uuid, $k, $v);
- break;
+ break;
- case 'container_guid' : // Container
+ case 'container_guid': // Container
$k = 'container_uuid';
$v = guid_to_uuid($v);
$meta = new ODDMetaData($uuid . "attr/$k/", $uuid, $k, $v);
- break;
+ break;
- case 'owner_guid' : // Convert owner guid to uuid, this will be stored in metadata
+ case 'owner_guid': // Convert owner guid to uuid, this will be stored in metadata
$k = 'owner_uuid';
$v = guid_to_uuid($v);
$meta = new ODDMetaData($uuid . "attr/$k/", $uuid, $k, $v);
- break;
+ break;
- default :
+ default:
$meta = new ODDMetaData($uuid . "attr/$k/", $uuid, $k, $v);
}
diff --git a/engine/classes/ElggMemcache.php b/engine/classes/ElggMemcache.php
index a54c29723..f27b017d0 100644
--- a/engine/classes/ElggMemcache.php
+++ b/engine/classes/ElggMemcache.php
@@ -114,27 +114,11 @@ class ElggMemcache extends ElggSharedMemoryCache {
* Combine a key with the namespace.
* Memcache can only accept <250 char key. If the given key is too long it is shortened.
*
- * @deprecated 1.8 Use ElggMemcache::_makeMemcacheKey()
- *
- * @param string $key The key
- *
- * @return string The new key.
- */
- private function make_memcache_key($key) {
- elgg_deprecated_notice('ElggMemcache::make_memcache_key() is deprecated by ::_makeMemcacheKey()', 1.8);
-
- return $this->_makeMemcacheKey($key);
- }
-
- /**
- * Combine a key with the namespace.
- * Memcache can only accept <250 char key. If the given key is too long it is shortened.
- *
* @param string $key The key
*
* @return string The new key.
*/
- private function _makeMemcacheKey($key) {
+ private function makeMemcacheKey($key) {
$prefix = $this->getNamespace() . ":";
if (strlen($prefix . $key) > 250) {
@@ -154,7 +138,7 @@ class ElggMemcache extends ElggSharedMemoryCache {
* @return bool
*/
public function save($key, $data, $expires = null) {
- $key = $this->_makeMemcacheKey($key);
+ $key = $this->makeMemcacheKey($key);
if ($expires === null) {
$expires = $this->expires;
@@ -178,7 +162,7 @@ class ElggMemcache extends ElggSharedMemoryCache {
* @return mixed
*/
public function load($key, $offset = 0, $limit = null) {
- $key = $this->_makeMemcacheKey($key);
+ $key = $this->makeMemcacheKey($key);
$result = $this->memcache->get($key);
if ($result === false) {
@@ -196,7 +180,7 @@ class ElggMemcache extends ElggSharedMemoryCache {
* @return bool
*/
public function delete($key) {
- $key = $this->_makeMemcacheKey($key);
+ $key = $this->makeMemcacheKey($key);
return $this->memcache->delete($key, 0);
}
diff --git a/engine/classes/ElggWidget.php b/engine/classes/ElggWidget.php
index 70eaf8a73..e703b84cb 100644
--- a/engine/classes/ElggWidget.php
+++ b/engine/classes/ElggWidget.php
@@ -133,7 +133,7 @@ class ElggWidget extends ElggObject {
if ($rank == 0) {
// top of the column
$this->order = $widgets[0]->order - 10;
- } elseif ($rank == (count($widgets)-1)) {
+ } elseif ($rank == (count($widgets) - 1)) {
// bottom of the column
$this->order = end($widgets)->order + 10;
} else {
diff --git a/engine/classes/XMLRPCCall.php b/engine/classes/XMLRPCCall.php
index 8eeba0c29..fd28f1e3e 100644
--- a/engine/classes/XMLRPCCall.php
+++ b/engine/classes/XMLRPCCall.php
@@ -18,7 +18,7 @@ class XMLRPCCall {
* @param string $xml XML
*/
function __construct($xml) {
- $this->_parse($xml);
+ $this->parse($xml);
}
/**
@@ -45,7 +45,7 @@ class XMLRPCCall {
*
* @return void
*/
- private function _parse($xml) {
+ private function parse($xml) {
$xml = xml_to_object($xml);
// sanity check