Fix: PHPCS

This commit is contained in:
Regis Houssin 2017-10-04 12:07:17 +02:00
parent 66ad30feb0
commit a124f47dcd
3 changed files with 15 additions and 11 deletions

View File

@ -882,7 +882,7 @@ class Categorie extends CommonObject
/** /**
* List categories of an element id * List categories of an element id
* *
* @param int $item Id of element * @param int $id Id of element
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
* @param string $sortfield Sort field * @param string $sortfield Sort field
* @param string $sortorder Sort order * @param string $sortorder Sort order

View File

@ -1,4 +1,6 @@
<?php <?php
use phpseclib\File\ASN1\Element;
/** /**
* Class to manage comment * Class to manage comment
*/ */
@ -6,7 +8,7 @@ class Comment extends CommonObject
{ {
public $element='comment'; //!< Id that identify managed objects public $element='comment'; //!< Id that identify managed objects
public $table_element='comment'; //!< Name of table without prefix where object is stored public $table_element='comment'; //!< Name of table without prefix where object is stored
var $fk_element; var $fk_element;
var $element_type; var $element_type;
@ -34,7 +36,7 @@ class Comment extends CommonObject
{ {
$this->db = $db; $this->db = $db;
} }
/** /**
* Create into database * Create into database
@ -280,12 +282,14 @@ class Comment extends CommonObject
return 1; return 1;
} }
} }
/** /**
* Load comments linked with current task * Load comments linked with current task
* *
* @return array Comment array * @param alpha $element_type Type of Element
* @param int $fk_element Id of Element
* @return array Comment array
*/ */
public static function fetchAllFor($element_type, $fk_element) public static function fetchAllFor($element_type, $fk_element)
{ {
@ -299,7 +303,7 @@ class Comment extends CommonObject
$sql.= " AND c.element_type = '".$element_type."'"; $sql.= " AND c.element_type = '".$element_type."'";
$sql.= " AND c.entity = ".$conf->entity; $sql.= " AND c.entity = ".$conf->entity;
$sql.= " ORDER BY c.tms DESC"; $sql.= " ORDER BY c.tms DESC";
dol_syslog("Comment::fetchAllFor", LOG_DEBUG); dol_syslog("Comment::fetchAllFor", LOG_DEBUG);
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)

View File

@ -511,11 +511,11 @@ class Ldap
* @param string $dn Old DN entry key (uid=qqq,ou=xxx,dc=aaa,dc=bbb) (before update) * @param string $dn Old DN entry key (uid=qqq,ou=xxx,dc=aaa,dc=bbb) (before update)
* @param string $newrdn New RDN entry key (uid=qqq) * @param string $newrdn New RDN entry key (uid=qqq)
* @param string $newparent New parent (ou=xxx,dc=aaa,dc=bbb) * @param string $newparent New parent (ou=xxx,dc=aaa,dc=bbb)
* @param bool $deleteoldrdn If TRUE the old RDN value(s) is removed, else the old RDN value(s) is retained as non-distinguished values of the entry.
* @param User $user Objet user that modify * @param User $user Objet user that modify
* @param bool $deleteoldrdn If TRUE the old RDN value(s) is removed, else the old RDN value(s) is retained as non-distinguished values of the entry.
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function rename($dn, $newrdn, $newparent, $deleteoldrdn = true, $user) function rename($dn, $newrdn, $newparent, $user, $deleteoldrdn = true)
{ {
global $conf; global $conf;
@ -589,7 +589,7 @@ class Ldap
if (! empty($olddn) && ! empty($newrdn) && ! empty($newparent) && $conf->global->LDAP_SERVER_PROTOCOLVERSION === '3') if (! empty($olddn) && ! empty($newrdn) && ! empty($newparent) && $conf->global->LDAP_SERVER_PROTOCOLVERSION === '3')
{ {
// This function currently only works with LDAPv3 // This function currently only works with LDAPv3
$result = $this->rename($olddn, $newrdn, $newparent, true, $user); $result = $this->rename($olddn, $newrdn, $newparent, $user, true);
} }
else else
{ {