Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2012-09-10 09:47:11 +02:00
commit 3335bf629b
22 changed files with 215 additions and 209 deletions

View File

@ -46,6 +46,7 @@ For users:
New experimental modules: New experimental modules:
- New: Add margin and commissions management module. - New: Add margin and commissions management module.
- New: Add holiday module. - New: Add holiday module.
- New: Allow to search product from barcodes directly from the permanent mini search left box
- Fix: [ bug #499 ]: Supplier order input method not translated - Fix: [ bug #499 ]: Supplier order input method not translated
- Fix: No images into product description lines as PDF generation does - Fix: No images into product description lines as PDF generation does

View File

@ -56,11 +56,11 @@ print '<tr '.$bc[0].'><td width="300">'.$langs->trans("DBSortingCharset").'</td>
print '</table>'; print '</table>';
// Tables // Tables
print '<br>'; print '<br>';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Tables").'</td></tr>'."\n"; print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Tables").'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300"><a href="'.DOL_URL_ROOT.'/admin/system/database-tables.php?mainmenu=home">'.$langs->trans("List").'</a></td></tr>'."\n"; print '<tr '.$bc[0].'><td width="300"><a href="'.DOL_URL_ROOT.'/admin/system/database-tables.php?mainmenu=home">'.$langs->trans("List").'</a></td></tr>'."\n";
print '</table>'; print '</table>';
$base=0; $base=0;

View File

