diff --git a/build/debian/control b/build/debian/control index 37689ef9bcc..75ffb43b2c0 100755 --- a/build/debian/control +++ b/build/debian/control @@ -26,11 +26,11 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | # Misc dependencies # fonts-dejavu-core | ttf-dejavu-core, xdg-utils, - virtual-mysql-client, + mariadb-client | virtual-mysql-client, ${misc:Depends}, ${perl:Depends} Recommends: apache2 | lighttpd | httpd, - virtual-mysql-server + mariadb-server | virtual-mysql-server Suggests: www-browser, php5-geoip Description: Web based software to manage a company or foundation Dolibarr ERP & CRM is an easy to use open source/free software package for diff --git a/dev/initdemo/initdemo.sh b/dev/initdemo/initdemo.sh index 497d3abbf50..c34d9e2ffda 100755 --- a/dev/initdemo/initdemo.sh +++ b/dev/initdemo/initdemo.sh @@ -162,7 +162,7 @@ export res=$? # ---------------------------- copy demo files -export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" ` +export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' ` if [ "x$documentdir" != "x" ] then echo cp -pr $mydir/documents_demo/* "$documentdir/" @@ -174,7 +174,7 @@ then echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images" cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images" else - echo Detection of documents directory failed so demo files were not copied. + echo Detection of documents directory $documentdir failed so demo files were not copied. fi diff --git a/htdocs/commande/class/api_deprecated_commande.class.php b/htdocs/commande/class/api_deprecated_commande.class.php index 60c8c7f4aa8..4595bdbb287 100644 --- a/htdocs/commande/class/api_deprecated_commande.class.php +++ b/htdocs/commande/class/api_deprecated_commande.class.php @@ -194,7 +194,7 @@ class CommandeApi extends DolibarrApi * @return array Array of order objects */ function getListForSoc($socid = 0) { - return getList(0,"s.rowid","ASC",0,0,$socid); + return $this->getList(0,"s.rowid","ASC",0,0,$socid); } diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php index 47405d0e748..5cae7aff723 100644 --- a/htdocs/compta/bank/bankentries.php +++ b/htdocs/compta/bank/bankentries.php @@ -54,6 +54,7 @@ $langs->load("loan"); $langs->load("donations"); $langs->load("trips"); $langs->load("members"); +$langs->load("compta"); $id = GETPOST('id','int'); $ref = GETPOST('ref','alpha'); diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php index 5e3f81bb205..82283547d99 100644 --- a/htdocs/compta/bank/index.php +++ b/htdocs/compta/bank/index.php @@ -449,7 +449,7 @@ foreach ($accounts as $key=>$type) // Ref if (! empty($arrayfields['b.ref']['checked'])) { - print '
|
diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php
index 0a6c76fa786..840fa709ddf 100644
--- a/htdocs/install/inc.php
+++ b/htdocs/install/inc.php
@@ -191,7 +191,7 @@ if (constant('DOL_DATA_ROOT') === null) {
}
if (@file_exists($lockfile))
{
- print 'Install pages have been disabled for security reason (by lock file install.lock into dolibarr root directory). '; + print 'Install pages have been disabled for security reason (by lock file install.lock into dolibarr documents directory). '; if (! empty($dolibarr_main_url_root)) { print 'Click on following link. '; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index a4f396a43b8..475a67c060f 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -460,6 +460,7 @@ DeletePicture=Picture delete ConfirmDeletePicture=Confirm picture deletion? Login=Login CurrentLogin=Current login +EnterLoginDetail=Enter login details January=January February=February March=March diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index a9057ca34ba..1b650a4e7bb 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -36,21 +36,21 @@ class Entrepot extends CommonObject public $element='stock'; public $table_element='entrepot'; public $picto='stock'; - + /** * Warehouse closed, inactive */ const STATUS_CLOSED = 0; - + /** * Warehouse open and operations for customer shipping, supplier dispatch, internal stock transfers/corrections allowed. */ const STATUS_OPEN_ALL = 1; - + /** * Warehouse open and operations for stock transfers/corrections allowed (not for customer shipping and supplier dispatch). */ - const STATUS_OPEN_INTERNAL = 2; + const STATUS_OPEN_INTERNAL = 2; var $libelle; var $description; @@ -61,10 +61,10 @@ class Entrepot extends CommonObject var $zip; var $town; var $fk_parent; - + // List of short language codes for status var $statuts = array(); - + /** * Constructor * @@ -85,7 +85,7 @@ class Entrepot extends CommonObject { $this->statuts[self::STATUS_OPEN_ALL] = 'Opened'; } - + } /** @@ -97,9 +97,9 @@ class Entrepot extends CommonObject function create($user) { global $conf; - + $this->libelle = trim($this->libelle); - + // Si libelle non defini, erreur if ($this->libelle == '') { @@ -112,7 +112,7 @@ class Entrepot extends CommonObject $this->db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."entrepot (entity, datec, fk_user_author, label, fk_parent)"; - $sql .= " VALUES (".$conf->entity.",'".$this->db->idate($now)."',".$user->id.",'".$this->db->escape($this->libelle)."', ".($this->fk_parent > 0 ? $this->fk_parent : 'NULL').")"; + $sql .= " VALUES (".$conf->entity.",'".$this->db->idate($now)."',".$user->id.",'".$this->db->escape($this->libelle)."', ".($this->fk_parent > 0 ? $this->fk_parent : "NULL").")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); $result=$this->db->query($sql); @@ -161,19 +161,19 @@ class Entrepot extends CommonObject function update($id, $user) { if (empty($id)) $id = $this->id; - + // Check if new parent is already a child of current warehouse - if(!empty($this->fk_parent)) + if(!empty($this->fk_parent)) { $TChildWarehouses = array($id); $TChildWarehouses = $this->get_children_warehouses($this->id, $TChildWarehouses); - if(in_array($this->fk_parent, $TChildWarehouses)) + if(in_array($this->fk_parent, $TChildWarehouses)) { $this->error = 'ErrorCannotAddThisParentWarehouse'; return -2; } } - + $this->libelle=trim($this->libelle); $this->description=trim($this->description); @@ -186,7 +186,7 @@ class Entrepot extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."entrepot "; $sql .= " SET label = '" . $this->db->escape($this->libelle) ."'"; - $sql .= ", fk_parent = " . (($this->fk_parent > 0) ? $this->fk_parent : 'NULL'); + $sql .= ", fk_parent = " . (($this->fk_parent > 0) ? $this->fk_parent : "NULL"); $sql .= ", description = '" . $this->db->escape($this->description) ."'"; $sql .= ", statut = " . $this->statut; $sql .= ", lieu = '" . $this->db->escape($this->lieu) ."'"; @@ -232,7 +232,7 @@ class Entrepot extends CommonObject if ($result < 0) { $error++; } // End call triggers } - + $elements = array('stock_mouvement','product_stock','product_warehouse_properties'); foreach($elements as $table) { @@ -516,12 +516,12 @@ class Entrepot extends CommonObject function LibStatut($statut,$mode=0) { global $langs; - + $langs->load('stocks'); - + $picto = 'statut5'; $label = $langs->trans($this->statuts[$statut]); - + if ($mode == 0) { @@ -569,10 +569,10 @@ class Entrepot extends CommonObject $langs->load("stocks"); if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips - + $result=''; $label = ''; - + $label = '' . $langs->trans("ShowWarehouse").''; $label.= ' ' . $langs->trans('Ref') . ': ' . (empty($this->label)?$this->libelle:$this->label); if (! empty($this->lieu)) @@ -591,11 +591,11 @@ class Entrepot extends CommonObject $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose.=' class="classfortooltip"'; } - + $linkstart = ''; $linkend=''; - + if ($withpicto) $result.=($link.img_object(($notooltip?'':$label), 'stock', ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend.' '); $result.=$linkstart.($showfullpath ? $this->get_full_arbo() : (empty($this->label)?$this->libelle:$this->label)).$linkend; return $result; @@ -628,60 +628,60 @@ class Entrepot extends CommonObject $this->country_id=1; $this->country_code='FR'; } - + /** * Return full path to current warehouse * - * @return string String full path to current warehouse separated by " >> " + * @return string String full path to current warehouse separated by " >> " */ - function get_full_arbo() + function get_full_arbo() { global $user,$langs,$conf; - + $TArbo = array(empty($this->label)?$this->libelle:$this->label); - + $protection=100; // We limit depth of warehouses to 100 - + $warehousetmp = new Entrepot($this->db); - - $parentid = $this->fk_parent; // If parent_id not defined on current object, we do not start consecutive searches of parents + + $parentid = $this->fk_parent; // If parent_id not defined on current object, we do not start consecutive searches of parents $i=0; - while ($parentid > 0 && $i < $protection) + while ($parentid > 0 && $i < $protection) { $sql = 'SELECT fk_parent FROM '.MAIN_DB_PREFIX.'entrepot WHERE rowid = '.$parentid; $resql = $this->db->query($sql); - if ($resql) + if ($resql) { $objarbo = $this->db->fetch_object($resql); if ($objarbo) { $warehousetmp->fetch($parentid); $TArbo[] = $warehousetmp->label; - $parentid = $objarbo->fk_parent; + $parentid = $objarbo->fk_parent; } else break; } else dol_print_error($this->db); - + $i++; } - + return implode(' >> ', array_reverse($TArbo)); } - + /** * Return array of children warehouses ids from $id warehouse (recursive function) - * + * * @param int $id id parent warehouse * @param array() $TChildWarehouses array which will contain all children (param by reference) * @return array() $TChildWarehouses array which will contain all children */ function get_children_warehouses($id, &$TChildWarehouses) { - + $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'entrepot WHERE fk_parent = '.$id; - + $resql = $this->db->query($sql); if($resql) { while($res = $this->db->fetch_object($resql)) { @@ -689,9 +689,9 @@ class Entrepot extends CommonObject $this->get_children_warehouses($res->rowid, $TChildWarehouses); } } - + return $TChildWarehouses; - + } } diff --git a/htdocs/societe/class/api_deprecated_contact.class.php b/htdocs/societe/class/api_deprecated_contact.class.php index e229dc5f79b..b9c991c7fa5 100644 --- a/htdocs/societe/class/api_deprecated_contact.class.php +++ b/htdocs/societe/class/api_deprecated_contact.class.php @@ -17,7 +17,7 @@ use Luracast\Restler\RestException; -//require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; /** * API class for contact object diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 68749713788..e5d5eb5cc8f 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -64,9 +64,10 @@ class CompanyBankAccount extends Account * Create bank information record * * @param User $user User + * @param int $notrigger 1=Disable triggers * @return int <0 if KO, >= 0 if OK */ - function create(User $user = null) + function create(User $user = null, $notrigger=0) { $now=dol_now(); |