Changeset 474

Show
Ignore:
Timestamp:
08/03/06 08:35:42 (2 years ago)
Author:
ben
Message:

Weblog post page now reverts to a 'you are not logged in message' and the default template if you aren't logged in. Also, if you don't have permission to post at the current blog and have got here somewhere, the page now reverts ownership to the currently logged in user's blog.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/_weblog/edit.php

    r296 r474  
    99        run("profile:init"); 
    1010        run("friends:init"); 
     11         
     12        global $page_owner; 
     13        if (!logged_on) { 
     14            $page_owner = -1; 
     15        } else { 
     16            if (!run("permissions:check", "weblog")) { 
     17                $page_owner = $_SESSION['userid']; 
     18            } 
     19        } 
    1120         
    1221        define("context", "weblog"); 
  • devel/units/weblogs/weblogs_posts_add.php

    r472 r474  
    33    global $page_owner; 
    44 
     5    if (logged_on) { 
     6     
     7     
    58    if (!run("permissions:check", "weblog")) { 
    69        if (logged_on) { 
     
    7174END; 
    7275 
     76    } else { 
     77         
     78        $run_result .= "<p>" . gettext("You must be logged in to post a new weblog entry. You may do so using the login pane to the right of the screen.") . "</p>"; 
     79         
     80    } 
     81 
    7382    $run_result .= $body; 
    7483