Fix calendar sidebar issue - changed holder from 'contentholder' to 'sidebarholder'
[elgg.git] / units / communities / communities_owned.php
blob16295d6b3c903669e4aa859d0d29c9f6c2ad03c1
1 <?php
3 global $page_owner;
5 if ($page_owner != -1) {
6 if (run("users:type:get", $page_owner) == "person") {
7 $result = db_query("select users.ident, users.username, users.name from users
8 where users.owner = $page_owner
9 and users.user_type = 'community'");
10 if (sizeof($result) > 0) {
11 $body = "<ul>";
12 foreach($result as $row) {
13 $body .= "<li><a href=\"" . url . stripslashes($row->username) . "/\">" . stripslashes($row->name) . "</a></li>";
15 $body .= "</ul>";
16 // $run_result .= $body;
17 $run_result .= "<li id=\"community_owned\">";
18 $run_result .= run("templates:draw", array(
19 'context' => 'sidebarholder',
20 'title' => gettext("Owned communities"),
21 'body' => $body
24 $run_result .= "</li>";
25 } else {
26 $run_result .= "";