[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: wcm/inc class.boelement.inc.php,1.6,1.7 class.ui
From: |
Miles Lott <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: wcm/inc class.boelement.inc.php,1.6,1.7 class.uielement.inc.php,1.10,1.11 |
Date: |
Tue, 19 Feb 2002 08:57:51 -0500 |
Update of /cvsroot/phpgroupware/wcm/inc
In directory subversions:/tmp/cvs-serv2193
Modified Files:
class.boelement.inc.php class.uielement.inc.php
Log Message:
Mainly, do not show all apps, just ones with registered website_??? hooks
Index: class.boelement.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/inc/class.boelement.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.boelement.inc.php 17 Feb 2002 17:56:22 -0000 1.6
--- class.boelement.inc.php 19 Feb 2002 13:57:48 -0000 1.7
***************
*** 37,40 ****
--- 37,41 ----
var $use_session = False;
+ var $hooks = array();
function boelement($session=False)
***************
*** 68,71 ****
--- 69,78 ----
if(isset($sort)) { $this->sort = $sort; }
if(isset($order)) { $this->order = $order; }
+
+ $this->hooks = array(
+ 'left' => array(),
+ 'mid' => array(),
+ 'right' => array()
+ );
}
***************
*** 172,175 ****
--- 179,199 ----
{
return $this->so->app_list();
+ }
+
+ function gethooks()
+ {
+ while(list($key,$val) =
@each($GLOBALS['phpgw']->hooks->found_hooks))
+ {
+ while(list($x,$y) = @each($val))
+ {
+ if(substr($x,0,7) == 'website')
+ {
+ $tmp = substr($x,8);
+ $this->hooks[$tmp][$key] = $key;
+ unset($tmp);
+ }
+ }
+ }
+ //_debug_array($this->hooks);
}
Index: class.uielement.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/inc/class.uielement.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.uielement.inc.php 17 Feb 2002 18:44:02 -0000 1.10
--- class.uielement.inc.php 19 Feb 2002 13:57:48 -0000 1.11
***************
*** 31,34 ****
--- 31,41 ----
var $bo = '';
var $nextmatchs = '';
+ var $hooks = array();
+
+ var $time = array(
+ 'days' => 0,
+ 'hours' => 0,
+ 'minutes' => 0
+ );
function uielement()
***************
*** 99,108 ****
}
function expire_time($time='')
{
if($time)
{
$time = intval($time);
! if($time >=86400)
{
$days = (round($time/86400) + 1);
--- 106,134 ----
}
+ function gethooks()
+ {
+ while(list($key,$val) =
@each($GLOBALS['phpgw']->hooks->found_hooks))
+ {
+ while(list($x,$y) = @each($val))
+ {
+ if(substr($x,0,7) == 'website')
+ {
+ // $tmp = substr($x,8);
+ $this->hooks[$key] = $key;
+ //unset($tmp);
+ }
+ }
+ }
+ //_debug_array($this->hooks);
+ }
+
function expire_time($time='')
{
if($time)
{
+ $days = $hours = $minutes = 0;
$time = intval($time);
!
! if($time >= 86400)
{
$days = (round($time/86400) + 1);
***************
*** 112,115 ****
--- 138,142 ----
$days = 0;
}
+
if($time >= 3600)
{
***************
*** 122,125 ****
--- 149,159 ----
$minutes = (round($time/60) + 1);
}
+
+ $this->time = array(
+ 'days' => intval($days),
+ 'hours' => intval($hours),
+ 'minutes' => intval($minutes)
+ );
+ return $this->time;
}
}
***************
*** 141,144 ****
--- 175,180 ----
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Done'));
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/wcm/index.php','menuaction=wcm.uiwcm.index'));
+
//$GLOBALS['phpgw']->template->set_var('updateurl',$GLOBALS['phpgw']->link('/index.php','menuaction=wcm.uielement.importhooks'));
+
//$GLOBALS['phpgw']->template->set_var('lang_update_hooks',lang('Update all
application hooks'));
if(!$this->start)
***************
*** 345,349 ****
case 4:
/* hook */
! $_type =
$this->formatted_list('element_source',$this->bo->app_list(),$element['element_source']);
$GLOBALS['phpgw']->template->set_var('multipart','');
$_file = '';
--- 381,386 ----
case 4:
/* hook */
! $this->gethooks();
! $_type =
$this->formatted_list('element_source',$this->hooks,$element['element_source']);
$GLOBALS['phpgw']->template->set_var('multipart','');
$_file = '';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: wcm/inc class.boelement.inc.php,1.6,1.7 class.uielement.inc.php,1.10,1.11,
Miles Lott <address@hidden> <=