2
0
forked from Wavyzz/dolibarr

function Comment Missing

This commit is contained in:
Frédéric FRANCE
2018-08-31 21:39:23 +02:00
parent 7b1a705be4
commit ebcf43ec73
12 changed files with 134 additions and 39 deletions

View File

@@ -238,9 +238,9 @@
<!--<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
<severity>0</severity>
</rule>-->
<rule ref="PEAR.Commenting.FunctionComment.Missing">
<!--<rule ref="PEAR.Commenting.FunctionComment.Missing">
<severity>0</severity>
</rule>
</rule>-->
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType" />

View File

@@ -25,9 +25,18 @@ include_once DOL_DOCUMENT_ROOT.'/admin/dolistore/class/PSWebServiceLibrary.class
*/
class Dolistore
{
// params
public $start; // beginning of pagination
public $end; // end of pagination
/**
* beginning of pagination
* @var int
*/
public $start;
/**
* end of pagination
* @var int
*/
public $end;
public $per_page; // pagination: display per page
public $categorie; // the current categorie
public $search; // the search keywords
@@ -282,16 +291,33 @@ class Dolistore
return $html;
}
/**
* get previous link
*
* @param string $text symbol previous
* @return string html previous link
*/
function get_previous_link($text = '<<')
{
return '<a href="'.$this->get_previous_url().'" class="button">'.$text.'</a>';
}
/**
* get next link
*
* @param string $text symbol next
* @return string html next link
*/
function get_next_link($text = '>>')
{
return '<a href="'.$this->get_next_url().'" class="button">'.$text.'</a>';
}
/**
* get previous url
*
* @return string previous url
*/
function get_previous_url()
{
$param_array = array();
@@ -309,6 +335,11 @@ class Dolistore
return $this->url."&".$param;
}
/**
* get next url
*
* @return string next url
*/
function get_next_url()
{
$param_array = array();
@@ -326,6 +357,13 @@ class Dolistore
return $this->url."&".$param;
}
/**
* version compare
*
* @param string $v1 version 1
* @param string $v2 version 2
* @return int result of compare
*/
function version_compare($v1, $v2)
{
$v1 = explode('.', $v1);
@@ -355,4 +393,3 @@ class Dolistore
return $ret;
}
}

View File

@@ -52,6 +52,12 @@ if (!$mode) $mode='config';
// used in library escpos maybe useful if php doesn't support gzdecode
if (!function_exists('gzdecode')) {
/**
* Gzdecode
*
* @param string $data data to deflate
* @return string data deflated
*/
function gzdecode($data)
{
return gzinflate(substr($data,10,-8));
@@ -450,4 +456,3 @@ if ($mode == 'template' && $user->admin)
// End of page
llxFooter();
$db->close();

View File

@@ -607,6 +607,8 @@ function GETPOST($paramname, $check='none', $method=0, $filter=null, $options=nu
}
if (! function_exists('dol_getprefix'))
{
/**
* Return a prefix to use for this Dolibarr instance, for session/cookie names or email id.
* This prefix is valid in a web context only and is unique for instance and avoid conflict
@@ -616,8 +618,6 @@ function GETPOST($paramname, $check='none', $method=0, $filter=null, $options=nu
* @param string $mode '' (prefix for session name) or 'email' (prefix for email id)
* @return string A calculated prefix
*/
if (! function_exists('dol_getprefix'))
{
function dol_getprefix($mode='')
{
global $conf;

View File

@@ -1167,6 +1167,14 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
return $numFinal;
}
/**
* Get string between
*
* @param string $string String to test
* @param int $start Value for start
* @param int $end Value for end
* @return string Return part of string
*/
function get_string_between($string, $start, $end)
{
$string = " ".$string;

View File

@@ -34,6 +34,13 @@ class CdavLib
private $langs;
/**
* Constructor
*
* @param User $user user
* @param DoliDB $db Database handler
* @param Translation $langs translation
*/
function __construct($user, $db, $langs)
{
$this->user = $user;

View File

@@ -657,6 +657,9 @@ class PropalmergepdfproductLine
var $tms='';
var $import_key;
/**
* Constructor
*/
function __construct()
{
return 1;

View File

@@ -25,7 +25,7 @@
/**
* Define head array for tabs of inventory tools setup pages
*
* @return Array of head
* @return array Array of head
*/
function inventoryAdminPrepareHead()
{
@@ -55,6 +55,15 @@ function inventoryAdminPrepareHead()
return $head;
}
/**
* Define head array for tabs of inventory tools setup pages
*
* @param Inventory $inventory Object inventory
* @param string $title parameter
* @param string $get parameter
*
* @return array Array of head
*/
function inventoryPrepareHead(&$inventory, $title='Inventory', $get='')
{
global $langs;
@@ -66,6 +75,13 @@ function inventoryPrepareHead(&$inventory, $title='Inventory', $get='')
/**
* Define head array for tabs of inventory tools setup pages
*
* @param Inventory $inventory Object inventory
*
* @return string html of products
*/
function inventorySelectProducts(&$inventory)
{
global $conf,$db,$langs;
@@ -101,4 +117,3 @@ function inventorySelectProducts(&$inventory)
return $select_html;
}

View File

@@ -53,6 +53,11 @@ class ProductAttribute
*/
public $rang;
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
public function __construct(DoliDB $db)
{
global $conf;

View File

@@ -52,6 +52,11 @@ class ProductAttributeValue
*/
public $value;
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
public function __construct(DoliDB $db)
{
global $conf;

View File

@@ -70,6 +70,11 @@ class ProductCombination
*/
public $entity;
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
public function __construct(DoliDB $db)
{
global $conf;

View File

@@ -52,6 +52,11 @@ class ProductCombination2ValuePair
*/
public $fk_prod_attr_val;
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
public function __construct(DoliDB $db)
{
$this->db = $db;