aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-18 12:03:57 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-18 12:03:57 +0000
commit961fc5a437c8d458884560485864d057aa807a25 (patch)
treef90ab213b5ac2c3899003897f645d63384fe68a0 /engine
parentc406571bd2a014dac3b4a023f96ec6331eb788b0 (diff)
downloadelgg-961fc5a437c8d458884560485864d057aa807a25.tar.gz
elgg-961fc5a437c8d458884560485864d057aa807a25.tar.bz2
Fixed a bug with the revamped access collections
git-svn-id: https://code.elgg.org/elgg/trunk@1467 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/access.php5
-rw-r--r--engine/schema/mysql.sql6
2 files changed, 3 insertions, 8 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php
index c04b7a9bc..7284ff54d 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -151,11 +151,12 @@
$query = "select ag.* from {$CONFIG->dbprefix}access_collections ag ";
$query .= " where (ag.site_guid = {$site_id} or ag.site_guid = 0)";
$query .= " and (ag.owner_guid = {$user_id} or ag.owner_guid = 0)";
+ $query .= " and ag.id > 3";
- $tmp_access_array = array();
+ $tmp_access_array = array(0 => elgg_echo("PRIVATE"), 1 => elgg_echo("LOGGED_IN"), 2 => elgg_echo("PUBLIC"));
if ($collections = get_data($query)) {
foreach($collections as $collection)
- $tmp_access_array[$collection->id] = elgg_echo($collection->name);
+ $tmp_access_array[$collection->id] = $collection->name;
}
$tmp_access_array = trigger_plugin_hook('access','user',array('user_id' => $user_id, 'site_id' => $site_id),$tmp_access_array);
diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
index 41410eef1..a93706c73 100644
--- a/engine/schema/mysql.sql
+++ b/engine/schema/mysql.sql
@@ -80,12 +80,6 @@ CREATE TABLE `prefix_access_collections` (
KEY `name` (`name`)
) AUTO_INCREMENT=3;
--- Dumping data for table `access_collections`
-INSERT INTO `prefix_access_collections` (`id`, `name`, `site_guid`) VALUES
-(0, 'PRIVATE', 0),
-(1, 'LOGGED_IN', 0),
-(2, 'PUBLIC', 0);
-
-- Access containers
CREATE TABLE `prefix_access_collection_membership` (