Update of /cvsroot/phpwebsite-comm/modules/article
In directory vz-cvs-2.sog:/tmp/cvs-serv7264
Modified Files:
index.php
Log Message:
Formatting & error page changes
Index: index.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/article/index.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** index.php 3 Jan 2011 06:02:06 -0000 1.27
--- index.php 28 Jun 2011 16:09:22 -0000 1.28
***************
*** 20,25 ****
/* Process any form button submissions */
/* Button format is ARTICLE_vars[tab:command<::key:value><::key:value>...] */
! if (isset($_REQUEST['ARTICLE_vars']))
! {
$key = array_keys($_REQUEST['ARTICLE_vars']);
$arr = explode('::', $key[0]);
--- 20,24 ----
/* Process any form button submissions */
/* Button format is ARTICLE_vars[tab:command<::key:value><::key:value>...] */
! if (isset($_REQUEST['ARTICLE_vars'])) {
$key = array_keys($_REQUEST['ARTICLE_vars']);
$arr = explode('::', $key[0]);
***************
*** 32,62 ****
/* Determine the command to be executed */
! if (isset($_REQUEST['xmlrpc']))
! {
! require_once(PHPWS_SOURCE_DIR.'mod/article/inc/xmlrpc.php');
}
! if (!isset($_REQUEST['op']))
! {
! if (is_numeric($_REQUEST['id'])) {
! $temp = new PHPWS_Article((int) $_REQUEST['id']);
! Layout::add($temp->view_full());
! unset($temp);
! }
! elseif ($_REQUEST['id']=='news' || $_REQUEST['id']=='archives') {
! PHPWS_Core::initModClass('article', 'AM_Lists.php');
Layout::add(PHPWS_AM_Lists::list_summaries());
! }
! return;
}
! elseif ($_REQUEST['op']=='email')
! {
$temp = new PHPWS_Article($_REQUEST['id']);
$temp->mail();
unset($temp);
! return;
}
! elseif ($_REQUEST['op']=='print')
! {
$temp = new PHPWS_Article((int) $_REQUEST['id']);
Layout::add($temp->view_full());
--- 31,60 ----
/* Determine the command to be executed */
! if (isset($_REQUEST['xmlrpc'])) {
! require_once(PHPWS_SOURCE_DIR.'mod/article/inc/xmlrpc.php');
}
! if (!isset($_REQUEST['op'])) {
! if (is_numeric($_REQUEST['id'])) {
! $temp = new PHPWS_Article((int) $_REQUEST['id']);
! if (empty($temp->id)) {
! PHPWS_Core::errorPage('404');
! }
! Layout::add($temp->view_full());
! unset($temp);
! }
! elseif ($_REQUEST['id']=='news' || $_REQUEST['id']=='archives') {
! PHPWS_Core::initModClass('article', 'AM_Lists.php');
Layout::add(PHPWS_AM_Lists::list_summaries());
! }
! return;
}
! elseif ($_REQUEST['op']=='email') {
$temp = new PHPWS_Article($_REQUEST['id']);
$temp->mail();
unset($temp);
! return;
}
! elseif ($_REQUEST['op']=='print') {
$temp = new PHPWS_Article((int) $_REQUEST['id']);
Layout::add($temp->view_full());
***************
*** 67,80 ****
/* The rest of this module's functions are off-limits to non-users */
! elseif (!Current_User::allow('article'))
! {
! $template['TITLE'] = 'Article Manager';
! $template['CONTENT'] = dgettext('article', 'Members get to do fun stuff! Login or Register today!') . '<br />';
! $finalContent = PHPWS_Template::process($template, 'layout', 'box.tpl');
! Layout::add($finalContent);
! return;
}
! else
include(PHPWS_SOURCE_DIR . 'mod/article/index_admin.php');
!
?>
\ No newline at end of file
--- 65,73 ----
/* The rest of this module's functions are off-limits to non-users */
! elseif (!Current_User::allow('article')) {
! PHPWS_Core::errorPage('403');
}
! else {
include(PHPWS_SOURCE_DIR . 'mod/article/index_admin.php');
! }
?>
\ No newline at end of file
|