@ -223,7 +223,7 @@ if ($socid)
print '</td></tr>'; print '</td></tr>';
} }
if (! empty($conf->global->MAIN_MODULE_BARCODE)) if (! empty($conf->barcode->enabled))
{ {
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$soc->barcode.'</td></tr>'; print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$soc->barcode.'</td></tr>';
} }

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2007-2011 Regis Houssin <regis@dolibarr.fr> /* Copyright (C) 2007-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -169,7 +169,7 @@ class FormBarCode
{ {
print '<form method="post" action="'.$page.'">'; print '<form method="post" action="'.$page.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setfk_barcode_type">'; print '<input type="hidden" name="action" value="set'.$htmlname.'">';
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">'; print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
print '<tr><td>'; print '<tr><td>';
$this->select_barcode_type($selected, $htmlname, 1); $this->select_barcode_type($selected, $htmlname, 1);

View File

@ -689,15 +689,15 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("SystemTools"), 0, 1, '', $mainmenu, 'admintools'); $newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("SystemTools"), 0, 1, '', $mainmenu, 'admintools');
if ($leftmenu=="admintools") if ($leftmenu=="admintools")
{ {
$newmenu->add('/admin/system/dolibarr.php?mainmenu=home', $langs->trans('InfoDolibarr'), 1); $newmenu->add('/admin/system/dolibarr.php?mainmenu=home', $langs->trans('InfoDolibarr'), 1);
$newmenu->add('/admin/system/constall.php?mainmenu=home', $langs->trans('AllParameters'), 2); $newmenu->add('/admin/system/constall.php?mainmenu=home', $langs->trans('AllParameters'), 2);
$newmenu->add('/admin/system/modules.php?mainmenu=home', $langs->trans('Modules'), 2); $newmenu->add('/admin/system/modules.php?mainmenu=home', $langs->trans('Modules'), 2);
$newmenu->add('/admin/triggers.php?mainmenu=home', $langs->trans('Triggers'), 2); $newmenu->add('/admin/triggers.php?mainmenu=home', $langs->trans('Triggers'), 2);
$newmenu->add('/admin/system/os.php?mainmenu=home', $langs->trans('InfoOS'), 1); $newmenu->add('/admin/system/os.php?mainmenu=home', $langs->trans('InfoOS'), 1);
$newmenu->add('/admin/system/web.php?mainmenu=home', $langs->trans('InfoWebServer'), 1); $newmenu->add('/admin/system/web.php?mainmenu=home', $langs->trans('InfoWebServer'), 1);
$newmenu->add('/admin/system/phpinfo.php?mainmenu=home', $langs->trans('InfoPHP'), 1); $newmenu->add('/admin/system/phpinfo.php?mainmenu=home', $langs->trans('InfoPHP'), 1);
//if (function_exists('xdebug_is_enabled')) $newmenu->add('/admin/system/xdebug.php', $langs->trans('XDebug'),1); //if (function_exists('xdebug_is_enabled')) $newmenu->add('/admin/system/xdebug.php', $langs->trans('XDebug'),1);
$newmenu->add('/admin/system/database.php?mainmenu=home', $langs->trans('InfoDatabase'), 1); $newmenu->add('/admin/system/database.php?mainmenu=home', $langs->trans('InfoDatabase'), 1);
$newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home", $langs->trans("Backup"),1); $newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home", $langs->trans("Backup"),1);
$newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home", $langs->trans("Restore"),1); $newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home", $langs->trans("Restore"),1);

View File

@ -53,93 +53,93 @@ print '<table class="notopnoleftnoright" width="100%">';
print '<tr><td valign="top" width="70%" class="notopnoleft">'; print '<tr><td valign="top" width="70%" class="notopnoleft">';
// List export set // List export set
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Module").'</td>'; print '<td>'.$langs->trans("Module").'</td>';
print '<td>'.$langs->trans("ExportableDatas").'</td>'; print '<td>'.$langs->trans("ExportableDatas").'</td>';
//print '<td>&nbsp;</td>'; //print '<td>&nbsp;</td>';
print '</tr>'; print '</tr>';
$var=true; $var=true;
if (count($export->array_export_code)) if (count($export->array_export_code))
{ {
foreach ($export->array_export_code as $key => $value) foreach ($export->array_export_code as $key => $value)
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td>'; print '<tr '.$bc[$var].'><td>';
//print img_object($export->array_export_module[$key]->getName(),$export->array_export_module[$key]->picto).' '; //print img_object($export->array_export_module[$key]->getName(),$export->array_export_module[$key]->picto).' ';
print $export->array_export_module[$key]->getName(); print $export->array_export_module[$key]->getName();
print '</td><td>'; print '</td><td>';
print img_object($export->array_export_module[$key]->getName(),$export->array_export_icon[$key]).' '; print img_object($export->array_export_module[$key]->getName(),$export->array_export_icon[$key]).' ';
$string=$langs->trans($export->array_export_label[$key]); $string=$langs->trans($export->array_export_label[$key]);
print ($string!=$export->array_export_label[$key]?$string:$export->array_export_label[$key]); print ($string!=$export->array_export_label[$key]?$string:$export->array_export_label[$key]);
print '</td>'; print '</td>';
// print '<td width="24">'; // print '<td width="24">';
// print '<a href="'.DOL_URL_ROOT.'/exports/export.php?step=2&amp;datatoexport='.$export->array_export_code[$key].'&amp;action=cleanselect">'.img_picto($langs->trans("NewExport"),'filenew').'</a>'; // print '<a href="'.DOL_URL_ROOT.'/exports/export.php?step=2&amp;datatoexport='.$export->array_export_code[$key].'&amp;action=cleanselect">'.img_picto($langs->trans("NewExport"),'filenew').'</a>';
// print '</td>'; // print '</td>';
print '</tr>'; print '</tr>';
} }
} }
else else
{ {
print '<tr><td '.$bc[false].' colspan="2">'.$langs->trans("NoExportableData").'</td></tr>'; print '<tr><td '.$bc[false].' colspan="2">'.$langs->trans("NoExportableData").'</td></tr>';
} }
print '</table>'; print '</table>';
print '<br>'; print '<br>';
print '<center>'; print '<center>';
if (count($export->array_export_code)) if (count($export->array_export_code))
{ {
if ($user->rights->export->creer) if ($user->rights->export->creer)
{ {
print '<a class="butAction" href="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export">'.$langs->trans("NewExport").'</a>'; print '<a class="butAction" href="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export">'.$langs->trans("NewExport").'</a>';
} }
else else
{ {
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("NewExport").'</a>'; print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("NewExport").'</a>';
} }
/* /*
print '<center><form action="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export"><input type="submit" class="button" value="'.$langs->trans("NewExport").'"'; print '<center><form action="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export"><input type="submit" class="button" value="'.$langs->trans("NewExport").'"';
print ($user->rights->export->creer?'':' disabled="disabled"'); print ($user->rights->export->creer?'':' disabled="disabled"');
print '></form></center>'; print '></form></center>';
*/ */
} }
print '</center>'; print '</center>';
print '</td><td valign="top" width="30%" class="notopnoleftnoright">'; print '</td><td valign="top" width="30%" class="notopnoleftnoright">';
// List of available export format // List of available export format
$var=true; $var=true;
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("AvailableFormats").'</td>'; print '<td colspan="2">'.$langs->trans("AvailableFormats").'</td>';
print '<td>'.$langs->trans("LibraryShort").'</td>'; print '<td>'.$langs->trans("LibraryShort").'</td>';
print '<td align="right">'.$langs->trans("LibraryVersion").'</td>'; print '<td align="right">'.$langs->trans("LibraryVersion").'</td>';
print '</tr>'; print '</tr>';
include_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php'; include_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php';
$model=new ModeleExports(); $model=new ModeleExports();
$liste=$model->liste_modeles($db); // This is not a static method for exports because method load non static properties $liste=$model->liste_modeles($db); // This is not a static method for exports because method load non static properties
$var=true; $var=true;
foreach($liste as $key => $val) foreach($liste as $key => $val)
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td width="16">'.img_picto_common($model->getDriverLabel($key),$model->getPicto($key)).'</td>'; print '<td width="16">'.img_picto_common($model->getDriverLabel($key),$model->getPicto($key)).'</td>';
$text=$model->getDriverDesc($key); $text=$model->getDriverDesc($key);
print '<td>'.$form->textwithpicto($model->getDriverLabel($key),$text).'</td>'; print '<td>'.$form->textwithpicto($model->getDriverLabel($key),$text).'</td>';
print '<td>'.$model->getLibLabel($key).'</td>'; print '<td>'.$model->getLibLabel($key).'</td>';
print '<td nowrap="nowrap" align="right">'.$model->getLibVersion($key).'</td>'; print '<td nowrap="nowrap" align="right">'.$model->getLibVersion($key).'</td>';
print '</tr>'; print '</tr>';
} }
print '</table>'; print '</table>';
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';

