2
0
forked from Wavyzz/dolibarr

Merge remote-tracking branch 'upstream/develop' into camelCaps

This commit is contained in:
Frédéric FRANCE
2018-08-21 20:57:58 +02:00
216 changed files with 1840 additions and 818 deletions

View File

@@ -102,7 +102,8 @@ class Products extends DolibarrApi
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.tobuy:=:0) and (t.tosell:=:1)"
* @return array Array of product objects
*/
function index($sortfield = "t.ref", $sortorder = 'ASC', $limit = 100, $page = 0, $mode=0, $category=0, $sqlfilters = '') {
function index($sortfield = "t.ref", $sortorder = 'ASC', $limit = 100, $page = 0, $mode=0, $category=0, $sqlfilters = '')
{
global $db, $conf;
$obj_ret = array();
@@ -340,7 +341,7 @@ class Products extends DolibarrApi
}
if ($result < 0) {
throw new RestException(503, 'Error when retrieve category list : '.array_merge(array($categories->error), $categories->errors));
throw new RestException(503, 'Error when retrieve category list : '.array_merge(array($categories->error), $categories->errors));
}
return $result;
@@ -467,7 +468,8 @@ class Products extends DolibarrApi
* @param object $object Object to clean
* @return array Array of cleaned object properties
*/
function _cleanObjectDatas($object) {
function _cleanObjectDatas($object)
{
$object = parent::_cleanObjectDatas($object);

View File

@@ -168,7 +168,8 @@ class FormProduct
* @return String full label with all parents, separated by ' >> '
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function get_parent_path($tab, $final_label='') {
private function get_parent_path($tab, $final_label='')
{
if(empty($final_label)) $final_label = $tab['label'];

View File

@@ -4551,7 +4551,8 @@ class Product extends CommonObject
* @param int[]|int $categories Category or categories IDs
* @return void
*/
public function setCategories($categories) {
public function setCategories($categories)
{
// Handle single category
if (! is_array($categories)) {
$categories = array($categories);

View File

@@ -54,7 +54,8 @@ class Productcustomerprice extends CommonObject
*
* @param DoliDb $db handler
*/
function __construct($db) {
function __construct($db)
{
$this->db = $db;
return 1;
@@ -68,7 +69,8 @@ class Productcustomerprice extends CommonObject
* @param int $forceupdateaffiliate update price on each soc child
* @return int <0 if KO, Id of created object if OK
*/
function create($user, $notrigger = 0, $forceupdateaffiliate = 0) {
function create($user, $notrigger = 0, $forceupdateaffiliate = 0)
{
global $conf, $langs;
$error = 0;
@@ -524,7 +526,8 @@ class Productcustomerprice extends CommonObject
* @param int $forceupdateaffiliate update price on each soc child
* @return int <0 if KO, >0 if OK
*/
function update($user = 0, $notrigger = 0, $forceupdateaffiliate = 0) {
function update($user = 0, $notrigger = 0, $forceupdateaffiliate = 0)
{
global $conf, $langs;
$error = 0;
@@ -721,7 +724,8 @@ class Productcustomerprice extends CommonObject
* @param int $forceupdateaffiliate update price on each soc child
* @return int <0 if KO, >0 if OK
*/
function setPriceOnAffiliateThirdparty($user, $forceupdateaffiliate) {
function setPriceOnAffiliateThirdparty($user, $forceupdateaffiliate)
{
$error = 0;
@@ -813,7 +817,8 @@ class Productcustomerprice extends CommonObject
* @param int $notrigger triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
function delete($user, $notrigger = 0) {
function delete($user, $notrigger = 0)
{
global $conf, $langs;
$error = 0;
@@ -866,7 +871,8 @@ class Productcustomerprice extends CommonObject
* @param int $fromid of object to clone
* @return int id of clone
*/
function createFromClone($fromid) {
function createFromClone($fromid)
{
global $user, $langs;
@@ -916,7 +922,8 @@ class Productcustomerprice extends CommonObject
*
* @return void
*/
function initAsSpecimen() {
function initAsSpecimen()
{
$this->id = 0;

View File

@@ -647,7 +647,8 @@ class PropalmergepdfproductLine
var $tms='';
var $import_key;
function __construct() {
return 1;
}
function __construct()
{
return 1;
}
}