diff --git a/htdocs/core/class/html.formticketsup.class.php b/htdocs/core/class/html.formticketsup.class.php
index 6beae7438e2..b7834923b26 100644
--- a/htdocs/core/class/html.formticketsup.class.php
+++ b/htdocs/core/class/html.formticketsup.class.php
@@ -1,6 +1,6 @@
- * 2016 Christophe Battarel
+/* Copyright (C) - 2013-2015 Jean-François FERRY
+ * Copyright (C) 2016 Christophe Battarel
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,8 +31,8 @@ if (!class_exists('FormCompany')) {
/**
* Classe permettant la generation du formulaire d'un nouveau ticket
*
- * @package ticketsup
-
+ * \ingroup ticketsup
+ *
* \remarks Utilisation: $formticketsup = new FormTicketsup($db)
* \remarks $formticketsup->proprietes=1 ou chaine ou tableau de valeurs
* \remarks $formticketsup->show_form() affiche le formulaire
@@ -74,7 +74,6 @@ class FormTicketsup
public $withcancel;
/**
- *
* @var array $substit Substitutions
*/
public $substit = array();
@@ -414,9 +413,9 @@ class FormTicketsup
* @param string $filtertype To filter on field type in llx_c_ticketsup_type (array('code'=>xx,'label'=>zz))
* @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
* @param int $empty 1=peut etre vide, 0 sinon
- * @param int $noadmininfo 0=Add admin info, 1=Disable admin info
+ * @param int $noadmininfo 0=Add admin info, 1=Disable admin info
* @param int $maxlength Max length of label
- * @return void
+ * @return void
*/
public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0)
{
@@ -432,7 +431,7 @@ class FormTicketsup
$filterarray = explode(',', $filtertype);
}
- $ticketstat->load_cache_types_tickets();
+ $ticketstat->loadCacheTypesTickets();
print '';
if ($empty) {
diff --git a/htdocs/core/lib/ticketsup.lib.php b/htdocs/core/lib/ticketsup.lib.php
index 0e6b433f183..c3063783a6f 100644
--- a/htdocs/core/lib/ticketsup.lib.php
+++ b/htdocs/core/lib/ticketsup.lib.php
@@ -18,12 +18,10 @@
*/
/**
- * \file lib/ticketsup.lib.php
+ * \file core/lib/ticketsup.lib.php
* \ingroup ticketsup
- * \brief This file is an example module library
- * Put some comments here
+ * \brief This file is an example module library
*/
-
function ticketsupAdminPrepareHead()
{
global $langs, $conf;
@@ -60,16 +58,15 @@ function ticketsupAdminPrepareHead()
}
/**
- * \file htdocs/hosting/lib/hosting.lib.php
- * \brief Ensemble de fonctions de base pour le module hosting
- * \ingroup business
- * \version $Id$
+ * Prepare head for ticket card
+ *
+ * @param Object $object Object Ticket
+ * @return array Array of tabs
*/
-
function ticketsup_prepare_head($object)
{
-
global $db, $langs, $conf, $user;
+
$h = 0;
$head = array();
$head[$h][0] = dol_buildpath('/ticketsup/card.php', 1) . '?action=view&track_id=' . $object->track_id;
diff --git a/htdocs/core/modules/ticketsup/mod_ticketsup_simple.php b/htdocs/core/modules/ticketsup/mod_ticketsup_simple.php
index a8220c0ec9f..25fabb12377 100644
--- a/htdocs/core/modules/ticketsup/mod_ticketsup_simple.php
+++ b/htdocs/core/modules/ticketsup/mod_ticketsup_simple.php
@@ -139,15 +139,4 @@ class mod_ticketsup_simple extends ModeleNumRefTicketsup
return $this->prefix . $yymm . "-" . $num;
}
- /**
- * Return next reference not yet used as a reference
- *
- * @param Societe $objsoc Object third party
- * @param Project $ticketsup Object ticketsup
- * @return string Next not used reference
- */
- public function ticketsup_get_num($objsoc = 0, $ticketsup = '')
- {
- return $this->getNextValue($objsoc, $ticketsup);
- }
}
diff --git a/htdocs/core/modules/ticketsup/mod_ticketsup_universal.php b/htdocs/core/modules/ticketsup/mod_ticketsup_universal.php
index 5fe78df4e48..cc8b88d7e8d 100644
--- a/htdocs/core/modules/ticketsup/mod_ticketsup_universal.php
+++ b/htdocs/core/modules/ticketsup/mod_ticketsup_universal.php
@@ -122,15 +122,4 @@ class mod_ticketsup_universal extends ModeleNumRefTicketsup
return $numFinal;
}
- /**
- * Return next reference not yet used as a reference
- *
- * @param Societe $objsoc Object third party
- * @param Project $ticketsup Object ticketsup
- * @return string Next not used reference
- */
- public function ticketsup_get_num($objsoc = 0, $ticketsup = '')
- {
- return $this->getNextValue($objsoc, $ticketsup);
- }
}
diff --git a/htdocs/ticketsup/class/actions_ticketsup.class.php b/htdocs/ticketsup/class/actions_ticketsup.class.php
index 3c1c2febdae..bc532619ce5 100644
--- a/htdocs/ticketsup/class/actions_ticketsup.class.php
+++ b/htdocs/ticketsup/class/actions_ticketsup.class.php
@@ -29,9 +29,9 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php';
+
/**
- * \class ActionsTicketsup
- * \brief Class Actions of the module ticketsup
+ * Class Actions of the module ticketsup
*/
class ActionsTicketsup
{
@@ -76,9 +76,10 @@ class ActionsTicketsup
}
/**
- * Enter description here ...
+ * doActions
*
- * @param string $action Action type
+ * @param string $action Action type
+ * @return int 0
*/
public function doActions(&$action = '')
{
@@ -601,17 +602,18 @@ class ActionsTicketsup
}
}
}
+
+ return 0;
}
/**
* Add new message on a ticket (private area)
*
- * @param unknown $user
- * @param unknown $action
+ * @param User $user Object user
+ * @param string $action Action
*/
private function newMessage($user, &$action)
{
-
global $mysoc, $conf, $langs;
if (!class_exists('Contact')) {
@@ -818,8 +820,8 @@ class ActionsTicketsup
/**
* Add new message on a ticket (public area)
*
- * @param unknown $user
- * @param unknown $action
+ * @param User $user Object user
+ * @param string $action Action
*/
private function newMessagePublic($user, &$action)
{
@@ -961,10 +963,13 @@ class ActionsTicketsup
/**
* Fetch object
- *
+ *
+ * @param int $id Id
+ * @param int $track_id Track id
+ * @param string $ref Ref
* @return void
*/
- public function fetch($id = '', $track_id = '', $ref = '')
+ public function fetch($id = 0, $track_id = 0, $ref = '')
{
$this->getInstanceDao();
return $this->dao->fetch($id, $track_id, $ref);
@@ -972,7 +977,8 @@ class ActionsTicketsup
/**
* print statut
- *
+ *
+ * @param int $mode Mode
* @return void
*/
public function getLibStatut($mode = 0)
@@ -985,7 +991,8 @@ class ActionsTicketsup
/**
* Get ticket info
*
- * @param id Object id
+ * @param int $id Object id
+ * @return void
*/
public function getInfo($id)
{
@@ -999,7 +1006,8 @@ class ActionsTicketsup
/**
* Get action title
*
- * @param action Type of action
+ * @param string $action Type of action
+ * @return string Label
*/
public function getTitle($action = '')
{
@@ -1021,7 +1029,8 @@ class ActionsTicketsup
/**
* View html list of logs
*
- * @param boolean $show_user Show user who make action
+ * @param boolean $show_user Show user who make action
+ * @return void
*/
public function viewTicketLogs($show_user = true)
{
@@ -1083,7 +1092,8 @@ class ActionsTicketsup
/**
* View list of logs with timeline view
*
- * @param boolean $show_user Show user who make action
+ * @param boolean $show_user Show user who make action
+ * @return void
*/
public function viewTimelineTicketLogs($show_user = true)
{
@@ -1129,8 +1139,9 @@ class ActionsTicketsup
/**
* Show ticket original message
*
- * @param User $user $user wich display
- * @param string $action
+ * @param User $user Object user
+ * @param string $action Action
+ * @return void
*/
public function viewTicketOriginalMessage($user, $action = '')
{
@@ -1185,8 +1196,9 @@ class ActionsTicketsup
/**
* View html list of message for ticket
*
- * @param boolean $show_private Show private messages
- * @param boolean $show_user Show user who make action
+ * @param boolean $show_private Show private messages
+ * @param boolean $show_user Show user who make action
+ * @return void
*/
public function viewTicketMessages($show_private, $show_user = true)
{
@@ -1256,8 +1268,9 @@ class ActionsTicketsup
/**
* View list of message for ticket with timeline display
*
- * @param boolean $show_private Show private messages
- * @param boolean $show_user Show user who make action
+ * @param boolean $show_private Show private messages
+ * @param boolean $show_user Show user who make action
+ * @return void
*/
public function viewTicketTimelineMessages($show_private, $show_user = true)
{
@@ -1309,6 +1322,13 @@ class ActionsTicketsup
}
}
+ /**
+ * load_previous_next_ref
+ *
+ * @param string $filter Filter
+ * @param int $fieldid Id
+ * @return int 0
+ */
public function load_previous_next_ref($filter, $fieldid)
{
$this->getInstanceDao();
@@ -1399,12 +1419,12 @@ class ActionsTicketsup
/**
* Copy files into ticket directory
- *
* Used for files linked into messages
+ *
+ * @return void
*/
public function copyFilesForTicket()
{
-
global $conf;
// Create form object
@@ -1446,9 +1466,9 @@ class ActionsTicketsup
/**
* Print html navbar with link to set ticket status
- *
- * @global type $langs
- * @param type $selected : 0=>'NotRead', 1=>'Read', 3=>'Answered', 4=>'Assigned', 5 => 'InProgress', 6=> 'Waiting', 8=>'Closed', 9=>'Deleted'
+ * $selected : 0=>'NotRead', 1=>'Read', 3=>'Answered', 4=>'Assigned', 5 => 'InProgress', 6=> 'Waiting', 8=>'Closed', 9=>'Deleted'
+ *
+ * @return void
*/
public function viewStatusActions()
{
@@ -1487,7 +1507,11 @@ class ActionsTicketsup
}
-
+ /**
+ * deleteObjectLinked
+ *
+ * @return number
+ */
public function deleteObjectLinked()
{
return $this->dao->deleteObjectLinked();
@@ -1496,10 +1520,10 @@ class ActionsTicketsup
/**
* Hook to add email element template
*
- * @param array $parameters
- * @param Object $object
- * @param string $action
- * @param HookManager $hookmanager
+ * @param array $parameters Parameters
+ * @param Object $object Object
+ * @param string $action Action
+ * @param HookManager $hookmanager Hookmanager
* @return int
*/
public function emailElementlist($parameters, &$object, &$action, $hookmanager)
diff --git a/htdocs/ticketsup/class/api_ticketsups.class.php b/htdocs/ticketsup/class/api_ticketsups.class.php
index 7f69d3b27a4..fdfe4adae6c 100644
--- a/htdocs/ticketsup/class/api_ticketsups.class.php
+++ b/htdocs/ticketsup/class/api_ticketsups.class.php
@@ -472,7 +472,7 @@ class Ticketsups extends DolibarrApi
* @todo use an array for properties to clean
*
*/
- public function _cleanObjectDatas($object)
+ function _cleanObjectDatas($object)
{
// Remove $db object property for object
diff --git a/htdocs/ticketsup/class/ticketsup.class.php b/htdocs/ticketsup/class/ticketsup.class.php
index 03179cc36d9..b9266d9d4a2 100644
--- a/htdocs/ticketsup/class/ticketsup.class.php
+++ b/htdocs/ticketsup/class/ticketsup.class.php
@@ -536,11 +536,10 @@ class Ticketsup extends CommonObject
* @param string $sortorder Sort order
* @param string $sortfield Sort field
* @param int $limit page number
- * @param int $offset
+ * @param int $offset Offset
* @param int $arch archive or not (not used)
- * @param array $filter
- * output
- * @return int <0 if KO, >0 if OK
+ * @param array $filter Filter
+ * @return int <0 if KO, >0 if OK
*/
public function fetchAll($user, $sortorder = 'ASC', $sortfield = 't.datec', $limit = '', $offset = 0, $arch = '', $filter = '')
{
@@ -1012,7 +1011,7 @@ class Ticketsup extends CommonObject
*
* @return int Nb lignes chargees, 0 si deja chargees, <0 si ko
*/
- public function load_cache_types_tickets()
+ public function loadCacheTypesTickets()
{
global $langs;
diff --git a/htdocs/ticketsup/class/ticketsuplogs.class.php b/htdocs/ticketsup/class/ticketsuplogs.class.php
index e8f30d5db9f..1b6a9da2d2a 100644
--- a/htdocs/ticketsup/class/ticketsuplogs.class.php
+++ b/htdocs/ticketsup/class/ticketsuplogs.class.php
@@ -61,7 +61,7 @@ class Ticketsuplogs// extends CommonObject
*
* @param User $user User that creates
* @param int $notrigger 0=launch triggers after, 1=disable triggers
- * @return int <0 if KO, Id of created object if OK
+ * @return int <0 if KO, Id of created object if OK
*/
public function create($user, $notrigger = 0)
{
@@ -144,7 +144,7 @@ class Ticketsuplogs// extends CommonObject
/**
* Load object in memory from the database
*
- * @param int $id Id object
+ * @param int $id Id object
* @return int <0 if KO, >0 if OK
*/
public function fetch($id)
@@ -189,7 +189,7 @@ class Ticketsuplogs// extends CommonObject
*
* @param User $user User that modifies
* @param int $notrigger 0=launch triggers after, 1=disable triggers
- * @return int <0 if KO, >0 if OK
+ * @return int <0 if KO, >0 if OK
*/
public function update($user = 0, $notrigger = 0)
{
@@ -263,9 +263,9 @@ class Ticketsuplogs// extends CommonObject
/**
* Delete object in database
*
- * @param User $user User that deletes
- * @param int $notrigger 0=launch triggers after, 1=disable triggers
- * @return int <0 if KO, >0 if OK
+ * @param User $user User that deletes
+ * @param int $notrigger 0=launch triggers after, 1=disable triggers
+ * @return int <0 if KO, >0 if OK
*/
public function delete($user, $notrigger = 0)
{
@@ -315,10 +315,10 @@ class Ticketsuplogs// extends CommonObject
}
/**
- * Initialise object with example values
- * Id must be 0 if object instance is a specimen
+ * Initialise object with example values
+ * Id must be 0 if object instance is a specimen
*
- * @return void
+ * @return void
*/
public function initAsSpecimen()
{
diff --git a/htdocs/ticketsup/class/utils_diff.class.php b/htdocs/ticketsup/class/utils_diff.class.php
index 4f0d276b192..bd9e0e2d5ca 100644
--- a/htdocs/ticketsup/class/utils_diff.class.php
+++ b/htdocs/ticketsup/class/utils_diff.class.php
@@ -69,8 +69,7 @@ class Diff
$table = self::computeTable($sequence1, $sequence2, $start, $end1, $end2);
// generate the partial diff
- $partialDiff =
- self::generatePartialDiff($table, $sequence1, $sequence2, $start);
+ $partialDiff = self::generatePartialDiff($table, $sequence1, $sequence2, $start);
// generate the full diff
$diff = array();
@@ -148,8 +147,7 @@ class Diff
) {
$table[$index1][$index2] = $table[$index1 - 1][$index2 - 1] + 1;
} else {
- $table[$index1][$index2] =
- max($table[$index1 - 1][$index2], $table[$index1][$index2 - 1]);
+ $table[$index1][$index2] = max($table[$index1 - 1][$index2], $table[$index1][$index2 - 1]);
}
}
}
@@ -306,29 +304,26 @@ class Diff
switch ($diff[$index][1]) {
// display the content on the left and right
case self::UNMODIFIED:
- $leftCell =
- self::getCellContent(
+ $leftCell = self::getCellContent(
$diff,
$indentation,
$separator,
$index,
self::UNMODIFIED
);
- $rightCell = $leftCell;
+ $rightCell = $leftCell;
break;
// display the deleted on the left and inserted content on the right
case self::DELETED:
- $leftCell =
- self::getCellContent(
+ $leftCell = self::getCellContent(
$diff,
$indentation,
$separator,
$index,
self::DELETED
);
- $rightCell =
- self::getCellContent(
+ $rightCell = self::getCellContent(
$diff,
$indentation,
$separator,
@@ -340,8 +335,7 @@ class Diff
// display the inserted content on the right
case self::INSERTED:
$leftCell = '';
- $rightCell =
- self::getCellContent(
+ $rightCell = self::getCellContent(
$diff,
$indentation,
$separator,
@@ -388,14 +382,8 @@ class Diff
* $index - the current index, passes by reference
* $type - the type of line
*/
- private static function getCellContent(
- $diff,
- $indentation,
- $separator,
- &$index,
- $type
- ) {
-
+ private static function getCellContent($diff, $indentation, $separator, &$index, $type)
+ {
// initialise the HTML
$html = '';
diff --git a/htdocs/ticketsup/tpl/linkedobjectblock.tpl.php b/htdocs/ticketsup/tpl/linkedobjectblock.tpl.php
index e071881b506..cd23471129e 100644
--- a/htdocs/ticketsup/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/ticketsup/tpl/linkedobjectblock.tpl.php
@@ -15,7 +15,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
*/
?>