[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: sitemgr/inc class.module_redirect.inc.php,NONE,1
From: |
Michael Totschnig <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: sitemgr/inc class.module_redirect.inc.php,NONE,1.1 class.Pages_BO.inc.php,1.4,1.5 class.Pages_SO.inc.php,1.10,1.11 |
Date: |
Fri, 17 Jan 2003 23:30:36 -0500 |
Update of /cvsroot/phpgroupware/sitemgr/inc
In directory subversions:/tmp/cvs-serv10045/inc
Modified Files:
class.Pages_BO.inc.php class.Pages_SO.inc.php
Added Files:
class.module_redirect.inc.php
Log Message:
remove code that is no longer needed
implement lang_ variables in template
added a redirect module
streamline displaypagebyname
remove testing code from NukeNews template
--- NEW FILE ---
<?php
class module_redirect extends Module
{
function module_redirect()
{
$this->name = "redirect";
$this->arguments = array(
'URL' => array(
'type' => 'textfield',
'label' => 'The URL to redirect to'
)
);
$this->title = "Redirection";
$this->description = "This module lets you define pages that
redirect to another URL, if you use it, there should be no other block defined
for the page";
}
function get_content(&$arguments,$properties)
{
Header('Location: ' . $arguments['URL']);
exit;
}
}
Index: class.Pages_BO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Pages_BO.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.Pages_BO.inc.php 17 Jan 2003 03:37:52 -0000 1.4
--- class.Pages_BO.inc.php 18 Jan 2003 04:30:34 -0000 1.5
***************
*** 6,10 ****
function Pages_BO()
{
- //all sitemgr BOs should be instantiated via a
globalized Common_BO object,
$this->pageso = CreateObject('sitemgr.Pages_SO',True);
}
--- 6,9 ----
***************
*** 57,61 ****
function removePage($cat_id, $page_id)
{
- echo "debug $cat_id";
if
($GLOBALS['Common_BO']->acl->can_write_category($cat_id))
{
--- 56,59 ----
Index: class.Pages_SO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Pages_SO.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.Pages_SO.inc.php 17 Jan 2003 03:37:52 -0000 1.10
--- class.Pages_SO.inc.php 18 Jan 2003 04:30:34 -0000 1.11
***************
*** 76,105 ****
}
! function getPageByName($page_name,$lang)
{
! $sql = 'SELECT * FROM phpgw_sitemgr_pages WHERE
name=\'' . $page_name . '\'';
$this->db->query($sql,__LINE__,__FILE__);
if ($this->db->next_record())
{
! $page = CreateObject('sitemgr.Page_SO', True);
! $page->id = $this->db->f('page_id');
! $page->cat_id = $this->db->f('cat_id');
! $page->name =
stripslashes($this->db->f('name'));
! $page->sort_order = (int)
$this->db->f('sort_order');
! $page->hidden = $this->db->f('hide_page');
!
! $sql = "SELECT * FROM phpgw_sitemgr_pages_lang
WHERE page_id='" . $page->id . "' and lang='$lang'";
! $this->db->query($sql,__LINE__,__FILE__);
!
! if ($this->db->next_record())
! {
! $page->title=
stripslashes($this->db->f('title'));
! $page->subtitle =
stripslashes($this->db->f('subtitle'));
! }
! else
! {
! $page->title = lang("The page %1 has
not yet been translated to %2",$page->name, $lang);
! }
! return $page;
}
else
--- 76,86 ----
}
! function PagetoID($page_name)
{
! $sql = 'SELECT page_id FROM phpgw_sitemgr_pages WHERE
name=\'' . $page_name . '\'';
$this->db->query($sql,__LINE__,__FILE__);
if ($this->db->next_record())
{
! return $this->db->f('page_id');
}
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: sitemgr/inc class.module_redirect.inc.php,NONE,1.1 class.Pages_BO.inc.php,1.4,1.5 class.Pages_SO.inc.php,1.10,1.11,
Michael Totschnig <address@hidden> <=