Changeset 110
- Timestamp:
- 01/14/06 08:12:05 (3 years ago)
- Files:
-
- devel/profile/rss2.php (modified) (2 diffs)
- devel/units/communities/communities_access_levels.php (modified) (1 diff)
- devel/units/communities/communities_edit.php (modified) (2 diffs)
- devel/units/communities/communities_members.php (modified) (3 diffs)
- devel/units/communities/communities_moderator_of.php (modified) (2 diffs)
- devel/units/communities/community_memberships.php (modified) (2 diffs)
- devel/units/files/edit_file.php (modified) (1 diff)
- devel/units/files/files_links_make.php (modified) (1 diff)
- devel/units/files/function_search.php (modified) (2 diffs)
- devel/units/files/function_search_rss.php (modified) (1 diff)
- devel/units/friends/friends_edit.php (modified) (2 diffs)
- devel/units/friends/friends_of_edit.php (modified) (3 diffs)
- devel/units/friends/generate_foaf.php (modified) (1 diff)
- devel/units/friends/get_friends.php (modified) (1 diff)
- devel/units/friends/profile_friends.php (modified) (1 diff)
- devel/units/groups/get_groups.php (modified) (1 diff)
- devel/units/icons/function_edit_icons.php (modified) (4 diffs)
- devel/units/invite/new_password.php (modified) (1 diff)
- devel/units/magpie/function_subscriptions.php (modified) (1 diff)
- devel/units/magpie/function_view.php (modified) (1 diff)
- devel/units/profile/function_search.php (modified) (3 diffs)
- devel/units/users/user_info.php (modified) (2 diffs)
- devel/units/weblogs/function_search.php (modified) (3 diffs)
- devel/units/weblogs/function_search_rss.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/profile/rss2.php
r92 r110 47 47 } else { 48 48 $tag = trim($_REQUEST['tag']); 49 $entries = db_query("select weblog_posts.* from tags leftjoin weblog_posts on weblog_posts.ident = tags.ref where weblog_posts.weblog = $page_owner and weblog_posts.access = 'PUBLIC' and tags.tag = '$tag' and tags.tagtype = 'weblog' order by weblog_posts.posted desc limit 10");49 $entries = db_query("select weblog_posts.* from tags join weblog_posts on weblog_posts.ident = tags.ref where weblog_posts.weblog = $page_owner and weblog_posts.access = 'PUBLIC' and tags.tag = '$tag' and tags.tagtype = 'weblog' order by weblog_posts.posted desc limit 10"); 50 50 } 51 51 if (sizeof($entries) > 0) { … … 80 80 } else { 81 81 $tag = trim($_REQUEST['tag']); 82 $files = db_query("select files.* from tags leftjoin files on files.ident = tags.ref where files.files_owner = $page_owner and files.access = 'PUBLIC' and tags.tagtype = 'file' and tags.tag = '$tag' order by files.time_uploaded desc limit 10");82 $files = db_query("select files.* from tags join files on files.ident = tags.ref where files.files_owner = $page_owner and files.access = 'PUBLIC' and tags.tagtype = 'file' and tags.tag = '$tag' order by files.time_uploaded desc limit 10"); 83 83 } 84 84 if (sizeof($files) > 0) { devel/units/communities/communities_access_levels.php
r45 r110 14 14 15 15 $communities = db_query("select users.* from friends 16 leftjoin users on users.ident = friends.friend16 join users on users.ident = friends.friend 17 17 where users.user_type = 'community' 18 18 and users.owner <> " . $_SESSION['userid'] . " devel/units/communities/communities_edit.php
r106 r110 20 20 $i = 1; 21 21 if (sizeof ($result) > 0) { 22 23 $icon = "default.png"; 24 $defaulticonparams = @getimagesize(path . "_icons/data/default.png"); 25 22 26 foreach($result as $key => $info) { 27 list($width, $height, $type, $attr) = $defaulticonparams; 23 28 // $info = $info[0]; 24 29 if ($info->icon != -1) { … … 26 31 if (sizeof($icon) == 1) { 27 32 $icon = $icon[0]->filename; 28 } else { 29 $icon = "default.png"; 33 if (!(list($width, $height, $type, $attr) = @getimagesize(path . "_icons/data/" . $icon))) { 34 $icon = "default.png"; 35 list($width, $height, $type, $attr) = $defaulticonparams; 36 } 30 37 } 31 } else {32 $icon = "default.png";33 38 } 34 list($width, $height, $type, $attr) = getimagesize(path . "_icons/data/" . $icon);39 35 40 if (sizeof($parameter[1]) > 4) { 36 41 $width = round($width / 2); devel/units/communities/communities_members.php
r84 r110 10 10 11 11 $result = db_query("select users.*, friends.ident as friendident from friends 12 leftjoin users on users.ident = friends.owner12 join users on users.ident = friends.owner 13 13 where friends.friend = $user_id and users.user_type = 'person'"); 14 14 … … 20 20 $i = 1; 21 21 if (sizeof ($result) > 0) { 22 23 $icon = "default.png"; 24 $defaulticonparams = @getimagesize(path . "_icons/data/default.png"); 25 22 26 foreach($result as $key => $info) { 27 list($width, $height, $type, $attr) = $defaulticonparams; 23 28 // $info = $info[0]; 24 29 if ($info->icon != -1) { … … 26 31 if (sizeof($icon) == 1) { 27 32 $icon = $icon[0]->filename; 28 } else { 29 $icon = "default.png"; 33 if (!(list($width, $height, $type, $attr) = @getimagesize(path . "_icons/data/" . $icon))) { 34 $icon = "default.png"; 35 list($width, $height, $type, $attr) = $defaulticonparams; 36 } 30 37 } 31 } else {32 $icon = "default.png";33 38 } 34 list($width, $height, $type, $attr) = getimagesize(path . "_icons/data/" . $icon);39 35 40 if (sizeof($parameter[1]) > 4) { 36 41 $width = round($width / 2); devel/units/communities/communities_moderator_of.php
r84 r110 19 19 $i = 1; 20 20 if (sizeof ($result) > 0) { 21 22 $icon = "default.png"; 23 $defaulticonparams = @getimagesize(path . "_icons/data/default.png"); 24 21 25 foreach($result as $key => $info) { 22 // $info = $info[0]; 23 if ($info->icon != -1) { 24 $icon = db_query("select filename from icons where ident = " . $info->icon . " and owner = " . $info->ident); 25 if (sizeof($icon) == 1) { 26 $icon = $icon[0]->filename; 27 } else { 26 list($width, $height, $type, $attr) = $defaulticonparams; 27 // $info = $info[0]; 28 if ($info->icon != -1) { 29 $icon = db_query("select filename from icons where ident = " . $info->icon . " and owner = " . $info->ident); 30 if (sizeof($icon) == 1) { 31 $icon = $icon[0]->filename; 32 if (!(list($width, $height, $type, $attr) = @getimagesize(path . "_icons/data/" . $icon))) { 28 33 $icon = "default.png"; 34 list($width, $height, $type, $attr) = $defaulticonparams; 29 35 } 30 } else {31 $icon = "default.png";32 36 } 33 list($width, $height, $type, $attr) = getimagesize(path . "_icons/data/" . $icon); 34 if (sizeof($parameter[1]) > 4) { 35 $width = round($width / 2); 36 $height = round($height / 2); 37 } 38 $friends_username = stripslashes($info->username); 39 $friends_name = htmlentities(stripslashes($info->name)); 40 // $friends_menu = run("users:infobox:menu",array($info->ident)); 41 $body .= <<< END 37 } 38 39 if (sizeof($parameter[1]) > 4) { 40 $width = round($width / 2); 41 $height = round($height / 2); 42 } 43 $friends_username = stripslashes($info->username); 44 $friends_name = htmlentities(stripslashes($info->name)); 45 // $friends_menu = run("users:infobox:menu",array($info->ident)); 46 $body .= <<< END 42 47 <td> 43 48 <p> … … 50 55 </td> 51 56 END; 52 if ($i % 5 == 0) {53 $body .= "</tr><tr>";54 }55 $i++;57 if ($i % 5 == 0) { 58 $body .= "</tr><tr>"; 59 } 60 $i++; 56 61 } 57 62 } else { devel/units/communities/community_memberships.php
r85 r110 6 6 if (run("users:type:get", $page_owner) == "person") { 7 7 $result = db_query("select users.ident, users.username, users.name from friends 8 leftjoin users on users.ident = friends.friend8 join users on users.ident = friends.friend 9 9 where friends.owner = $page_owner 10 10 and users.user_type = 'community' 11 and users.owner != $page_owner 12 group by friends.friend"); 11 and users.owner != " . $page_owner); 13 12 14 13 if (sizeof($result) > 0) { … … 31 30 } else if (run("users:type:get", $page_owner) == "community") { 32 31 $result = db_query("select users.ident from friends 33 leftjoin users on users.ident = friends.owner32 join users on users.ident = friends.owner 34 33 where friends.friend = $page_owner 35 34 group by friends.owner devel/units/files/edit_file.php
r85 r110 9 9 $file_id = (int) $_REQUEST['edit_file_id']; 10 10 11 $file_details = db_query("select files.*, users.username from files leftjoin users on users.ident = files.owner where files.ident = $file_id");11 $file_details = db_query("select files.*, users.username from files join users on users.ident = files.owner where files.ident = $file_id"); 12 12 if (sizeof($file_details) > 0 && (run("permissions:check", array("files:edit",$file_details[0]->owner)) || run("permissions:check", array("files:edit",$file_details[0]->files_owner)))) { 13 13 $file = $file_details[0]; devel/units/files/files_links_make.php
r45 r110 34 34 } 35 35 } else { 36 list($width, $height, $type, $attr) = getimagesize($file[0]->location);36 list($width, $height, $type, $attr) = @getimagesize($file[0]->location); 37 37 if ($width > 400 || $height > 400) { 38 38 $run_result .= "<a href=\""; devel/units/files/function_search.php
r106 r110 82 82 $body = "<table><tr>"; 83 83 $i = 1; 84 $icon = "default.png"; 85 $defaulticonparams = @getimagesize(path . "_icons/data/default.png"); 86 84 87 foreach($users as $key => $info) { 85 86 // $info = $info[0]; 87 if ($info->icon != -1) { 88 $icon = db_query("select filename from icons where ident = " . $info->icon . " and owner = " . $info->ident); 89 if (sizeof($icon) == 1) { 90 $icon = $icon[0]->filename; 91 } else { 88 89 list($width, $height, $type, $attr) = $defaulticonparams; 90 // $info = $info[0]; 91 if ($info->icon != -1) { 92 $icon = db_query("select filename from icons where ident = " . $info->icon . " and owner = " . $info->ident); 93 if (sizeof($icon) == 1) { 94 $icon = $icon[0]->filename; 95 if (!(list($width, $height, $type, $attr) = @getimagesize(path . "_icons/data/" . $icon))) { 92 96 $icon = "default.png"; 97 list($width, $height, $type, $attr) = $defaulticonparams; 93 98 } 94 } else {95 $icon = "default.png";96 99 } 97 98 if (!(list($width, $height, $type, $attr) = @getimagesize(path . "_icons/data/" . $icon))) { 99 $icon = "default.png"; 100 list($width, $height, $type, $attr) = getimagesize(path . "_icons/data/" . $icon); 101 } 102 103 if (sizeof($users) > 4) { 104 $width = round($width / 2); 105 $height = round($height / 2); 106 } 107 $friends_userid = $info->ident; 108 $friends_name = htmlentities(stripslashes($info->name)); 109 $friends_menu = run("users:infobox:menu",array($info->ident)); 110 $link_keyword = urlencode($parameter[1]); 111 $width = round($width / 2); 112 $height = round($height / 2); 113 $body .= <<< END 100 } 101 102 if (sizeof($users) > 4) { 103 $width = round($width / 2); 104 $height = round($height / 2); 105 } 106 $friends_userid = $info->ident; 107 $friends_name = htmlentities(stripslashes($info->name)); 108 $friends_menu = run("users:infobox:menu",array($info->ident)); 109 $link_keyword = urlencode($parameter[1]); 110 $width = round($width / 2); 111 $height = round($height / 2); 112 $body .= <<< END 114 113 <td align="center"> 115 114 <p> … … 123 122 </td> 124 123 END; 125 if ($i % 5 == 0) {126 $body .= "\n</tr><tr>\n";127 }128 $i++;124 if ($i % 5 == 0) { 125 $body .= "\n</tr><tr>\n"; 126 } 127 $i++; 129 128 } 130 129 $body .= "</tr></table>"; devel/units/files/function_search_rss.php
r45 r110 16 16 $searchline_folders = str_replace("access", "file_folders.access", $searchline_folders); 17 17 $searchline_folders = str_replace("owner", "file_folders.owner", $searchline_folders); 18 $file_refs = db_query("select files.*, users.username, users.name as fullname, ref from tags left join files on files.ident = tags.ref leftjoin users on users.ident = tags.owner where $searchline_files limit 50");19 $folder_refs = db_query("select file_folders.*, users.username, users.name as fullname, ref from tags left join file_folders on file_folders.ident = tags.ref leftjoin users on users.ident = tags.owner where $searchline_folders limit 50");18 $file_refs = db_query("select files.*, users.username, users.name as fullname, ref from tags join files on files.ident = tags.ref join users on users.ident = tags.owner where $searchline_files limit 50"); 19 $folder_refs = db_query("select file_folders.*, users.username, users.name as fullname, ref from tags join file_folders on file_folders.ident = tags.ref join users on users.ident = tags.owner where $searchline_folders limit 50"); 20 20 $searchline = ""; 21 21 if (sizeof($folder_refs) > 0) { devel/units/friends/friends_edit.php
r106 r110 20 20 $i = 1; 21 21 if (sizeof ($result) > 0) { 22 23 $icon = "default.png"; 24 $defaulticonparams = @getimagesize(path . "_icons/data/default.png"); 25 22 26 foreach($result as $key => $info) { 23 // $info = $info[0]; 24 if ($info->icon != -1) { 25 $icon = db_query("select filename from icons where ident = " . $info->icon . " and owner = " . $info->ident); 26 if (sizeof($icon) == 1) { 27 $icon = $icon[0]->filename; 28 } else { 27 list($width, $height, $type, $attr) = $defaulticonparams; 28 // $info = $info[0]; 29 if ($info->icon != -1) { 30 $icon = db_query("select filename from icons where ident = " . $info->icon . " and owner = " . $info->ident); 31 if (sizeof($icon) == 1) { 32 $icon = $icon[0]->filename; 33 if (!(list($width, $height, $type, $attr) = @getimagesize(path . "_icons/data/" . $icon))) { 29 34 $icon = "default.png"; 35 list($width, $height, $type, $attr) = $defaulticonparams; 30 36 } 31 } else {32 $icon = "default.png";33 37 } 34 35 if (!(list($width, $height, $type, $attr) = @getimagesize(path . "_icons/data/" . $icon))) { 36 $icon = "default.png"; 37 list($width, $height, $type, $attr) = getimagesize(path . "_icons/data/" . $icon); 38 } 39 40 if (sizeof($parameter[1]) > 4) { 41 $width = round($width / 2); 42 $height = round($height / 2); 43 } 44 $friends_username = stripslashes($info->username); 45 $friends_name = htmlentities(stripslashes($info->name)); 46 $friends_menu = run("users:infobox:menu",array($info->ident)); 47 $body .= <<< END 38 } 39 40 if (sizeof($parameter[1]) > 4) { 41 $width = round($width / 2); 42 $height = round($height / 2); 43 } 44 $friends_username = stripslashes($info->username); 45 $friends_name = htmlentities(stripslashes($info->name)); 46 $friends_menu = run("users:infobox:menu",array($info->ident)); 47 $body .= <<< END 48 48 <td> 49 49 <p> … … 57 57 </td> 58 58 END; 59 if ($i % 5 == 0) {60 $body .= "</tr><tr>";61 }62 $i++;59 if ($i % 5 == 0) { 60 $body .= "</tr><tr>"; 61 } 62 $i++; 63 63 } 64 64 } else { devel/units/friends/friends_of_edit.php
r106 r110 14 14 15 15 $body = <<< END 16 17 16 <div class="networktable"> 18 17 <table> 19 18 <tr> 20 21 19 END; 22 20 $i = 1; 23 21 if (sizeof ($result) > 0) { 22 23 $icon = "default.png"; 24 $defaulticonparams = @getimagesize(path . "_icons/data/default.png"); 25 24 26 foreach($result as $key => $info) { 25 // $info = $info[0]; 26 if ($info->icon != -1) { 27 $icon = db_query("select filename from icons where ident = " . $info->icon . " and owner = " . $info->ident); 28 if (sizeof($icon) == 1) { 29 $icon = $icon[0]->filename; 30 } else { 27 list($width, $height, $type, $attr) = $defaulticonparams; 28 // $info = $info[0]; 29 if ($info->icon != -1) { 30 $icon = db_query("select filename from icons where ident = " . $info->icon . " and owner = " . $info->ident); 31 if (sizeof($icon) == 1) { 32 $icon = $icon[0]->filename; 33 if (!(list($width, $height, $type, $attr) = @getimagesize(path . "_icons/data/" . $icon))) { 31 34 $icon = "default.png"; 32 } 33 } else { 34 $icon = "default.png"; 35 } 36 $result = @getimagesize(path . "_icons/data/" . $icon); 37 if ($result != false) { 38 list($width, $height, $type, $attr) = $result; 39 if (sizeof($parameter[1]) > 4) { 40 $width = round($width / 2); 41 $height = round($height / 2); 35 list($width, $height, $type, $attr) = $defaulticonparams; 42 36 } 43 37 } 44 $friends_username = stripslashes($info->username); 45 $friends_name = htmlentities(stripslashes($info->name)); 46 $friends_menu = run("users:infobox:menu",array($info->ident)); 47 $body .= <<< END 38 } 39 40 if (sizeof($parameter[1]) > 4) { 41 $width = round($width / 2); 42 $height = round($height / 2); 43 } 44 $friends_username = stripslashes($info->username); 45 $friends_name = htmlentities(stripslashes($info->name)); 46 $friends_menu = run("users:infobox:menu",array($info->ident)); 47 $body .= <<< END 48 48 <td> 49 49 <p> … … 57 57 </td> 58 58 END; 59 if ($i % 5 == 0) {60 $body .= "</tr><tr>";61 }62 $i++;59 if ($i % 5 == 0) { 60 $body .= "</tr><tr>"; 61 } 62 $i++; 63 63 } 64 64 } else { 65 65 if ($user_id == $_SESSION['userid']) { 66 $body .= "<td><p>" . gettext("Nobody's listed you as a friend! Maybe you need to start chatting to some other users?") . "</p></td>";66 $body .= "<td><p>" . gettext("Nobody's listed you as a friend! Maybe you need to start chatting to some other users?") . "</p></td>"; 67 67 } else { 68 68 $body .= "<td><p>" . gettext("This user isn't currently listed as anyone's friend. Maybe you could be the first?") . "</p></td>"; … … 74 74 </div> 75 75 END; 76 }76 } 77 77 78 78 $run_result .= $body; devel/units/friends/generate_foaf.php
r64 r110 53 53 $run_result .= "\t\t</vCard:ADR>\n"; 54 54 55 $friends = db_query("select users.* from friends leftjoin users on users.ident = friends.friend where friends.owner = " . $user->ident);55 $friends = db_query("select users.* from friends join users on users.ident = friends.friend where friends.owner = " . $user->ident); 56 56 if (sizeof($friends) > 0) { 57 57 foreach($friends as $friend) { devel/units/friends/get_friends.php
r45 r110 17 17 $run_result = db_query("select friends.friend as user_id, 18 18 users.name from friends 19 leftjoin users on users.ident = friends.friend19 join users on users.ident = friends.friend 20 20 where friends.owner = $ident"); 21 21 devel/units/friends/profile_friends.php
r84 r110 5 5 if ($page_owner != -1 && run("users:type:get", $page_owner) == "person") { 6 6 $result = db_query("select users.ident from friends 7 leftjoin users on users.ident = friends.friend7 join users on users.ident = friends.friend 8 8 where friends.owner = $page_owner 9 9 and users.user_type = 'person' devel/units/groups/get_groups.php
r45 r110 23 23 $members = db_query("select group_membership.user_id, 24 24 users.name from group_membership 25 leftjoin users on users.ident = group_membership.user_id25 join users on users.ident = group_membership.user_id 26 26 where group_membership.group_id = " . $tempdata->ident); 27 27 $tempdata->members = $members; devel/units/icons/function_edit_icons.php
r96 r110 10 10 $icons = db_query("select * from icons where owner = $page_owner"); 11 11 if ($page_owner != $_SESSION['userid']) { 12 $currenticon = db_query("select icons.filename, users.icon from users leftjoin icons on icons.ident = users.icon where users.ident = $page_owner");12 $currenticon = db_query("select icons.filename, users.icon from users join icons on icons.ident = users.icon where users.ident = $page_owner"); 13 13 $currenticon = $currenticon[0]->filename; 14 14 } else { … … 28 28 $desc = gettext("Site pictures are small pictures that act as a representative icon throughout the system."); // gettext variable 29 29 $body .= <<< END 30 <form action="" method="post" /> 30 <form action="" method="post" /> 31 31 <p> 32 32 $desc … … 34 34 END; 35 35 foreach($icons as $icon) { 36 list($width, $height, $type, $attr) = getimagesize(path . "_icons/data/" . $icon->filename);36 list($width, $height, $type, $attr) = @getimagesize(path . "_icons/data/" . $icon->filename); 37 37 38 38 $delete = gettext("Delete"); … … 90 90 <p align="center"> 91 91 <input type="hidden" name="action" value="icons:edit" /> 92 <input type="submit" value=$save /> 92 <input type="submit" value=$save /> 93 93 </p> 94 94 </form> devel/units/invite/new_password.php
