]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #2488 "return" was missing in ElggSite::getObjects() (also updated some documen...
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 22 Nov 2010 23:29:32 +0000 (23:29 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 22 Nov 2010 23:29:32 +0000 (23:29 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7423 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/classes/ElggSite.php
engine/lib/sites.php

index aa94b9fd21a82f4c99ed185a8ab8486575b68a80..68a720bfe383227cae9dda8b8f2164dcfa10ed60 100644 (file)
@@ -277,6 +277,9 @@ class ElggSite extends ElggEntity {
        /**
         * Returns an array of ElggObject entities that belong to the site.
         *
+        * @warning This only returns objects that have been explicitly added to the
+        * site through addObject()
+        *
         * @param string $subtype Entity subtype
         * @param int    $limit   Limit
         * @param int    $offset  Offset
@@ -284,7 +287,7 @@ class ElggSite extends ElggEntity {
         * @return array
         */
        public function getObjects($subtype = "", $limit = 10, $offset = 0) {
-               get_site_objects($this->getGUID(), $subtype, $limit, $offset);
+               return get_site_objects($this->getGUID(), $subtype, $limit, $offset);
        }
 
        /**
@@ -317,9 +320,10 @@ class ElggSite extends ElggEntity {
         * @param int    $offset  Offset
         *
         * @return unknown
-        * @todo Unimplemented
+        * @deprecated 1.8 Was never implemented
         */
        public function getCollections($subtype = "", $limit = 10, $offset = 0) {
+               elgg_deprecated_notice("ElggSite::getCollections() is deprecated", 1.8);
                get_site_collections($this->getGUID(), $subtype, $limit, $offset);
        }
 
@@ -348,6 +352,7 @@ class ElggSite extends ElggEntity {
         * @link http://docs.elgg.org/Tutorials/WalledGarden
         *
         * @return void
+        * @since 1.8.0
         */
        public function checkWalledGarden() {
                global $CONFIG;
@@ -371,6 +376,7 @@ class ElggSite extends ElggEntity {
         * @param string $url Defaults to the current URL.
         *
         * @return bool
+        * @since 1.8.0
         */
        public function isPublicPage($url = '') {
                global $CONFIG;
index f8590a4e009d3c64bf9b7c9a3f30975fb5c67d44..a348d166ba369f55805f4f2ce5a1f777dc7af720 100644 (file)
@@ -215,7 +215,6 @@ function remove_site_object($site_guid, $object_guid) {
  */
 function get_site_objects($site_guid, $subtype = "", $limit = 10, $offset = 0) {
        $site_guid = (int)$site_guid;
-       $subtype = sanitise_string($subtype);
        $limit = (int)$limit;
        $offset = (int)$offset;