cvsimport

Conflicts:
	htdocs/core/class/canvas.class.php
This commit is contained in:
Regis Houssin 2011-09-25 18:59:26 +02:00
commit 746b3dbd5e
2 changed files with 37 additions and 30 deletions

View File

@ -85,7 +85,7 @@ function compare($x, $y)
/**
* Compare revisions
*
*
* @param array $x Parts of version 1
* @param array $y Parts of version 2
* @return int 1 if 1<2, 0 if 1=2, -1 if 1>2
@ -104,7 +104,7 @@ function revcompare($x, $y)
/**
* Output table
*
*
* @param array $list Array of records
* @return void
*/
@ -179,7 +179,7 @@ function create_script_table($list)
/**
* Output table
*
*
* @param array $list Array of records
* @return void
*/
@ -348,7 +348,7 @@ if (function_exists('eaccelerator_get'))
print "<br><br>";
print "<hr />";
print '<table><tr><td class="center">';
print '<strong>Eaccelerator is created by the eAccelerator team, <a href="http://eaccelerator.net">http://eaccelerator.net</a></strong><br><br>';
print 'Eaccelerator is created by the eAccelerator team, <a href="http://eaccelerator.net">http://eaccelerator.net</a><br><br>';
print "</td></tr></table>";

View File

@ -109,32 +109,6 @@ class Canvas
//print ' => template_dir='.$this->template_dir.'<br>';
}
/**
* Return if a canvas contains an action controller
*
* @return boolean Return if canvas contains actions (old feature. now actions should be inside hooks)
*/
function hasActions()
{
return (! is_object($this->control));
}
/**
* Shared method for canvas to execute actions
*
* @param string &$action Action string
* @param int $id Object id
* @return mixed Return return code of doActions of canvas
*/
function doActions(&$action='view', $id=0)
{
if (method_exists($this->control,'doActions'))
{
$ret = $this->control->doActions($action, $id);
return $ret;
}
}
/**
* Shared method for canvas to assign values for templates
*
@ -174,5 +148,38 @@ class Canvas
include($this->template_dir.($this->card?$this->card.'_':'').$this->actiontype.'.tpl.php'); // Include native PHP template
}
// This functions should not be used anymore because canvas should contains only templates.
// http://wiki.dolibarr.org/index.php/Canvas_development
/**
* Return if a canvas contains an action controller
*
* @return boolean Return if canvas contains actions (old feature. now actions should be inside hooks)
*/
function hasActions()
{
return (is_object($this->control));
}
/**
* Shared method for canvas to execute actions
*
* @param string &$action Action string
* @param int $id Object id
* @return mixed Return return code of doActions of canvas
* @deprecated This function is called if you add a doActions class inside your canvas. Try to not
* do that and add action code into a hook instead.
* @see http://wiki.dolibarr.org/index.php/Canvas_development
*/
function doActions(&$action='view', $id=0)
{
if (method_exists($this->control,'doActions'))
{
$ret = $this->control->doActions($action, $id);
return $ret;
}
}
}
?>