summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/blog.module6
-rw-r--r--modules/blog/blog.module6
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/blog.module b/modules/blog.module
index 7a6f577..fd390ae 100644
--- a/modules/blog.module
+++ b/modules/blog.module
@@ -62,7 +62,7 @@ function blog_page_user($userid = 0, $date = 0) {
** Display the last blogs for this user:
*/
- $result = db_query("SELECT n.nid, n.timestamp FROM node n LEFT JOIN users u ON u.id = n.author WHERE u.userid = '". check_input($userid) ."' AND n.timestamp > ". (time() - 2592000) ." LIMIT 15");
+ $result = db_query("SELECT n.nid, n.timestamp FROM node n LEFT JOIN users u ON u.id = n.author WHERE u.userid = '". check_input($userid) ."' AND n.timestamp > ". (time() - 2592000) ." ORDER BY n.timestamp DESC LIMIT 15");
while ($blog = db_fetch_object($result)) {
if ($date != date("ndy", $blog->timestamp)) {
$date = date("ndy", $blog->timestamp);
@@ -135,9 +135,9 @@ function blog_view($node) {
}
function blog_form($edit = array()) {
- global $REQUEST_URI, $id, $type, $user, $theme;
+ global $REQUEST_URI, $id, $mod, $type, $user, $theme;
- if ($edit[type] == "blog") {
+ if ($mod == "node" || $edit[type] == "blog") {
}
else if ($type == "blog") {
$item = node_get_object(array(type => "blog", nid => $id));
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 7a6f577..fd390ae 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -62,7 +62,7 @@ function blog_page_user($userid = 0, $date = 0) {
** Display the last blogs for this user:
*/
- $result = db_query("SELECT n.nid, n.timestamp FROM node n LEFT JOIN users u ON u.id = n.author WHERE u.userid = '". check_input($userid) ."' AND n.timestamp > ". (time() - 2592000) ." LIMIT 15");
+ $result = db_query("SELECT n.nid, n.timestamp FROM node n LEFT JOIN users u ON u.id = n.author WHERE u.userid = '". check_input($userid) ."' AND n.timestamp > ". (time() - 2592000) ." ORDER BY n.timestamp DESC LIMIT 15");
while ($blog = db_fetch_object($result)) {
if ($date != date("ndy", $blog->timestamp)) {
$date = date("ndy", $blog->timestamp);
@@ -135,9 +135,9 @@ function blog_view($node) {
}
function blog_form($edit = array()) {
- global $REQUEST_URI, $id, $type, $user, $theme;
+ global $REQUEST_URI, $id, $mod, $type, $user, $theme;
- if ($edit[type] == "blog") {
+ if ($mod == "node" || $edit[type] == "blog") {
}
else if ($type == "blog") {
$item = node_get_object(array(type => "blog", nid => $id));