diff options
| author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-24 15:48:42 +0000 | 
|---|---|---|
| committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-24 15:48:42 +0000 | 
| commit | 2b74ad2a779fc787644eb42ac4c0d072e3ae2c46 (patch) | |
| tree | 36ba49eed80b6a9a96bf9562b249a10758597f45 /engine | |
| parent | bcbdc8a7eda9a36166075ea7a07c99fadcab2b81 (diff) | |
| download | elgg-2b74ad2a779fc787644eb42ac4c0d072e3ae2c46.tar.gz elgg-2b74ad2a779fc787644eb42ac4c0d072e3ae2c46.tar.bz2  | |
Introducing the (still issue-packed) friend picker.
git-svn-id: https://code.elgg.org/elgg/trunk@1511 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
| -rw-r--r-- | engine/lib/access.php | 20 | ||||
| -rw-r--r-- | engine/lib/relationships.php | 2 | ||||
| -rw-r--r-- | engine/schema/mysql.sql | 4 | 
3 files changed, 22 insertions, 4 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php index 8600fc719..64d982e30 100644 --- a/engine/lib/access.php +++ b/engine/lib/access.php @@ -326,6 +326,26 @@  		}
 +		/**
 +		 * Displays a user's access collections, using the friends/collections view
 +		 *
 +		 * @param int $owner_guid The GUID of the owning user
 +		 * @return string A formatted rendition of the collections
 +		 */
 +		function elgg_view_access_collections($owner_guid) {
 +			
 +			if ($collections = get_user_access_collections($owner_guid)) {
 +				
 +				foreach($collections as $key => $collection) {
 +					$collections[$key]->entities = get_members_of_access_collection($collection->id);
 +				}
 +				
 +			}
 +			
 +			return elgg_view('friends/collections',array('collections' => $collections));
 +			
 +		}
 +		
  	/**
  	 * Some useful constant definitions
  	 */
 diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index e3f2c2085..142861a97 100644 --- a/engine/lib/relationships.php +++ b/engine/lib/relationships.php @@ -480,7 +480,7 @@  		if ($owner_guid != "")  			$where[] = "e.container_guid='$owner_guid'";  		if ($site_guid > 0) -			$where[] = "e.container_guid = {$site_guid}"; +			$where[] = "e.site_guid = {$site_guid}";  		// Select what we're joining based on the options  		$joinon = "e.guid = r.guid_one"; diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql index b223984db..38fc60095 100644 --- a/engine/schema/mysql.sql +++ b/engine/schema/mysql.sql @@ -74,14 +74,12 @@ CREATE TABLE `prefix_entity_relationships` (  -- Table structure for table `access_collections`
  CREATE TABLE `prefix_access_collections` (
    `id` int(11) NOT NULL auto_increment,
 -  `name` varchar(16) NOT NULL,
 +  `name` text NOT NULL,
    `owner_guid` bigint(20) unsigned NOT NULL,
    `site_guid` bigint(20) unsigned NOT NULL default '0',
    PRIMARY KEY  (`id`),
 -  KEY `name` (`name`)
  ) AUTO_INCREMENT=3;
 -  -- Access containers 
  CREATE TABLE `prefix_access_collection_membership` (
    `user_guid` int(11) NOT NULL,
  | 