View File

@ -52,84 +52,84 @@ print '<table class="notopnoleftnoright" width="100%">';
print '<tr><td valign="top" width="70%" class="notopnoleft">'; print '<tr><td valign="top" width="70%" class="notopnoleft">';
// List of import set // List of import set
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Module").'</td>'; print '<td>'.$langs->trans("Module").'</td>';
print '<td>'.$langs->trans("ImportableDatas").'</td>'; print '<td>'.$langs->trans("ImportableDatas").'</td>';
//print '<td>&nbsp;</td>'; //print '<td>&nbsp;</td>';
print '</tr>'; print '</tr>';
$val=true; $val=true;
if (count($import->array_import_code)) if (count($import->array_import_code))
{ {
foreach ($import->array_import_code as $key => $value) foreach ($import->array_import_code as $key => $value)
{ {
$val=!$val; $val=!$val;
print '<tr '.$bc[$val].'><td>'; print '<tr '.$bc[$val].'><td>';
print img_object($import->array_import_module[$key]->getName(),$import->array_import_module[$key]->picto).' '; print img_object($import->array_import_module[$key]->getName(),$import->array_import_module[$key]->picto).' ';
print $import->array_import_module[$key]->getName(); print $import->array_import_module[$key]->getName();
print '</td><td>'; print '</td><td>';
$string=$langs->trans($import->array_import_label[$key]); $string=$langs->trans($import->array_import_label[$key]);
print ($string!=$import->array_import_label[$key]?$string:$import->array_import_label[$key]); print ($string!=$import->array_import_label[$key]?$string:$import->array_import_label[$key]);
print '</td>'; print '</td>';
// print '<td width="24">'; // print '<td width="24">';
// print '<a href="'.DOL_URL_ROOT.'/imports/import.php?step=2&amp;datatoimport='.$import->array_import_code[$key].'&amp;action=cleanselect">'.img_picto($langs->trans("NewImport"),'filenew').'</a>'; // print '<a href="'.DOL_URL_ROOT.'/imports/import.php?step=2&amp;datatoimport='.$import->array_import_code[$key].'&amp;action=cleanselect">'.img_picto($langs->trans("NewImport"),'filenew').'</a>';
// print '</td>'; // print '</td>';
print '</tr>'; print '</tr>';
} }
} }
else else
{ {
print '<tr><td '.$bc[false].' colspan="2">'.$langs->trans("NoImportableData").'</td></tr>'; print '<tr><td '.$bc[false].' colspan="2">'.$langs->trans("NoImportableData").'</td></tr>';
} }
print '</table>'; print '</table>';
print '<br>'; print '<br>';
print '<center>'; print '<center>';
if (count($import->array_import_code)) if (count($import->array_import_code))
{ {
//if ($user->rights->import->run) //if ($user->rights->import->run)
//{ //{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/imports/import.php?leftmenu=import">'.$langs->trans("NewImport").'</a>'; print '<a class="butAction" href="'.DOL_URL_ROOT.'/imports/import.php?leftmenu=import">'.$langs->trans("NewImport").'</a>';
//} //}
//else //else
//{ //{
// print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("NewImport").'</a>'; // print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("NewImport").'</a>';
//} //}
} }
print '</center>'; print '</center>';
print '</td><td valign="top" width="30%" class="notopnoleftnoright">'; print '</td><td valign="top" width="30%" class="notopnoleftnoright">';
// List of available import format // List of available import format
$var=true; $var=true;
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("AvailableFormats").'</td>'; print '<td colspan="2">'.$langs->trans("AvailableFormats").'</td>';
print '<td>'.$langs->trans("LibraryShort").'</td>'; print '<td>'.$langs->trans("LibraryShort").'</td>';
print '<td align="right">'.$langs->trans("LibraryVersion").'</td>'; print '<td align="right">'.$langs->trans("LibraryVersion").'</td>';
print '</tr>'; print '</tr>';
include_once DOL_DOCUMENT_ROOT.'/core/modules/import/modules_import.php'; include_once DOL_DOCUMENT_ROOT.'/core/modules/import/modules_import.php';
$model=new ModeleImports(); $model=new ModeleImports();
$liste=$model->liste_modeles($db); $liste=$model->liste_modeles($db);
foreach($liste as $key) foreach($liste as $key)
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td width="16">'.img_picto_common($model->getDriverLabel($key),$model->getPicto($key)).'</td>'; print '<td width="16">'.img_picto_common($model->getDriverLabel($key),$model->getPicto($key)).'</td>';
$text=$model->getDriverDesc($key); $text=$model->getDriverDesc($key);
print '<td>'.$form->textwithpicto($model->getDriverLabel($key),$text).'</td>'; print '<td>'.$form->textwithpicto($model->getDriverLabel($key),$text).'</td>';
print '<td>'.$model->getLibLabel($key).'</td>'; print '<td>'.$model->getLibLabel($key).'</td>';
print '<td nowrap="nowrap" align="right">'.$model->getLibVersion($key).'</td>'; print '<td nowrap="nowrap" align="right">'.$model->getLibVersion($key).'</td>';
print '</tr>'; print '</tr>';
} }
print '</table>'; print '</table>';
print '</td></tr>'; print '</td></tr>';

