diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/admin.module | 3 | ||||
-rw-r--r-- | modules/book.module | 2 | ||||
-rw-r--r-- | modules/book/book.module | 2 | ||||
-rw-r--r-- | modules/comment.module | 12 | ||||
-rw-r--r-- | modules/comment/comment.module | 12 | ||||
-rw-r--r-- | modules/profile.module | 13 | ||||
-rw-r--r-- | modules/profile/profile.module | 13 | ||||
-rw-r--r-- | modules/statistics.module | 2 | ||||
-rw-r--r-- | modules/statistics/statistics.module | 2 | ||||
-rw-r--r-- | modules/tracker.module | 4 | ||||
-rw-r--r-- | modules/tracker/tracker.module | 4 |
11 files changed, 37 insertions, 32 deletions
diff --git a/modules/admin.module b/modules/admin.module index 246c422e5..846d33bac 100644 --- a/modules/admin.module +++ b/modules/admin.module @@ -42,12 +42,11 @@ function admin_page() { <head> <title><?php echo variable_get("site_name", "drupal") . " " . t("administration pages"); ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> - <base href="<?php echo "$base_url/" ?>" /> + <?php print theme_head(); ?> <link rel="stylesheet" type="text/css" media="print" href="misc/print.css" /> <style type="text/css" title="layout" media="Screen"> @import url("misc/admin.css"); </style> - <?php print theme_head(); ?> </head> <body<?php print theme_onload_attribute(); ?>> <?php diff --git a/modules/book.module b/modules/book.module index 8e2c6057a..ee55265e2 100644 --- a/modules/book.module +++ b/modules/book.module @@ -104,7 +104,7 @@ function book_load($node) { /* ** If a user is about to update a book page, we overload some - ** fields to reflect the changes. We use the $REQUEST_URI to + ** fields to reflect the changes. We use the request URI to ** dectect this as we don't want to interfer with updating a ** book page through the admin pages. See also: book_save(). */ diff --git a/modules/book/book.module b/modules/book/book.module index 8e2c6057a..ee55265e2 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -104,7 +104,7 @@ function book_load($node) { /* ** If a user is about to update a book page, we overload some - ** fields to reflect the changes. We use the $REQUEST_URI to + ** fields to reflect the changes. We use the request URI to ** dectect this as we don't want to interfer with updating a ** book page through the admin pages. See also: book_save(). */ diff --git a/modules/comment.module b/modules/comment.module index 4dbfb90a4..e61cda4ef 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -5,11 +5,11 @@ $GLOBALS["cmodes"] = array(1 => t("Flat list - collapsed"), 2 => t("Flat list - $GLOBALS["corder"] = array(1 => t("Date - newest first"), 2 => t("Date - oldest first")); function comment_help() { -- $output .= t("<p>The comment module enables users to submit posts that are directly associated with a piece of content, a node. These associated posts are called <i>comments</i>. Comments may be <i>threaded</i>, which means that Drupal keeps track of multiple subconversations around a piece of content. Threading helps to keep the comment conversation organized. Users are presented with several ways to view the comment conversation, and if desired, users may easily choose a <i>flat</i> presentation of comments instead of a threaded one. Further, users may choose to order their comments view by <i>newest comments first</i> or by <i>oldest comments first</i>. Finally, users may view a folded list, where only comment <i>subjects</i> are displayed, or an expanded list, where the whole comment is shown.</p>"); -- $output .= t("<p>Since a busy site generates lots of comments, Drupal takes care to present a personalized view of comments for each user. A user can setup how they want they comments displayed -- Threaded/Flat, Expanded/Folded -- and how many comments to display per page. If there are more comments than you have configured to display on a page, navigation links are displayed. The home page displays, for the current user, the number of read and unread comments for a given node. Also, the tracker module (when installed) displays all recent comments on the site. Finally, comments which the user has not yet read are highlighted with a red star (this graphic may depend on the current theme).</p>"); -- $output .= t("<p>Comments behave like other user submissions in Drupal. Specifically, if the administrator has enabled them, ". l("filters", "admin/system/filters") .", like smileys and HTML, work fine. Also, throttles are usually enabled to prevent a single user from spamming the web site with too many comments in a short period of time.</p>"); -- $output .= t("<p>Administrators may control which roles are allowed to submit, submit without moderation, view and administer comments using the \"post comments\", \"post comments without approval\", \"access comments\", and \"administrate comments\" ". l("user permissions", "admin/user/permission") .". Additionally, administrators may set the default display view, edit or search through comments on the ". l("comments admininistration page", "admin/comment") .".</p>"); -- $output .= t("<p>If you really have a lot of comments, you can enable moderation. You assign ". l("moderation permissions", "admin/user/permission") ." to role(s), then setup some \"". l("moderation votes","admin/comment/moderation/votes") ."\"; these votes will appear to moderators in a dropdown menu near the comment. You also have to assign, for every role and every vote, ". l("a value", "admin/comment/moderation/matrix") .", which can be either positive or negative. This allows, if you wish, some roles to have greater \"weight\" in their moderation. If you set a value to 0, that vote won't be available to that role. When a user moderates, the value of their vote is added or subtracted to the score of that comment. Next your have to setup the \"". l("Queue settings", "admin/system/modules/queue") ."\" to allow a moderated comment to either be posted or dumpped. Finally, you may want to setup the ". l("comment thresholds", "admin/comment/moderation/threshold") .": these are floor/ceiling values which users can set in the comment control panel. Thresholds are useful for hiding poorly rated comments from your users while they are reading.</p>"); + $output .= t("<p>The comment module enables users to submit posts that are directly associated with a piece of content, a node. These associated posts are called <i>comments</i>. Comments may be <i>threaded</i>, which means that Drupal keeps track of multiple subconversations around a piece of content. Threading helps to keep the comment conversation organized. Users are presented with several ways to view the comment conversation, and if desired, users may easily choose a <i>flat</i> presentation of comments instead of a threaded one. Further, users may choose to order their comments view by <i>newest comments first</i> or by <i>oldest comments first</i>. Finally, users may view a folded list, where only comment <i>subjects</i> are displayed, or an expanded list, where the whole comment is shown.</p>"); + $output .= t("<p>Since a busy site generates lots of comments, Drupal takes care to present a personalized view of comments for each user. A user can setup how they want they comments displayed -- Threaded/Flat, Expanded/Folded -- and how many comments to display per page. If there are more comments than you have configured to display on a page, navigation links are displayed. The home page displays, for the current user, the number of read and unread comments for a given node. Also, the tracker module (when installed) displays all recent comments on the site. Finally, comments which the user has not yet read are highlighted with a red star (this graphic may depend on the current theme).</p>"); + $output .= t("<p>Comments behave like other user submissions in Drupal. Specifically, if the administrator has enabled them, ". l("filters", "admin/system/filters") .", like smileys and HTML, work fine. Also, throttles are usually enabled to prevent a single user from spamming the web site with too many comments in a short period of time.</p>"); + $output .= t("<p>Administrators may control which roles are allowed to submit, submit without moderation, view and administer comments using the \"post comments\", \"post comments without approval\", \"access comments\", and \"administrate comments\" ". l("user permissions", "admin/user/permission") .". Additionally, administrators may set the default display view, edit or search through comments on the ". l("comments admininistration page", "admin/comment") .".</p>"); + $output .= t("<p>If you really have a lot of comments, you can enable moderation. You assign ". l("moderation permissions", "admin/user/permission") ." to role(s), then setup some \"". l("moderation votes","admin/comment/moderation/votes") ."\"; these votes will appear to moderators in a dropdown menu near the comment. You also have to assign, for every role and every vote, ". l("a value", "admin/comment/moderation/matrix") .", which can be either positive or negative. This allows, if you wish, some roles to have greater \"weight\" in their moderation. If you set a value to 0, that vote won't be available to that role. When a user moderates, the value of their vote is added or subtracted to the score of that comment. Next your have to setup the \"". l("Queue settings", "admin/system/modules/queue") ."\" to allow a moderated comment to either be posted or dumpped. Finally, you may want to setup the ". l("comment thresholds", "admin/comment/moderation/threshold") .": these are floor/ceiling values which users can set in the comment control panel. Thresholds are useful for hiding poorly rated comments from your users while they are reading.</p>"); return $output; } @@ -465,7 +465,7 @@ function comment_render($node, $cid = 0) { if ($comment_num && ((variable_get("comment_controls", 0) == 0) || (variable_get("comment_controls", 0) == 2))) { print "<form method=\"post\" action=\"". url("comment") ."\">\n"; - theme("box", t("Control panel"), theme("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page)); + theme("box", "", theme("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page)); print form_hidden("nid", $nid); print "</form>"; } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 4dbfb90a4..e61cda4ef 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -5,11 +5,11 @@ $GLOBALS["cmodes"] = array(1 => t("Flat list - collapsed"), 2 => t("Flat list - $GLOBALS["corder"] = array(1 => t("Date - newest first"), 2 => t("Date - oldest first")); function comment_help() { -- $output .= t("<p>The comment module enables users to submit posts that are directly associated with a piece of content, a node. These associated posts are called <i>comments</i>. Comments may be <i>threaded</i>, which means that Drupal keeps track of multiple subconversations around a piece of content. Threading helps to keep the comment conversation organized. Users are presented with several ways to view the comment conversation, and if desired, users may easily choose a <i>flat</i> presentation of comments instead of a threaded one. Further, users may choose to order their comments view by <i>newest comments first</i> or by <i>oldest comments first</i>. Finally, users may view a folded list, where only comment <i>subjects</i> are displayed, or an expanded list, where the whole comment is shown.</p>"); -- $output .= t("<p>Since a busy site generates lots of comments, Drupal takes care to present a personalized view of comments for each user. A user can setup how they want they comments displayed -- Threaded/Flat, Expanded/Folded -- and how many comments to display per page. If there are more comments than you have configured to display on a page, navigation links are displayed. The home page displays, for the current user, the number of read and unread comments for a given node. Also, the tracker module (when installed) displays all recent comments on the site. Finally, comments which the user has not yet read are highlighted with a red star (this graphic may depend on the current theme).</p>"); -- $output .= t("<p>Comments behave like other user submissions in Drupal. Specifically, if the administrator has enabled them, ". l("filters", "admin/system/filters") .", like smileys and HTML, work fine. Also, throttles are usually enabled to prevent a single user from spamming the web site with too many comments in a short period of time.</p>"); -- $output .= t("<p>Administrators may control which roles are allowed to submit, submit without moderation, view and administer comments using the \"post comments\", \"post comments without approval\", \"access comments\", and \"administrate comments\" ". l("user permissions", "admin/user/permission") .". Additionally, administrators may set the default display view, edit or search through comments on the ". l("comments admininistration page", "admin/comment") .".</p>"); -- $output .= t("<p>If you really have a lot of comments, you can enable moderation. You assign ". l("moderation permissions", "admin/user/permission") ." to role(s), then setup some \"". l("moderation votes","admin/comment/moderation/votes") ."\"; these votes will appear to moderators in a dropdown menu near the comment. You also have to assign, for every role and every vote, ". l("a value", "admin/comment/moderation/matrix") .", which can be either positive or negative. This allows, if you wish, some roles to have greater \"weight\" in their moderation. If you set a value to 0, that vote won't be available to that role. When a user moderates, the value of their vote is added or subtracted to the score of that comment. Next your have to setup the \"". l("Queue settings", "admin/system/modules/queue") ."\" to allow a moderated comment to either be posted or dumpped. Finally, you may want to setup the ". l("comment thresholds", "admin/comment/moderation/threshold") .": these are floor/ceiling values which users can set in the comment control panel. Thresholds are useful for hiding poorly rated comments from your users while they are reading.</p>"); + $output .= t("<p>The comment module enables users to submit posts that are directly associated with a piece of content, a node. These associated posts are called <i>comments</i>. Comments may be <i>threaded</i>, which means that Drupal keeps track of multiple subconversations around a piece of content. Threading helps to keep the comment conversation organized. Users are presented with several ways to view the comment conversation, and if desired, users may easily choose a <i>flat</i> presentation of comments instead of a threaded one. Further, users may choose to order their comments view by <i>newest comments first</i> or by <i>oldest comments first</i>. Finally, users may view a folded list, where only comment <i>subjects</i> are displayed, or an expanded list, where the whole comment is shown.</p>"); + $output .= t("<p>Since a busy site generates lots of comments, Drupal takes care to present a personalized view of comments for each user. A user can setup how they want they comments displayed -- Threaded/Flat, Expanded/Folded -- and how many comments to display per page. If there are more comments than you have configured to display on a page, navigation links are displayed. The home page displays, for the current user, the number of read and unread comments for a given node. Also, the tracker module (when installed) displays all recent comments on the site. Finally, comments which the user has not yet read are highlighted with a red star (this graphic may depend on the current theme).</p>"); + $output .= t("<p>Comments behave like other user submissions in Drupal. Specifically, if the administrator has enabled them, ". l("filters", "admin/system/filters") .", like smileys and HTML, work fine. Also, throttles are usually enabled to prevent a single user from spamming the web site with too many comments in a short period of time.</p>"); + $output .= t("<p>Administrators may control which roles are allowed to submit, submit without moderation, view and administer comments using the \"post comments\", \"post comments without approval\", \"access comments\", and \"administrate comments\" ". l("user permissions", "admin/user/permission") .". Additionally, administrators may set the default display view, edit or search through comments on the ". l("comments admininistration page", "admin/comment") .".</p>"); + $output .= t("<p>If you really have a lot of comments, you can enable moderation. You assign ". l("moderation permissions", "admin/user/permission") ." to role(s), then setup some \"". l("moderation votes","admin/comment/moderation/votes") ."\"; these votes will appear to moderators in a dropdown menu near the comment. You also have to assign, for every role and every vote, ". l("a value", "admin/comment/moderation/matrix") .", which can be either positive or negative. This allows, if you wish, some roles to have greater \"weight\" in their moderation. If you set a value to 0, that vote won't be available to that role. When a user moderates, the value of their vote is added or subtracted to the score of that comment. Next your have to setup the \"". l("Queue settings", "admin/system/modules/queue") ."\" to allow a moderated comment to either be posted or dumpped. Finally, you may want to setup the ". l("comment thresholds", "admin/comment/moderation/threshold") .": these are floor/ceiling values which users can set in the comment control panel. Thresholds are useful for hiding poorly rated comments from your users while they are reading.</p>"); return $output; } @@ -465,7 +465,7 @@ function comment_render($node, $cid = 0) { if ($comment_num && ((variable_get("comment_controls", 0) == 0) || (variable_get("comment_controls", 0) == 2))) { print "<form method=\"post\" action=\"". url("comment") ."\">\n"; - theme("box", t("Control panel"), theme("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page)); + theme("box", "", theme("comment_controls", $threshold, $mode, $order, $nid, $comment_page, $comment_num, $comments_per_page)); print form_hidden("nid", $nid); print "</form>"; } diff --git a/modules/profile.module b/modules/profile.module index 71e7f7653..d9ef80489 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -11,8 +11,9 @@ function _profile_init() { $GLOBALS["profile_fields"] = array( "address" => array("textfield", t("Address"), "", 64, 64, t("Your address: street and number.")), "city" => array("textfield", t("City"), "", 64, 64, t("Your city.")), - "state" => array("textfield", t("State"), "", 4, 2, t("Your state as a two letter code.")), - "zip" => array("textfield", t("Zip"), "", 7, 5, t("Your ZIP code.")), + "state" => array("textfield", t("State / Province / Region"), "", 64, 64, ""), + "zip" => array("textfield", t("Zip / Postal Code"), "", 7, 10, ""), + "country" => array("textfield", t("Country"), "", 64, 64, t("Your country.")), "birthday" => array("", t("Birthday"), ""), "gender" => array("select", t("Gender"), "", array(0 => "-", "m" => t("male"), "f" => t("female")), "", 0, 0), "job" => array("textfield", t("Job title"), "", 64, 64, t("Your job title or position.")), @@ -24,7 +25,7 @@ function _profile_init() { "biography" => array("textarea", t("Biography"), "", 64, 4, ""), "interests" => array("textarea", t("Interests"), "", 64, 4, t("What you like.")), "publickey" => array("textarea", t("Public key"), "", 64, 4, ""), - "avatar" => array("", t("Avatar or picture"), t("Your virtual face or picture.")) + "avatar" => array("", t("Avatar or picture"), t(t("Your virtual face or picture. Maximum dimensions are ".variable_get("profile_avatar_dimensions", "85x85")." and max size is ".variable_get("profile_avatar_file_size", "30")."kb."))) ); $GLOBALS["profile_days"][0] = t("day"); @@ -174,12 +175,14 @@ function _profile_user_view(&$user, $mode) { foreach (_profile_active_fields($mode) as $name) { $field = $profile_fields[$name]; $t = "profile_".$name; + if (!empty($user->$t)) { switch ($field[0]) { case "textfield": case "textarea": case "checkbox": - $output .= form_item($field[1], check_output($user->$t)); + $value = ($t == "profile_homepage") ? "<a href=\"".check_output($user->$t)."\">".check_output($user->$t)."</a>" : check_output($user->$t); + $output .= form_item($field[1], $value); break; case "select": $output .= form_item($field[1], check_output($profile_fields[$name][3][$user->$t])); @@ -197,7 +200,7 @@ function _profile_user_view(&$user, $mode) { if (isset($user->profile_birthday) && isset($user->profile_birthmonth) && isset($user->profile_birthyear)) { // this is very european-centric, can we use format_date? $time = mktime(0, 0, 0, $user->profile_birthmonth, $user->profile_birthday, $user->profile_birthyear); - $output .= form_item(t("Birthday"), format_date($time)); + $output .= form_item(t("Birthday"), format_date($time, "custom", "F j, Y")); } } } diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 71e7f7653..d9ef80489 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -11,8 +11,9 @@ function _profile_init() { $GLOBALS["profile_fields"] = array( "address" => array("textfield", t("Address"), "", 64, 64, t("Your address: street and number.")), "city" => array("textfield", t("City"), "", 64, 64, t("Your city.")), - "state" => array("textfield", t("State"), "", 4, 2, t("Your state as a two letter code.")), - "zip" => array("textfield", t("Zip"), "", 7, 5, t("Your ZIP code.")), + "state" => array("textfield", t("State / Province / Region"), "", 64, 64, ""), + "zip" => array("textfield", t("Zip / Postal Code"), "", 7, 10, ""), + "country" => array("textfield", t("Country"), "", 64, 64, t("Your country.")), "birthday" => array("", t("Birthday"), ""), "gender" => array("select", t("Gender"), "", array(0 => "-", "m" => t("male"), "f" => t("female")), "", 0, 0), "job" => array("textfield", t("Job title"), "", 64, 64, t("Your job title or position.")), @@ -24,7 +25,7 @@ function _profile_init() { "biography" => array("textarea", t("Biography"), "", 64, 4, ""), "interests" => array("textarea", t("Interests"), "", 64, 4, t("What you like.")), "publickey" => array("textarea", t("Public key"), "", 64, 4, ""), - "avatar" => array("", t("Avatar or picture"), t("Your virtual face or picture.")) + "avatar" => array("", t("Avatar or picture"), t(t("Your virtual face or picture. Maximum dimensions are ".variable_get("profile_avatar_dimensions", "85x85")." and max size is ".variable_get("profile_avatar_file_size", "30")."kb."))) ); $GLOBALS["profile_days"][0] = t("day"); @@ -174,12 +175,14 @@ function _profile_user_view(&$user, $mode) { foreach (_profile_active_fields($mode) as $name) { $field = $profile_fields[$name]; $t = "profile_".$name; + if (!empty($user->$t)) { switch ($field[0]) { case "textfield": case "textarea": case "checkbox": - $output .= form_item($field[1], check_output($user->$t)); + $value = ($t == "profile_homepage") ? "<a href=\"".check_output($user->$t)."\">".check_output($user->$t)."</a>" : check_output($user->$t); + $output .= form_item($field[1], $value); break; case "select": $output .= form_item($field[1], check_output($profile_fields[$name][3][$user->$t])); @@ -197,7 +200,7 @@ function _profile_user_view(&$user, $mode) { if (isset($user->profile_birthday) && isset($user->profile_birthmonth) && isset($user->profile_birthyear)) { // this is very european-centric, can we use format_date? $time = mktime(0, 0, 0, $user->profile_birthmonth, $user->profile_birthday, $user->profile_birthyear); - $output .= form_item(t("Birthday"), format_date($time)); + $output .= form_item(t("Birthday"), format_date($time, "custom", "F j, Y")); } } } diff --git a/modules/statistics.module b/modules/statistics.module index a167c734a..3b8d7d8ca 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -314,7 +314,7 @@ function statistics_admin_accesslog_table($type, $id) { $url = message_na(); } - $rows[] = array(array("data" => format_date($log->timestamp, "small"), "nowrap" => "nowrap"), ($node->nid ? l($node->title, "statistics/log/$node->nid") : message_na()), format_name($user), $log->hostname ? $log->hostname : message_na(), $url, ($log->nid ? l("track node", "admin/statistics/log/node/$log->nid") : ""), ($user->uid ? l("track user", "admin/statistics/log/user/$user->uid") : ""), ($log->hostname ? l("track host", "admin/statistics/log/host/$log->hostname") : "")); + $rows[] = array(array("data" => format_date($log->timestamp, "small"), "nowrap" => "nowrap"), ($node->nid ? l($node->title, "node/view/$node->nid") : message_na()), format_name($user), $log->hostname ? $log->hostname : message_na(), $url, ($log->nid ? l("track node", "admin/statistics/log/node/$log->nid") : ""), ($user->uid ? l("track user", "admin/statistics/log/user/$user->uid") : ""), ($log->hostname ? l("track host", "admin/statistics/log/host/$log->hostname") : "")); } if ($pager = pager_display(NULL, 50, 0, "admin")) { diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index a167c734a..3b8d7d8ca 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -314,7 +314,7 @@ function statistics_admin_accesslog_table($type, $id) { $url = message_na(); } - $rows[] = array(array("data" => format_date($log->timestamp, "small"), "nowrap" => "nowrap"), ($node->nid ? l($node->title, "statistics/log/$node->nid") : message_na()), format_name($user), $log->hostname ? $log->hostname : message_na(), $url, ($log->nid ? l("track node", "admin/statistics/log/node/$log->nid") : ""), ($user->uid ? l("track user", "admin/statistics/log/user/$user->uid") : ""), ($log->hostname ? l("track host", "admin/statistics/log/host/$log->hostname") : "")); + $rows[] = array(array("data" => format_date($log->timestamp, "small"), "nowrap" => "nowrap"), ($node->nid ? l($node->title, "node/view/$node->nid") : message_na()), format_name($user), $log->hostname ? $log->hostname : message_na(), $url, ($log->nid ? l("track node", "admin/statistics/log/node/$log->nid") : ""), ($user->uid ? l("track user", "admin/statistics/log/user/$user->uid") : ""), ($log->hostname ? l("track host", "admin/statistics/log/host/$log->hostname") : "")); } if ($pager = pager_display(NULL, 50, 0, "admin")) { diff --git a/modules/tracker.module b/modules/tracker.module index a48234707..c4c3e9607 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -25,10 +25,10 @@ function tracker_link($type) { function tracker_posts($id = 0) { if ($id) { - $sresult = pager_query("SELECT n.nid, n.title, n.type, n.changed, n.uid, u.name, MAX(GREATEST(n.changed, c.timestamp)) AS last_activity FROM node n LEFT JOIN comments c ON n.nid = c.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.uid = '". check_query($id) ."' AND n.status = 1 GROUP BY n.nid, n.title, n.type, n.changed, n.uid, u.name ORDER BY last_activity DESC", 10, 0, "SELECT COUNT(nid) FROM node WHERE uid = '". check_query($id) ."'"); + $sresult = pager_query("SELECT n.nid, n.title, n.type, n.changed, n.uid, u.name, MAX(GREATEST(n.changed, c.timestamp)) AS last_activity FROM node n LEFT JOIN comments c ON n.nid = c.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.uid = '". check_query($id) ."' AND n.status = 1 GROUP BY n.nid, n.title, n.type, n.changed, n.uid, u.name ORDER BY last_activity DESC", 10, 0, "SELECT COUNT(nid) FROM node WHERE status = 1 AND uid = '". check_query($id) ."'"); } else { - $sresult = pager_query("SELECT n.nid, n.title, n.type, n.changed, n.uid, u.name, MAX(GREATEST(n.changed, c.timestamp)) AS last_activity FROM node n LEFT JOIN comments c ON n.nid = c.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.status = 1 GROUP BY n.nid, n.title, n.type, n.changed, n.uid, u.name ORDER BY last_activity DESC", 10, 0, "SELECT COUNT(nid) FROM node"); + $sresult = pager_query("SELECT n.nid, n.title, n.type, n.changed, n.uid, u.name, MAX(GREATEST(n.changed, c.timestamp)) AS last_activity FROM node n LEFT JOIN comments c ON n.nid = c.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.status = 1 GROUP BY n.nid, n.title, n.type, n.changed, n.uid, u.name ORDER BY last_activity DESC", 10, 0, "SELECT COUNT(nid) FROM node WHERE status = 1"); } $header = array(t("Type"), t("Title"), t("Author")); diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index a48234707..c4c3e9607 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -25,10 +25,10 @@ function tracker_link($type) { function tracker_posts($id = 0) { if ($id) { - $sresult = pager_query("SELECT n.nid, n.title, n.type, n.changed, n.uid, u.name, MAX(GREATEST(n.changed, c.timestamp)) AS last_activity FROM node n LEFT JOIN comments c ON n.nid = c.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.uid = '". check_query($id) ."' AND n.status = 1 GROUP BY n.nid, n.title, n.type, n.changed, n.uid, u.name ORDER BY last_activity DESC", 10, 0, "SELECT COUNT(nid) FROM node WHERE uid = '". check_query($id) ."'"); + $sresult = pager_query("SELECT n.nid, n.title, n.type, n.changed, n.uid, u.name, MAX(GREATEST(n.changed, c.timestamp)) AS last_activity FROM node n LEFT JOIN comments c ON n.nid = c.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.uid = '". check_query($id) ."' AND n.status = 1 GROUP BY n.nid, n.title, n.type, n.changed, n.uid, u.name ORDER BY last_activity DESC", 10, 0, "SELECT COUNT(nid) FROM node WHERE status = 1 AND uid = '". check_query($id) ."'"); } else { - $sresult = pager_query("SELECT n.nid, n.title, n.type, n.changed, n.uid, u.name, MAX(GREATEST(n.changed, c.timestamp)) AS last_activity FROM node n LEFT JOIN comments c ON n.nid = c.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.status = 1 GROUP BY n.nid, n.title, n.type, n.changed, n.uid, u.name ORDER BY last_activity DESC", 10, 0, "SELECT COUNT(nid) FROM node"); + $sresult = pager_query("SELECT n.nid, n.title, n.type, n.changed, n.uid, u.name, MAX(GREATEST(n.changed, c.timestamp)) AS last_activity FROM node n LEFT JOIN comments c ON n.nid = c.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.status = 1 GROUP BY n.nid, n.title, n.type, n.changed, n.uid, u.name ORDER BY last_activity DESC", 10, 0, "SELECT COUNT(nid) FROM node WHERE status = 1"); } $header = array(t("Type"), t("Title"), t("Author")); |