mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-20 09:58:04 +02:00
allow template to overwrite link and redirect_link methods
This commit is contained in:
parent
a3bb4afe1b
commit
b9f98321f5
@ -440,7 +440,7 @@ class egw extends egw_minimal
|
|||||||
*/
|
*/
|
||||||
static function link($url = '', $extravars = '')
|
static function link($url = '', $extravars = '')
|
||||||
{
|
{
|
||||||
return $GLOBALS['egw']->session->link($url, $extravars);
|
return $GLOBALS['egw']->framework->link($url, $extravars);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -452,7 +452,7 @@ class egw extends egw_minimal
|
|||||||
*/
|
*/
|
||||||
static function redirect_link($url = '',$extravars='')
|
static function redirect_link($url = '',$extravars='')
|
||||||
{
|
{
|
||||||
self::redirect($GLOBALS['egw']->session->link($url, $extravars));
|
return $GLOBALS['egw']->framework->redirect_link($url, $extravars);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -65,7 +65,7 @@ abstract class egw_framework
|
|||||||
*
|
*
|
||||||
* @return egw_framework
|
* @return egw_framework
|
||||||
*/
|
*/
|
||||||
function egw_framework($template)
|
function __construct($template)
|
||||||
{
|
{
|
||||||
$this->template = $template;
|
$this->template = $template;
|
||||||
|
|
||||||
@ -75,6 +75,42 @@ abstract class egw_framework
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHP4-Constructor
|
||||||
|
*
|
||||||
|
* The constructor instanciates the class in $GLOBALS['egw']->framework, from where it should be used
|
||||||
|
*
|
||||||
|
* @deprecated use __construct()
|
||||||
|
*/
|
||||||
|
function egw_framework($template)
|
||||||
|
{
|
||||||
|
self::__construct($template);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link url generator
|
||||||
|
*
|
||||||
|
* @param string $string The url the link is for
|
||||||
|
* @param string/array $extravars Extra params to be passed to the url
|
||||||
|
* @return string The full url after processing
|
||||||
|
*/
|
||||||
|
static function link($url = '', $extravars = '')
|
||||||
|
{
|
||||||
|
return $GLOBALS['egw']->session->link($url, $extravars);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Redirects direct to a generated link
|
||||||
|
*
|
||||||
|
* @param string $string The url the link is for
|
||||||
|
* @param string/array $extravars Extra params to be passed to the url
|
||||||
|
* @return string The full url after processing
|
||||||
|
*/
|
||||||
|
static function redirect_link($url = '',$extravars='')
|
||||||
|
{
|
||||||
|
egw::redirect(self::link($url, $extravars));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders an applicaton page with the complete eGW framework (header, navigation and menu)
|
* Renders an applicaton page with the complete eGW framework (header, navigation and menu)
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user