diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php
index 28f488a5f90..825b3811e03 100644
--- a/htdocs/admin/tools/eaccelerator.php
+++ b/htdocs/admin/tools/eaccelerator.php
@@ -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 "
";
print "
";
print '";
diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php
index 282832d471d..31052afbfbd 100644
--- a/htdocs/core/class/canvas.class.php
+++ b/htdocs/core/class/canvas.class.php
@@ -109,32 +109,6 @@ class Canvas
//print ' => template_dir='.$this->template_dir.'
';
}
- /**
- * 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;
+ }
+ }
+
}
?>