Qual: Rename method loadControl into doActions to have a more common name used by MVC frameworks.

This commit is contained in:
Laurent Destailleur
2010-09-07 10:05:00 +00:00
parent e7f94d345b
commit e1bc58080c
5 changed files with 16 additions and 14 deletions

View File

@@ -81,11 +81,12 @@ class Canvas
}
/**
* Load data control
* Execute actions
* @param Id of object (may be empty for creation)
*/
function loadControl($socid)
function doActions($socid)
{
return $this->control->loadControl($socid);
return $this->control->doActions($socid);
}
/**

View File

@@ -337,7 +337,7 @@ class CardCommon
/**
* Load data control
*/
function loadControl($socid)
function doActions($socid)
{
global $conf, $user, $langs;

View File

@@ -69,11 +69,12 @@ class ActionsCardDefault extends CardCommon
}
/**
* Load data control
* Execute actions
* @param Id of object (may be empty for creation)
*/
function loadControl($socid)
function doActions($socid)
{
$return = parent::loadControl($socid);
$return = parent::doActions($socid);
return $return;
}

View File

@@ -69,11 +69,12 @@ class ActionsCardIndividual extends CardCommon
}
/**
* Load data control
* Execute actions
* @param Id of object (may be empty for creation)
*/
function loadControl($socid)
function doActions($socid)
{
$return = parent::loadControl($socid);
$return = parent::doActions($socid);
return $return;
}

View File

@@ -30,7 +30,6 @@
*/
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/canvas.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formadmin.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formcompany.class.php");
@@ -353,15 +352,15 @@ if (empty($canvas))
}
else
{
// -----------------------------------------
// -----------------------------------------
// When used with CANVAS
// -----------------------------------------
require_once(DOL_DOCUMENT_ROOT."/core/class/canvas.class.php");
$soccanvas = new Canvas($db);
$soccanvas->getCanvas('thirdparty','card',$canvas);
// Load data control
$soccanvas->loadControl($socid);
$soccanvas->doActions($socid);
}