Qual: Move function that should be local to class as private

This commit is contained in:
Laurent Destailleur 2011-09-13 12:28:09 +00:00
parent 6eaacf92ce
commit 26d7bb3a66
11 changed files with 23 additions and 20 deletions

View File

@ -65,7 +65,7 @@ class ActionsCardProduct extends Product
/** /**
* Return the title of card * Return the title of card
*/ */
function getTitle() private function getTitle()
{ {
global $langs; global $langs;
@ -250,7 +250,7 @@ class ActionsCardProduct extends Product
/** /**
* Fetch field list * Fetch field list
*/ */
function getFieldList() private function getFieldList()
{ {
global $conf, $langs; global $conf, $langs;

View File

@ -65,7 +65,7 @@ class ActionsCardService extends Product
/** /**
* Return the title of card * Return the title of card
*/ */
function getTitle() private function getTitle()
{ {
global $langs; global $langs;

View File

@ -348,7 +348,7 @@ abstract class ActionsCardCommon
/** /**
* Return the title of card * Return the title of card
*/ */
function getTitle($action) private function getTitle($action)
{ {
global $langs; global $langs;
@ -363,7 +363,8 @@ abstract class ActionsCardCommon
/** /**
* Assigne les valeurs par defaut pour le canvas * Assigne les valeurs par defaut pour le canvas
* @param action Type of template *
* @param string $action Type of template
*/ */
function assign_values($action) function assign_values($action)
{ {
@ -395,7 +396,7 @@ abstract class ActionsCardCommon
jQuery(document).ready(function () { jQuery(document).ready(function () {
jQuery("#radiocompany").click(function() { jQuery("#radiocompany").click(function() {
document.formsoc.action.value="create"; document.formsoc.action.value="create";
document.formsoc.canvas.value="default"; document.formsoc.canvas.value="company";
document.formsoc.private.value=0; document.formsoc.private.value=0;
document.formsoc.submit(); document.formsoc.submit();
}); });
@ -652,7 +653,7 @@ abstract class ActionsCardCommon
/** /**
* Assigne les valeurs POST dans l'objet * Assigne les valeurs POST dans l'objet
*/ */
function assign_post($action) private function assign_post($action)
{ {
global $langs, $mysoc; global $langs, $mysoc;

View File

@ -17,17 +17,17 @@
*/ */
/** /**
* \file htdocs/societe/canvas/default/actions_card_default.class.php * \file htdocs/societe/canvas/default/actions_card_company.class.php
* \ingroup thirdparty * \ingroup thirdparty
* \brief Fichier de la classe Thirdparty card controller (default canvas) * \brief Fichier de la classe Thirdparty card controller (default canvas)
*/ */
include_once(DOL_DOCUMENT_ROOT.'/societe/canvas/actions_card_common.class.php'); include_once(DOL_DOCUMENT_ROOT.'/societe/canvas/actions_card_common.class.php');
/** /**
* \class ActionsCardDefault * \class ActionsCardCompany
* \brief Class with controller methods for thirdparty canvas * \brief Class with controller methods for thirdparty canvas
*/ */
class ActionsCardDefault extends ActionsCardCommon class ActionsCardCompany extends ActionsCardCommon
{ {
var $db; var $db;
var $targetmodule; var $targetmodule;
@ -42,7 +42,7 @@ class ActionsCardDefault extends ActionsCardCommon
* @param string $canvas Name of canvas * @param string $canvas Name of canvas
* @param string $card Name of tab (sub-canvas) * @param string $card Name of tab (sub-canvas)
*/ */
function ActionsCardDefault($DB,$targetmodule,$canvas,$card) function ActionsCardCompany($DB,$targetmodule,$canvas,$card)
{ {
$this->db = $DB; $this->db = $DB;
$this->targetmodule = $targetmodule; $this->targetmodule = $targetmodule;
@ -53,7 +53,7 @@ class ActionsCardDefault extends ActionsCardCommon
/** /**
* Return the title of card * Return the title of card
*/ */
function getTitle($action) private function getTitle($action)
{ {
global $langs; global $langs;
@ -96,7 +96,8 @@ class ActionsCardDefault extends ActionsCardCommon
$this->tpl['profid3'] = $this->object->ape; $this->tpl['profid3'] = $this->object->ape;
$this->tpl['profid4'] = $this->object->idprof4; $this->tpl['profid4'] = $this->object->idprof4;
if ($conf->use_javascript_ajax && empty($conf->global->MAIN_DISABLEVATCHECK)) { if ($conf->use_javascript_ajax && empty($conf->global->MAIN_DISABLEVATCHECK))
{
$js = "\n"; $js = "\n";
$js.= '<script language="JavaScript" type="text/javascript">'; $js.= '<script language="JavaScript" type="text/javascript">';
$js.= "function CheckVAT(a) {\n"; $js.= "function CheckVAT(a) {\n";

View File

@ -16,16 +16,16 @@
*/ */
/** /**
* \file htdocs/societe/canvas/default/dao_thirdparty_default.class.php * \file htdocs/societe/canvas/company/dao_thirdparty_company.class.php
* \ingroup thirdparty * \ingroup thirdparty
* \brief Fichier de la classe des tiers par defaut * \brief Fichier de la classe des tiers par defaut
*/ */
/** /**
* \class DaoThirdPartyDefault * \class DaoThirdPartyCompany
* \brief Classe permettant la gestion des tiers par defaut, cette classe surcharge la classe societe * \brief Classe permettant la gestion des tiers par defaut, cette classe surcharge la classe societe
*/ */
class DaoThirdPartyDefault extends Societe class DaoThirdPartyCompany extends Societe
{ {
var $db; var $db;
@ -33,10 +33,11 @@ class DaoThirdPartyDefault extends Societe
var $errno = 0; var $errno = 0;
/** /**
* Constructeur de la classe * Constructor
* @param DB Handler acces base de donnees *
* @param DoliDB $DB Databae handler
*/ */
function DaoThirdPartyDefault($DB) function DaoThirdPartyCompany($DB)
{ {
$this->db = $DB; $this->db = $DB;
} }

View File

@ -53,7 +53,7 @@ class ActionsCardIndividual extends ActionsCardCommon
/** /**
* Return the title of card * Return the title of card
*/ */
function getTitle($action) private function getTitle($action)
{ {
global $langs; global $langs;