Skip to content

Commit

Permalink
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed Aug 4, 2014
2 parents be89fdd + 50f18ff commit 96362b4
Show file tree
Hide file tree
Showing 308 changed files with 7,983 additions and 7,428 deletions.
6 changes: 6 additions & 0 deletions .tx/config
Expand Up @@ -164,6 +164,12 @@ source_file = htdocs/langs/en_US/ldap.lang
source_lang = en_US
type = MOZILLAPROPERTIES

[dolibarr.link]
file_filter = htdocs/langs/<lang>/link.lang
source_file = htdocs/langs/en_US/link.lang
source_lang = en_US
type = MOZILLAPROPERTIES

[dolibarr.mailmanspip]
file_filter = htdocs/langs/<lang>/mailmanspip.lang
source_file = htdocs/langs/en_US/mailmanspip.lang
Expand Down
2 changes: 2 additions & 0 deletions ChangeLog
Expand Up @@ -5,6 +5,8 @@ English Dolibarr ChangeLog

***** ChangeLog for 3.7 compared to 3.6.* *****
For users:
- New: Supervisor is now visible into user list.
- New: Add user of creation and validation on invoice export.
- New: Add info page about browser.
- New: Enable feature developed for 3.6 we forgot to enabled: Adding prefix
on uploaded file names.
Expand Down
26 changes: 13 additions & 13 deletions build/debian/dolibarr.postinst
Expand Up @@ -131,19 +131,19 @@ case "$1" in
setup_empty_conf
else
# File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
#echo Add new params to overwrite path to use shared libraries/fonts
#grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
#grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
#grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
##grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
##grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
#grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
#grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
#grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
#grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
fi

db_get dolibarr/reconfigure-webserver
Expand Down
2 changes: 2 additions & 0 deletions dev/dolibarr_changes.txt
Expand Up @@ -44,6 +44,8 @@ In htdocs/includes/tcpdf/tcpdf.php
- protected $default_monospaced_font = 'courier';
+ protected $default_monospaced_font = 'freemono';

* Renamed getmypid into dol_getmypid().


JSGANTT:
--------
Expand Down
2 changes: 1 addition & 1 deletion dev/initdata/generate-facture.php
Expand Up @@ -94,7 +94,7 @@

print "Invoice ".$i." for socid ".$socid;

$facture = new Facture($db, $socids[$socid]);
$facture = new Facture($db);
$facture->date = time();
$facture->cond_reglement_id = 3;
$facture->mode_reglement_id = 3;
Expand Down
3 changes: 2 additions & 1 deletion dev/initdata/generate-propale.php
Expand Up @@ -122,14 +122,15 @@
$soc = new Societe($db);


$propal = new Propal($db, $socids[$socid]);
$propal = new Propal($db);

$obj = $conf->global->PROPALE_ADDON;
$modPropale = new $obj;
$numpr = $modPropale->getNextValue($soc,$propal);

$propal->ref = $numpr;
$propal->contactid = $contids[$socids[$socid]][0];
$propal->socid = $socids[$socid];
$propal->datep = time();
$propal->cond_reglement_id = 3;
$propal->mode_reglement_id = 3;
Expand Down
22 changes: 11 additions & 11 deletions htdocs/adherents/class/adherent.class.php
Expand Up @@ -187,7 +187,7 @@ function makeSubstitution($text)
if (dol_textishtml($text,1)) $msgishtml = 1;