View File

@ -92,7 +92,8 @@ ALTER TABLE llx_actioncomm MODIFY elementtype VARCHAR(32);
-- TASK #107 -- TASK #107
ALTER TABLE llx_ecm_directories MODIFY COLUMN label varchar(64) NOT NULL; ALTER TABLE llx_ecm_directories MODIFY COLUMN label varchar(64) NOT NULL;
ALTER TABLE llx_ecm_directories ADD COLUMN fullpath varchar(255) AFTER cachenbofdoc; ALTER TABLE llx_ecm_directories ADD COLUMN fullpath text AFTER cachenbofdoc;
ALTER TABLE llx_ecm_directories MODIFY COLUMN fullpath text;
ALTER TABLE llx_ecm_directories ADD COLUMN extraparams varchar(255) AFTER fullpath; ALTER TABLE llx_ecm_directories ADD COLUMN extraparams varchar(255) AFTER fullpath;
ALTER TABLE llx_ecm_directories ADD COLUMN acl text; ALTER TABLE llx_ecm_directories ADD COLUMN acl text;
ALTER TABLE llx_ecm_directories ADD INDEX idx_ecm_directories_fk_user_c (fk_user_c); ALTER TABLE llx_ecm_directories ADD INDEX idx_ecm_directories_fk_user_c (fk_user_c);
@ -100,6 +101,8 @@ ALTER TABLE llx_ecm_directories ADD INDEX idx_ecm_directories_fk_user_m (fk_user
ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_c FOREIGN KEY (fk_user_c) REFERENCES llx_user (rowid); ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_c FOREIGN KEY (fk_user_c) REFERENCES llx_user (rowid);
ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_m FOREIGN KEY (fk_user_m) REFERENCES llx_user (rowid); ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_m FOREIGN KEY (fk_user_m) REFERENCES llx_user (rowid);
ALTER TABLE llx_ecm_documents DROP FOREIGN KEY fk_ecm_documents_fk_directory;
ALTER TABLE llx_ecm_documents DROP INDEX idx_ecm_documents_ref;
ALTER TABLE llx_ecm_documents DROP INDEX idx_ecm_documents; ALTER TABLE llx_ecm_documents DROP INDEX idx_ecm_documents;
ALTER TABLE llx_ecm_documents DROP COLUMN manualkeyword; ALTER TABLE llx_ecm_documents DROP COLUMN manualkeyword;
ALTER TABLE llx_ecm_documents DROP COLUMN fullpath_orig; ALTER TABLE llx_ecm_documents DROP COLUMN fullpath_orig;
@ -107,14 +110,15 @@ ALTER TABLE llx_ecm_documents DROP COLUMN private;
ALTER TABLE llx_ecm_documents DROP COLUMN crc; ALTER TABLE llx_ecm_documents DROP COLUMN crc;
ALTER TABLE llx_ecm_documents DROP COLUMN cryptkey; ALTER TABLE llx_ecm_documents DROP COLUMN cryptkey;
ALTER TABLE llx_ecm_documents DROP COLUMN cipher; ALTER TABLE llx_ecm_documents DROP COLUMN cipher;
ALTER TABLE llx_ecm_documents CHANGE COLUMN fullpath_dol fullpath varchar(255) NOT NULL; ALTER TABLE llx_ecm_documents CHANGE COLUMN fullpath_dol fullpath text;
ALTER TABLE llx_ecm_documents MODIFY COLUMN ref varchar(32) NOT NULL;
ALTER TABLE llx_ecm_documents MODIFY COLUMN fullpath text;
ALTER TABLE llx_ecm_documents MODIFY COLUMN filemime varchar(128) NOT NULL; ALTER TABLE llx_ecm_documents MODIFY COLUMN filemime varchar(128) NOT NULL;
ALTER TABLE llx_ecm_documents ADD COLUMN metadata text after description; ALTER TABLE llx_ecm_documents ADD COLUMN metadata text after description;
ALTER TABLE llx_ecm_documents ADD COLUMN extraparams varchar(255) AFTER fk_directory; ALTER TABLE llx_ecm_documents ADD COLUMN extraparams varchar(255) AFTER fk_directory;
ALTER TABLE llx_ecm_documents ADD UNIQUE INDEX idx_ecm_documents_ref (ref, fk_directory, entity); ALTER TABLE llx_ecm_documents ADD UNIQUE INDEX idx_ecm_documents_ref (ref, entity);
ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_create (fk_create); ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_create (fk_create);
ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_update (fk_update); ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_update (fk_update);
ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_directory FOREIGN KEY (fk_directory) REFERENCES llx_ecm_directories (rowid);
ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_create FOREIGN KEY (fk_create) REFERENCES llx_user (rowid); ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_create FOREIGN KEY (fk_create) REFERENCES llx_user (rowid);
ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_update FOREIGN KEY (fk_update) REFERENCES llx_user (rowid); ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_update FOREIGN KEY (fk_update) REFERENCES llx_user (rowid);

View File

@ -27,7 +27,7 @@ create table llx_ecm_directories
fk_parent integer, fk_parent integer,
description varchar(255) NOT NULL, description varchar(255) NOT NULL,
cachenbofdoc integer NOT NULL DEFAULT 0, cachenbofdoc integer NOT NULL DEFAULT 0,
fullpath varchar(255), -- can be NULL for virtual directory fullpath text,
extraparams varchar(255), -- for stock other parameters with json format extraparams varchar(255), -- for stock other parameters with json format
date_c datetime, date_c datetime,
date_m timestamp, date_m timestamp,

View File

@ -18,11 +18,10 @@
-- ============================================================================ -- ============================================================================
ALTER TABLE llx_ecm_documents ADD UNIQUE INDEX idx_ecm_documents_ref (ref, fk_directory, entity); ALTER TABLE llx_ecm_documents ADD UNIQUE INDEX idx_ecm_documents_ref (ref, entity);
ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_create (fk_create); ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_create (fk_create);
ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_update (fk_update); ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_update (fk_update);
ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_directory FOREIGN KEY (fk_directory) REFERENCES llx_ecm_directories (rowid);
ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_create FOREIGN KEY (fk_create) REFERENCES llx_user (rowid); ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_create FOREIGN KEY (fk_create) REFERENCES llx_user (rowid);
ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_update FOREIGN KEY (fk_update) REFERENCES llx_user (rowid); ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_update FOREIGN KEY (fk_update) REFERENCES llx_user (rowid);

View File

@ -21,16 +21,16 @@
create table llx_ecm_documents create table llx_ecm_documents
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
ref varchar(16) NOT NULL,
entity integer DEFAULT 1 NOT NULL, entity integer DEFAULT 1 NOT NULL,
ref varchar(32) NOT NULL, -- hash(fullpath + filename + version)
filename varchar(255) NOT NULL, filename varchar(255) NOT NULL,
filesize integer NOT NULL, filesize integer NOT NULL,
filemime varchar(128) NOT NULL, filemime varchar(128) NOT NULL,
description text, description text,
metadata text, metadata text, -- Secure file information (json format / encrypted)
fullpath varchar(255) NOT NULL, fullpath text,
fk_directory integer, fk_directory integer,
extraparams varchar(255), -- for stock other parameters with json format extraparams varchar(255), -- Other parameters (json format)
fk_create integer NOT NULL, fk_create integer NOT NULL,
fk_update integer, fk_update integer,
date_c datetime NOT NULL, date_c datetime NOT NULL,

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -132,11 +133,11 @@ else
if ($sall) if ($sall)
{ {
$sql.= " AND (p.ref LIKE '%".$db->escape($sall)."%' OR p.label LIKE '%".$db->escape($sall)."%' OR p.description LIKE '%".$db->escape($sall)."%' OR p.note LIKE '%".$db->escape($sall)."%'"; $sql.= " AND (p.ref LIKE '%".$db->escape($sall)."%' OR p.label LIKE '%".$db->escape($sall)."%' OR p.description LIKE '%".$db->escape($sall)."%' OR p.note LIKE '%".$db->escape($sall)."%'";
if (! empty($conf->global->MAIN_MODULE_BARCODE)) if (! empty($conf->barcode->enabled))
{ {
$sql .= " OR p.barcode LIKE '%".$db->escape($sall)."%'"; $sql.= " OR p.barcode LIKE '%".$db->escape($sall)."%'";
} }
$sql .= ')'; $sql.= ')';
} }
// if the type is not 1, we show all products (type = 0,2,3) // if the type is not 1, we show all products (type = 0,2,3)
if (dol_strlen($type)) if (dol_strlen($type))

View File

@ -105,7 +105,7 @@ if ($socid)
print '</td></tr>'; print '</td></tr>';
} }
if ($conf->global->MAIN_MODULE_BARCODE) if (! empty($conf->barcode->enabled))
{ {
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$soc->barcode.'</td></tr>'; print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$soc->barcode.'</td></tr>';
} }

