From 965cbe52f22809f19ca150feb585b0218aa89f85 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 22 Sep 2010 17:01:17 +0000 Subject: Converted line endings to unix. git-svn-id: http://code.elgg.org/elgg/trunk@6957 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/ElggWidget.php | 104 +++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'engine/classes/ElggWidget.php') diff --git a/engine/classes/ElggWidget.php b/engine/classes/ElggWidget.php index dbca3c369..30cbc7dc2 100644 --- a/engine/classes/ElggWidget.php +++ b/engine/classes/ElggWidget.php @@ -1,53 +1,53 @@ -attributes['subtype'] = "widget"; - } - - public function __construct($guid = null) { - parent::__construct($guid); - } - - /** - * Override entity get and sets in order to save data to private data store. - */ - public function get($name) { - // See if its in our base attribute - if (isset($this->attributes[$name])) { - return $this->attributes[$name]; - } - - // No, so see if its in the private data store. - $meta = get_private_setting($this->guid, $name); - if ($meta) { - return $meta; - } - - // Can't find it, so return null - return null; - } - - /** - * Override entity get and sets in order to save data to private data store. - */ - public function set($name, $value) { - if (array_key_exists($name, $this->attributes)) { - // Check that we're not trying to change the guid! - if ((array_key_exists('guid', $this->attributes)) && ($name=='guid')) { - return false; - } - - $this->attributes[$name] = $value; - } else { - return set_private_setting($this->guid, $name, $value); - } - - return true; - } +attributes['subtype'] = "widget"; + } + + public function __construct($guid = null) { + parent::__construct($guid); + } + + /** + * Override entity get and sets in order to save data to private data store. + */ + public function get($name) { + // See if its in our base attribute + if (isset($this->attributes[$name])) { + return $this->attributes[$name]; + } + + // No, so see if its in the private data store. + $meta = get_private_setting($this->guid, $name); + if ($meta) { + return $meta; + } + + // Can't find it, so return null + return null; + } + + /** + * Override entity get and sets in order to save data to private data store. + */ + public function set($name, $value) { + if (array_key_exists($name, $this->attributes)) { + // Check that we're not trying to change the guid! + if ((array_key_exists('guid', $this->attributes)) && ($name=='guid')) { + return false; + } + + $this->attributes[$name] = $value; + } else { + return set_private_setting($this->guid, $name, $value); + } + + return true; + } } \ No newline at end of file -- cgit v1.2.3