Skip to content

Commit

Permalink
Fix: compatibility with php 5.4 and E_STRICT mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Apr 14, 2012
1 parent c876b6f commit e49df57
Show file tree
Hide file tree
Showing 124 changed files with 7,310 additions and 4,530 deletions.
2 changes: 1 addition & 1 deletion COPYRIGHT
Expand Up @@ -18,7 +18,7 @@ GeoIP 2004 LGPL 2.1 Yes Sample code to m
NuSoap 0.9.5 LGPL 2.1 Yes Library to develop SOAP Web services (not into rpm and deb package)
OdtPHP 1.0.1 GPL 2.0 Yes Library to build/edit ODT files
PHPExcel 1.7.6 LGPL 2.1 Yes Read/Write XLS files, read ODS files
TCPDF 5.9.098 LGPL 3.0 Yes PDF generation
TCPDF 5.9.156 LGPL 3.0 Yes PDF generation

JS libraries:
jQuery 1.7.1 GPL and MIT Licence Yes JS library
Expand Down
1 change: 0 additions & 1 deletion htdocs/admin/contract.php
Expand Up @@ -156,7 +156,6 @@
// Info
$htmltooltip='';
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
$facture->type=0;
$nextval=$module->getNextValue($mysoc,$contract);
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
{
Expand Down
1 change: 0 additions & 1 deletion htdocs/admin/expedition.php
Expand Up @@ -387,7 +387,6 @@
// Info
$htmltooltip='';
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
$facture->type=0;
$nextval=$module->getNextValue($mysoc,$expedition);
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
{
Expand Down
3 changes: 1 addition & 2 deletions htdocs/admin/livraison.php
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -292,7 +292,6 @@
// Info
$htmltooltip='';
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
$facture->type=0;
$nextval=$module->getNextValue($mysoc,$livraison);
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
{
Expand Down
3 changes: 2 additions & 1 deletion htdocs/admin/workflow.php
Expand Up @@ -87,7 +87,8 @@
//, 'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_INVOICE')
)
);
$workflow = array_merge($workflow, $conf->modules_parts['workflow']);

if (! empty($conf->modules_parts['workflow'])) $workflow = array_merge($workflow, $conf->modules_parts['workflow']);

foreach($workflow as $child => $parents)
{
Expand Down
6 changes: 1 addition & 5 deletions htdocs/categories/class/categorie.class.php
Expand Up @@ -55,14 +55,10 @@ class Categorie
* Constructor
*
* @param DoliDB $db Database handler
* @param int $id Id of category to fetch during init
*/
function Categorie($db, $id=-1)
function __construct($db)
{
$this->db = $db;
$this->id = $id;

if ($id != -1) $this->fetch($this->id);
}

/**
Expand Down
4 changes: 1 addition & 3 deletions htdocs/commande/class/commande.class.php
Expand Up @@ -106,10 +106,8 @@ class Commande extends CommonObject
*
* @param DoliDB $db Database handler
*/
function Commande($db)
function __construct($db)
{
global $langs;
$langs->load('orders');
$this->db = $db;

$this->remise = 0;
Expand Down
8 changes: 5 additions & 3 deletions htdocs/core/modules/contract/modules_contract.php
Expand Up @@ -71,7 +71,7 @@ function getExample()
/**
* Test if existing numbers make problems with numbering
*
* @return boolean false if conflit, true if ok
* @return boolean false if conflit, true if ok
*/
function canBeActivated()
{
Expand All @@ -81,9 +81,11 @@ function canBeActivated()
/**
* Return next value
*
* @return string Value
* @param Societe $objsoc third party object
* @param Object $contract contract object
* @return string Value
*/
function getNextValue()
function getNextValue($objsoc, $contrat)
{
global $langs;
return $langs->trans("NotAvailable");
Expand Down
6 changes: 4 additions & 2 deletions htdocs/core/modules/expedition/modules_expedition.php
Expand Up @@ -114,9 +114,11 @@ function canBeActivated()
/**
* Return next value
*
* @return string Value
* @param Societe $objsoc Third party object
* @param Object $shipment Shipment object
* @return string Value
*/
function getNextValue()
function getNextValue($objsoc, $shipment)
{
global $langs;
return $langs->trans("NotAvailable");
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/modules/livraison/mod_livraison_jade.php
Expand Up @@ -106,7 +106,7 @@ function canBeActivated()
* @param Object $object Object we need next value for
* @return string Value if KO, <0 if KO
*/
function getNextValue($objsoc=0,$object='')
function getNextValue($objsoc,$object)
{
global $db,$conf;

Expand Down
6 changes: 3 additions & 3 deletions htdocs/core/modules/livraison/mod_livraison_saphir.php
Expand Up @@ -102,16 +102,16 @@ function getExample()
* Return next value
*
* @param Societe $objsoc Object third party
* @param Object $livraison Object delivery
* @param Object $object Object delivery
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc=0,$livraison='')
function getNextValue($objsoc,$object)
{
global $db,$conf;

require_once(DOL_DOCUMENT_ROOT ."/core/lib/functions2.lib.php");

// On d�fini critere recherche compteur
// On defini critere recherche compteur
$mask=$conf->global->LIVRAISON_SAPHIR_MASK;

if (! $mask)
Expand Down
6 changes: 4 additions & 2 deletions htdocs/core/modules/livraison/modules_livraison.php
Expand Up @@ -116,9 +116,11 @@ function canBeActivated()
/**
* Renvoi prochaine valeur attribuee
*
* @return string Valeur
* @param Societe $objsoc Object third party
* @param Object $object Object delivery
* @return string Valeur
*/
function getNextValue()
function getNextValue($objsoc, $object)
{
global $langs;
return $langs->trans("NotAvailable");
Expand Down
6 changes: 3 additions & 3 deletions htdocs/core/modules/project/mod_project_simple.php
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2010-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
Expand Down Expand Up @@ -102,7 +102,7 @@ function canBeActivated()
* @param Project $project Object project
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc=0,$project='')
function getNextValue($objsoc,$project)
{
global $db,$conf;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/modules/project/mod_project_universal.php
Expand Up @@ -104,7 +104,7 @@ function getExample()
* @param Project $project Object project
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc=0,$project='')
function getNextValue($objsoc,$project)
{
global $db,$conf;

Expand Down
8 changes: 5 additions & 3 deletions htdocs/core/modules/project/modules_project.php
Expand Up @@ -110,10 +110,12 @@ function canBeActivated()

/**
* Renvoi prochaine valeur attribuee
*
* @return string Valeur
*
* @param Societe $objsoc Object third party
* @param Project $project Object project
* @return string Valeur
*/
function getNextValue()
function getNextValue($objsoc, $project)
{
global $langs;
return $langs->trans("NotAvailable");
Expand Down
6 changes: 1 addition & 5 deletions htdocs/fourn/class/fournisseur.class.php
Expand Up @@ -41,17 +41,13 @@ class Fournisseur extends Societe
*
* @param DoliDB $db Database handler
*/
function Fournisseur($db)
function __construct($db)
{
global $config;

$this->db = $db;
$this->client = 0;
$this->fournisseur = 0;
$this->effectif_id = 0;
$this->forme_juridique_code = 0;

return 0;
}


Expand Down

0 comments on commit e49df57

Please sign in to comment.