View File

@ -96,7 +96,7 @@
</tr> </tr>
<?php } }?> <?php } }?>
<?php if ($conf->global->MAIN_MODULE_BARCODE) { ?> <?php if (! empty($conf->barcode->enabled)) { ?>
<tr> <tr>
<td><?php echo $langs->trans('Gencod'); ?></td> <td><?php echo $langs->trans('Gencod'); ?></td>
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td> <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>

View File

@ -111,7 +111,7 @@ if ($this->control->tpl['fournisseur']) {
</tr> </tr>
<?php } }?> <?php } }?>
<?php if ($conf->global->MAIN_MODULE_BARCODE) { ?> <?php if (! empty($conf->barcode->enabled)) { ?>
<tr> <tr>
<td><?php echo $langs->trans('Gencod'); ?></td> <td><?php echo $langs->trans('Gencod'); ?></td>
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td> <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>

View File

@ -69,7 +69,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
</tr> </tr>
<?php } ?> <?php } ?>
<?php if ($conf->global->MAIN_MODULE_BARCODE) { ?> <?php if (! empty($conf->barcode->enabled)) { ?>
<tr> <tr>
<td><?php echo $langs->trans('Gencod'); ?></td> <td><?php echo $langs->trans('Gencod'); ?></td>
<td colspan="3"><?php echo $this->control->tpl['barcode']; ?></td> <td colspan="3"><?php echo $this->control->tpl['barcode']; ?></td>

View File

@ -106,7 +106,7 @@
</tr> </tr>
<?php } }?> <?php } }?>
<?php if ($conf->global->MAIN_MODULE_BARCODE) { ?> <?php if (! empty($conf->barcode->enabled)) { ?>
<tr> <tr>
<td><?php echo $langs->trans('Gencod'); ?></td> <td><?php echo $langs->trans('Gencod'); ?></td>
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td> <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>

View File

@ -108,7 +108,7 @@ if ($this->control->tpl['fournisseur']) {
</tr> </tr>
<?php } }?> <?php } }?>
<?php if ($conf->global->MAIN_MODULE_BARCODE) { ?> <?php if (! empty($conf->barcode->enabled)) { ?>
<tr> <tr>
<td><?php echo $langs->trans('Gencod'); ?></td> <td><?php echo $langs->trans('Gencod'); ?></td>
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td> <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>

View File

@ -68,7 +68,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
</tr> </tr>
<?php } ?> <?php } ?>
<?php if ($conf->global->MAIN_MODULE_BARCODE) { ?> <?php if (! empty($conf->barcode->enabled)) { ?>
<tr> <tr>
<td><?php echo $langs->trans('Gencod'); ?></td> <td><?php echo $langs->trans('Gencod'); ?></td>
<td colspan="3"><?php echo $this->control->tpl['barcode']; ?></td> <td colspan="3"><?php echo $this->control->tpl['barcode']; ?></td>

View File

@ -784,7 +784,7 @@ else
print '</td></tr>'; print '</td></tr>';
// Barcode // Barcode
if (! empty($conf->global->MAIN_MODULE_BARCODE)) if (! empty($conf->barcode->enabled))
{ {
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3"><input type="text" name="barcode" value="'.$object->barcode.'">'; print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3"><input type="text" name="barcode" value="'.$object->barcode.'">';
print '</td></tr>'; print '</td></tr>';
@ -1218,7 +1218,7 @@ else
} }
// Barcode // Barcode
if ($conf->global->MAIN_MODULE_BARCODE) if (! empty($conf->barcode->enabled))
{ {
print '<tr><td valign="top">'.$langs->trans('Gencod').'</td><td colspan="3"><input type="text" name="barcode" value="'.$object->barcode.'">'; print '<tr><td valign="top">'.$langs->trans('Gencod').'</td><td colspan="3"><input type="text" name="barcode" value="'.$object->barcode.'">';
print '</td></tr>'; print '</td></tr>';
@ -1469,7 +1469,7 @@ else
if (! empty($conf->global->SOCIETE_USEPREFIX)) $rowspan++; if (! empty($conf->global->SOCIETE_USEPREFIX)) $rowspan++;
if (! empty($object->client)) $rowspan++; if (! empty($object->client)) $rowspan++;
if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire)) $rowspan++; if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire)) $rowspan++;
if (! empty($conf->global->MAIN_MODULE_BARCODE)) $rowspan++; if (! empty($conf->barcode->enabled)) $rowspan++;
if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++;
$htmllogobar=''; $htmllogobar='';
if ($showlogo || $showbarcode) if ($showlogo || $showbarcode)
@ -1514,7 +1514,7 @@ else
} }
// Barcode // Barcode
if (! empty($conf->global->MAIN_MODULE_BARCODE)) if (! empty($conf->barcode->enabled))
{ {
print '<tr><td>'; print '<tr><td>';
print $langs->trans('Gencod').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">'.$object->barcode; print $langs->trans('Gencod').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">'.$object->barcode;

View File

@ -68,17 +68,17 @@ $img_button=dol_buildpath($path.'/theme/auguria/img/button_bg.png',1);
$colorbacklineimpairhover='210,214,217'; $colorbacklineimpairhover='210,214,217';
$colorbacklinepairhover='210,214,217'; $colorbacklinepairhover='210,214,217';
// No hover by default, we keep only if we set var THEME_ELDY_USE_HOVER // No hover by default, we keep only if we set var THEME_ELDY_USE_HOVER
if ((! empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) && empty($user->conf->THEME_ELDY_USE_HOVER)) if ((! empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) && empty($user->conf->THEME_ELDY_USE_HOVER))
|| (empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) && empty($conf->global->THEME_ELDY_USE_HOVER))) || (empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) && empty($conf->global->THEME_ELDY_USE_HOVER)))
{ {
$colorbacklineimpairhover=''; $colorbacklineimpairhover='';
$colorbacklinepairhover=''; $colorbacklinepairhover='';
} }
print '/*'."\n"; print '/*'."\n";
print 'colorbacklineimpairhover='.$colorbacklineimpairhover."\n"; print 'colorbacklineimpairhover='.$colorbacklineimpairhover."\n";
print 'colorbacklinepairhover='.$colorbacklinepairhover."\n"; print 'colorbacklinepairhover='.$colorbacklinepairhover."\n";
print '*/'."\n"; print '*/'."\n";
?> ?>

View File

@ -6,6 +6,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005 Lionel Cousteix <etm_ltd@tiscali.co.uk> * Copyright (C) 2005 Lionel Cousteix <etm_ltd@tiscali.co.uk>
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com> * Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -882,7 +883,7 @@ else
$result=$ldap->connect_bind(); $result=$ldap->connect_bind();
if ($result > 0) if ($result > 0)
{ {
$userSearchFilter = '('.$conf->global->LDAP_FILTER_CONNECTION.'('.$this->getUserIdentifier().'='.$fuser->login.'))'; $userSearchFilter = '('.$conf->global->LDAP_FILTER_CONNECTION.'('.$ldap->getUserIdentifier().'='.$fuser->login.'))';
$entries = $ldap->fetch($fuser->login,$userSearchFilter); $entries = $ldap->fetch($fuser->login,$userSearchFilter);
if (! $entries) if (! $entries)
{ {