|
Revision 1539, 1.4 kB
(checked in by renato, 10 months ago)
|
Setting prop svn:eol-style in LOTS of files.
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
if (isset($_GET['owner']) && $_GET['owner'] == -1) { |
|---|
| 12 |
define('context', 'external'); |
|---|
| 13 |
define('pages_external', true); |
|---|
| 14 |
} |
|---|
| 15 |
|
|---|
| 16 |
include(dirname(dirname(dirname(__FILE__))) . '/includes.php'); |
|---|
| 17 |
require(dirname(__FILE__) . '/lib/pages.inc.php'); |
|---|
| 18 |
|
|---|
| 19 |
if (page_owner() > 0) { |
|---|
| 20 |
define('context', 'pages'); |
|---|
| 21 |
} |
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
pages_actions(); |
|---|
| 25 |
|
|---|
| 26 |
templates_page_setup(); |
|---|
| 27 |
|
|---|
| 28 |
if (page_owner() < 1) { |
|---|
| 29 |
|
|---|
| 30 |
sidebar_remove(array('pages_sidebar'), true); |
|---|
| 31 |
} |
|---|
| 32 |
|
|---|
| 33 |
$page_id = optional_param('page'); |
|---|
| 34 |
$do_action = optional_param('do'); |
|---|
| 35 |
|
|---|
| 36 |
if (!pages_enabled()) { |
|---|
| 37 |
$page = new StdClass; |
|---|
| 38 |
$page->title = __gettext('Plugin disabled for users'); |
|---|
| 39 |
$page->content = __gettext('This plugin is currently disabled by site administrator'); |
|---|
| 40 |
} else { |
|---|
| 41 |
if ($do_action == 'edit') { |
|---|
| 42 |
$page = pages_edit_page($page_id, page_owner()); |
|---|
| 43 |
} else { |
|---|
| 44 |
$page = pages_get_page($page_id, page_owner()); |
|---|
| 45 |
} |
|---|
| 46 |
} |
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
if (!empty($page->ident)) { |
|---|
| 50 |
|
|---|
| 51 |
$title = pages_html_a(get_url($page_id, 'pages::page', page_owner()), $page->title); |
|---|
| 52 |
} else { |
|---|
| 53 |
$title = $page->title; |
|---|
| 54 |
} |
|---|
| 55 |
|
|---|
| 56 |
templates_page_output($title, $page->content); |
|---|
| 57 |
|
|---|
| 58 |
?> |
|---|
| 59 |
|
|---|