|
Revision 474, 1.1 kB
(checked in by ben, 2 years ago)
|
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.
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
// Run includes |
|---|
| 6 |
require_once(dirname(dirname(__FILE__))."/includes.php"); |
|---|
| 7 |
|
|---|
| 8 |
run("weblogs:init"); |
|---|
| 9 |
run("profile:init"); |
|---|
| 10 |
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 |
} |
|---|
| 20 |
|
|---|
| 21 |
define("context", "weblog"); |
|---|
| 22 |
templates_page_setup(); |
|---|
| 23 |
|
|---|
| 24 |
$title = run("profile:display:name") . " :: " . gettext("Blog"); |
|---|
| 25 |
|
|---|
| 26 |
$body = run("content:weblogs:edit"); |
|---|
| 27 |
$body .= run("weblogs:edit"); |
|---|
| 28 |
|
|---|
| 29 |
$body = templates_draw(array( |
|---|
| 30 |
'context' => 'contentholder', |
|---|
| 31 |
'title' => $title, |
|---|
| 32 |
'body' => $body |
|---|
| 33 |
) |
|---|
| 34 |
); |
|---|
| 35 |
|
|---|
| 36 |
echo templates_page_draw( array( |
|---|
| 37 |
$title, $body |
|---|
| 38 |
) |
|---|
| 39 |
); |
|---|
| 40 |
|
|---|
| 41 |
?> |
|---|