$infos='';
if ($this->civility_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel(1)."\n";
if ($this->civility_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel()."\n";
$infos.= $langs->transnoentities("id").": ".$this->id."\n";
$infos.= $langs->transnoentities("Lastname").": ".$this->lastname."\n";
$infos.= $langs->transnoentities("Firstname").": ".$this->firstname."\n";
Expand All @@ -210,7 +210,7 @@ function makeSubstitution($text)
$substitutionarray=array(
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
'%ID%'=>$msgishtml?dol_htmlentitiesbr($this->id):$this->id,
'%CIVILITY%'=>$this->getCivilityLabel($msgishtml?0:1),
'%CIVILITY%'=>$this->getCivilityLabel(),
'%FIRSTNAME%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname,
'%LASTNAME%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname,
'%FULLNAME%'=>$msgishtml?dol_htmlentitiesbr($this->getFullName($langs)):$this->getFullName($langs),
Expand Down Expand Up @@ -350,7 +350,7 @@ function create($user,$notrigger=0)
{
// Call trigger
$result=$this->call_trigger('MEMBER_CREATE',$user);
if ($result < 0) { $error++; }
if ($result < 0) { $error++; }
// End call triggers
}

Expand Down Expand Up @@ -599,7 +599,7 @@ function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdp
{
// Call trigger
$result=$this->call_trigger('MEMBER_MODIFY',$user);
if ($result < 0) { $error++; }
if ($result < 0) { $error++; }
// End call triggers
}
}
Expand Down Expand Up @@ -774,7 +774,7 @@ function delete($rowid)
{
// Call trigger
$result=$this->call_trigger('MEMBER_DELETE',$user);
if ($result < 0) { $error++; }
if ($result < 0) { $error++; }
// End call triggers
}

Expand Down Expand Up @@ -830,7 +830,7 @@ function setPassword($user, $password='', $isencrypted=0, $notrigger=0, $nosyncu
}

$this->db->begin();

// Mise a jour
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET pass = '".$this->db->escape($password_indatabase)."'";
$sql.= " WHERE rowid = ".$this->id;
Expand Down Expand Up @@ -877,7 +877,7 @@ function setPassword($user, $password='', $isencrypted=0, $notrigger=0, $nosyncu
{
// Call trigger
$result=$this->call_trigger('MEMBER_NEW_PASSWORD',$user);
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
// End call triggers
}

Expand Down Expand Up @@ -1292,7 +1292,7 @@ function cotisation($date, $montant, $accountid=0, $operation='', $label='', $nu

// Call trigger
$result=$this->call_trigger('MEMBER_SUBSCRIPTION',$user);
if ($result < 0) { $error++; }
if ($result < 0) { $error++; }
// End call triggers
}

Expand Down Expand Up @@ -1351,7 +1351,7 @@ function validate($user)

// Call trigger
$result=$this->call_trigger('MEMBER_VALIDATE',$user);
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
// End call triggers

$this->db->commit();
Expand Down Expand Up @@ -1399,7 +1399,7 @@ function resiliate($user)

// Call trigger
$result=$this->call_trigger('MEMBER_RESILIATE',$user);
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
// End call triggers

$this->db->commit();
Expand Down Expand Up @@ -1530,7 +1530,7 @@ function del_to_abo()
/**
* Return civility label of a member
*
* @return string Translated name of civility
* @return string Translated name of civility (translated with transnoentitiesnoconv)
*/
function getCivilityLabel()
{
Expand Down
3 changes: 2 additions & 1 deletion htdocs/admin/boxes.php
Expand Up @@ -35,8 +35,9 @@
$rowid = GETPOST('rowid','int');
$action = GETPOST('action','alpha');


// Define possible position of boxes
$pos_name = getStaticMember('InfoBox','listOfPages');
$pos_name = InfoBox::getListOfPagesForBoxes();
$boxes = array();


Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/dict.php
Expand Up @@ -818,7 +818,7 @@
if ($valuetoshow != '')
{
print '<td align="'.$align.'">';
if (! empty($tabhelp[$id][$value]) && preg_match('/http:/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.'</a>';
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
else print $valuetoshow;
print '</td>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/system/database.php
Expand Up @@ -44,7 +44,7 @@
// Database
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Database").'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("Version").'</td><td>'.$db::label.' '.$db->getVersion().'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("Version").'</td><td>'.$db::LABEL.' '.$db->getVersion().'</td></tr>'."\n";
print '<tr '.$bc[1].'><td width="300">'.$langs->trans("DatabaseServer").'</td><td>'.$conf->db->host.'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("DatabasePort").'</td><td>'.(empty($conf->db->port)?$langs->trans("Default"):$conf->db->port).'</td></tr>'."\n";
print '<tr '.$bc[1].'><td width="300">'.$langs->trans("DatabaseName").'</td><td>'.$conf->db->name.'</td></tr>'."\n";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/system/index.php
Expand Up @@ -86,7 +86,7 @@
// Database
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Database")."</td></tr>\n";
$dblabel=$db::label;
$dblabel=$db::LABEL;
$dbversion=$db->getVersion();
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>" .$dblabel." ".$dbversion."</td></tr>\n";
print '</table>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/tools/dolibarr_export.php
Expand Up @@ -65,7 +65,7 @@
$form=new Form($db);
$formfile = new FormFile($db);

$label=$db::label;
$label=$db::LABEL;

$help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad';
llxHeader('','',$help_url);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/tools/dolibarr_import.php
Expand Up @@ -38,7 +38,7 @@
* View
*/

$label=$db::label;
$label=$db::LABEL;

$help_url='EN:Restores|FR:Restaurations|ES:Restauraciones';
llxHeader('','',$help_url);
Expand Down
8 changes: 4 additions & 4 deletions htdocs/admin/tools/export.php
Expand Up @@ -416,7 +416,7 @@ function backup_tables($outputfile, $tables='*')

// Print headers and global mysql config vars
$sqlhead = '';
$sqlhead .= "-- ".$db::label." dump via php
$sqlhead .= "-- ".$db::LABEL." dump via php
--
-- Host: ".$db->db->host_info." Database: ".$db->database_name."
-- ------------------------------------------------------
Expand Down Expand Up @@ -464,11 +464,11 @@ function backup_tables($outputfile, $tables='*')
fwrite($handle, "\n--\n-- Dumping data for table `".$table."`\n--\n");
if (!GETPOST("nobin_nolocks")) fwrite($handle, "LOCK TABLES `".$table."` WRITE;\n"); // Lock the table before inserting data (when the data will be imported back)
if (GETPOST("nobin_disable_fk")) fwrite($handle, "ALTER TABLE `".$table."` DISABLE KEYS;\n");

$sql='SELECT * FROM '.$table;
$result = $db->query($sql);
$num_fields = $db->num_rows($result);
while($row = $db->fetch_row($result))
while($row = $db->fetch_row($result))
{
// For each row of data we print a line of INSERT
fwrite($handle,'INSERT '.$delayed.$ignore.'INTO `'.$table.'` VALUES (');
Expand Down Expand Up @@ -497,7 +497,7 @@ function backup_tables($outputfile, $tables='*')
fwrite($handle,"\n\n\n");
}
}

/* Backup Procedure structure*/
/*
$result = $db->query('SHOW PROCEDURE STATUS');
Expand Down
1 change: 0 additions & 1 deletion htdocs/cache.manifest
Expand Up @@ -13,7 +13,6 @@ support/
support/index.php
support/online.php

support/background.png
support/default.css
support/dolibarr_logo2.png
support/headbg.jpg
Expand Down
2 changes: 1 addition & 1 deletion htdocs/categories/class/categorie.class.php
Expand Up @@ -87,7 +87,7 @@ function fetch($id,$label='')

else
{
if ($label) $sql.= " WHERE label = '".$this->db->escape($label)."' AND entity=".$conf->entity;;
if ($label) $sql.= " WHERE label = '".$this->db->escape($label)."' AND entity IN (".getEntity('category',1).")";
}

dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
Expand Down
26 changes: 13 additions & 13 deletions htdocs/comm/action/fiche.php
Expand Up @@ -514,18 +514,18 @@ function setdatefields()
// Location
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" size="50" value="'.$object->location.'"></td></tr>';

// Assigned to
$var=false;
print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
$form->select_users(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1);
print '</td></tr>';

print '</table>';

print '<br><br>';

print '<table class="border" width="100%">';

// Assigned to
$var=false;
print '<tr><td width="30%" class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
$form->select_users(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1);
print '</td></tr>';

// Busy
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td>';
print '<input id="transparency" type="checkbox" name="transparency"'.(((! isset($_GET['transparency']) && ! isset($_POST['transparency'])) || GETPOST('transparency'))?' checked="checked"':'').'>';
Expand Down Expand Up @@ -764,15 +764,15 @@ function setdatefields()
// Location
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" size="50" value="'.$object->location.'"></td></tr>';

print '</table><br><br><table class="border" width="100%">';

// Assigned to
print '<tr><td width="30%" class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
print $form->select_dolusers($object->usertodo->id>0?$object->usertodo->id:-1,'affectedto',1);
print '</td></tr>';

print '</table><br><br><table class="border" width="100%">';

// Busy
print '<tr><td class="nowrap">'.$langs->trans("Busy").'</td><td>';
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td>';
print '<input id="transparency" type="checkbox" name="transparency"'.($object->transparency?' checked="checked"':'').'">';
print '</td></tr>';

Expand Down Expand Up @@ -939,15 +939,15 @@ function setdatefields()
// Location
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="2">'.$object->location.'</td></tr>';

print '</table><br><br><table class="border" width="100%">';

// Assigned to
print '<tr><td width="30%" class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
if ($object->usertodo->id > 0) print $object->usertodo->getNomUrl(1);
print '</td></tr>';

print '</table><br><br><table class="border" width="100%">';

// Busy
print '<tr><td class="nowrap">'.$langs->trans("Busy").'</td><td colspan="3">';
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td colspan="3">';
if ($object->usertodo->id > 0) print yn(($object->transparency > 0)?1:0); // We show nothing if event is assigned to nobody
print '</td></tr>';

Expand Down

0 comments on commit 96362b4

Please sign in to comment.