';
print "\n";
diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php
index ccb19aa352a8d..de0a8fe28a1b1 100644
--- a/htdocs/install/upgrade.php
+++ b/htdocs/install/upgrade.php
@@ -15,6 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
+ *
+ * Upgrade scripts can be ran from command line with syntax:
+ *
+ * cd htdocs/install
+ * php upgrade.php 3.4.0 3.5.0
+ * php upgrade2.php 3.4.0 3.5.0
+ *
+ * Return code is 0 if OK, >0 if error
*/
/**
@@ -260,6 +268,7 @@
}
}
+
/*
* Remove deprecated indexes and constraints for Mysql
*/
@@ -343,12 +352,12 @@
{
while (($file = readdir($handle))!==false)
{
- if (preg_match('/\.sql$/i',$file)) $filesindir[]=$file;
+ if (preg_match('/\.sql$/i',$file)) $filesindir[]=$file;
}
sort($filesindir);
}
else
- {
+ {
print '
'.$langs->trans("ErrorCanNotReadDir",$dir).'
';
}
@@ -420,7 +429,6 @@
if ($db->connected) $db->close();
}
-
if (empty($actiondone))
{
print '
'.$langs->trans("ErrorWrongParameters").'
';
@@ -436,4 +444,4 @@
// Return code if ran from command line
if ($ret) exit($ret);
-?>
\ No newline at end of file
+?>
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index 78c223a98072b..593ae33ebcc22 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -16,6 +16,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
+ *
+ * Upgrade scripts can be ran from command line with syntax:
+ *
+ * cd htdocs/install
+ * php upgrade.php 3.4.0 3.5.0
+ * php upgrade2.php 3.4.0 3.5.0
+ *
+ * Return code is 0 if OK, >0 if error
*/
/**
diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang
index e4de38e621e43..88ac8d90d5ee1 100644
--- a/htdocs/langs/en_US/banks.lang
+++ b/htdocs/langs/en_US/banks.lang
@@ -28,6 +28,7 @@ EndBankBalance=End balance
CurrentBalance=Current balance
FutureBalance=Future balance
ShowAllTimeBalance=Show balance from start
+AllTime=From start
Reconciliation=Reconciliation
RIB=Bank Account Number
IBAN=IBAN number
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 69265f73b675d..696cff5b1bde5 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -972,41 +972,44 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
else print "".dol_htmlentities($appli)."";
print "\n";
+ $ext='';
+ if (! empty($conf->dol_use_jmobile)) $ext='version='.urlencode(DOL_VERSION);
+
if (! defined('DISABLE_JQUERY') && ! $disablejs && $conf->use_javascript_ajax)
{
print ''."\n";
$jquerytheme = 'smoothness';
if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
- if (constant('JS_JQUERY_UI')) print ''."\n"; // JQuery
- else print ''."\n"; // JQuery
- print ''."\n"; // Tooltip
- print ''."\n"; // JNotify
+ if (constant('JS_JQUERY_UI')) print ''."\n"; // JQuery
+ else print ''."\n"; // JQuery
+ print ''."\n"; // Tooltip
+ print ''."\n"; // JNotify
/*if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) || (defined('REQUIRE_JQUERY_FILEUPLOAD') && constant('REQUIRE_JQUERY_FILEUPLOAD'))) // jQuery fileupload
{
- print ''."\n";
+ print ''."\n";
}*/
if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES) || (defined('REQUIRE_JQUERY_DATATABLES') && constant('REQUIRE_JQUERY_DATATABLES'))) // jQuery datatables
{
- //print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
- //print ''."\n";
- print ''."\n";
+ //print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ //print ''."\n";
+ print ''."\n";
}
if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT'))) // jQuery multiselect
{
- print ''."\n";
+ print ''."\n";
}
// jQuery Timepicker
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
{
- print ''."\n";
+ print ''."\n";
}
// jQuery jMobile
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile))
{
- print ''."\n";
+ print ''."\n";
}
}
@@ -1029,6 +1032,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
}
}
$themeparam='?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss','alpha',1):'').'&userid='.$user->id.'&entity='.$conf->entity;
+ $themeparam.=($ext?'&'.$ext:'');
if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache'];
if (GETPOST('dol_hide_topmenu')) { $themeparam.='&dol_hide_topmenu='.GETPOST('dol_hide_topmenu'); }
if (GETPOST('dol_hide_leftmenu')) { $themeparam.='&dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu'); }
@@ -1068,63 +1072,61 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
}
}
- $ext='.js';
-
// Output standard javascript links
if (! defined('DISABLE_JQUERY') && ! $disablejs && ! empty($conf->use_javascript_ajax))
{
// JQuery. Must be before other includes
print ''."\n";
- if (constant('JS_JQUERY')) print ''."\n";
- else print ''."\n";
- if (constant('JS_JQUERY_UI')) print ''."\n";
- else print ''."\n";
- print ''."\n";
- print ''."\n";
+ if (constant('JS_JQUERY')) print ''."\n";
+ else print ''."\n";
+ if (constant('JS_JQUERY_UI')) print ''."\n";
+ else print ''."\n";
+ print ''."\n";
+ print ''."\n";
// jQuery Layout
if (! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT'))
{
- print ''."\n";
+ print ''."\n";
}
// jQuery jnotify
if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && ! defined('DISABLE_JQUERY_JNOTIFY'))
{
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
}
// jQuery blockUI
if (! empty($conf->global->MAIN_USE_JQUERY_BLOCKUI) || defined('REQUIRE_JQUERY_BLOCKUI'))
{
- print ''."\n";
+ print ''."\n";
print ''."\n";
- print ''."\n";
+ print ''."\n";
}
// Flot
if (empty($conf->global->MAIN_DISABLE_JQUERY_FLOT))
{
if (constant('JS_JQUERY_FLOT'))
{
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
}
else
{
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
}
}
// jQuery jeditable
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE))
{
- print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
}
// jQuery File Upload
/*
if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) || (defined('REQUIRE_JQUERY_FILEUPLOAD') && constant('REQUIRE_JQUERY_FILEUPLOAD')))
{
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
print ''."\n";
- print ''."\n";
+ print ''."\n";
}*/
// jQuery DataTables
if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES) || (defined('REQUIRE_JQUERY_DATATABLES') && constant('REQUIRE_JQUERY_DATATABLES')))
{
- print ''."\n";
- print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
}
// jQuery Multiselect
if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT')))
{
- print ''."\n";
+ print ''."\n";
}
// jQuery Timepicker
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
{
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
}
// jQuery jMobile
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0))
@@ -1189,7 +1191,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
});
';
}
- if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 3) print ''."\n";
+ if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 3) print ''."\n";
}
}
@@ -1212,10 +1214,10 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
// Global js function
print ''."\n";
- print ''."\n";
+ print ''."\n";
// Add datepicker default options
- print ''."\n";
+ print ''."\n";
// JS forced by modules (relative url starting with /)
if (! empty($conf->modules_parts['js'])) // $conf->modules_parts['js'] is array('module'=>array('file1','file2'))
@@ -1423,11 +1425,20 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
if (! empty($_SESSION["disablemodules"])) $loginhtmltext.=' '.$langs->trans("DisabledModules").': '.join(', ',explode(',',$_SESSION["disablemodules"]));
$appli='Dolibarr';
- if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE;
+ if (! empty($conf->global->MAIN_APPLICATION_TITLE))
+ {
+ $appli=$conf->global->MAIN_APPLICATION_TITLE;
+ if (preg_match('/\d\.\d/', $appli))
+ {
+ if (! preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) $appli.=" (".DOL_VERSION.")"; // If new title contains a version that is different than core
+ }
+ else $appli.=" ".DOL_VERSION;
+ }
+ else $appli.=" ".DOL_VERSION;
// Link info
$logouttext='';
- $logouthtmltext=$appli.' '.DOL_VERSION.' ';
+ $logouthtmltext=$appli.' ';
$logouthtmltext.=$langs->trans("Logout").' ';
//$logouthtmltext.=" ";
if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http')
@@ -1621,10 +1632,16 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
if (preg_match('/es/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.es';
$appli='Dolibarr';
- if (! empty($conf->global->MAIN_APPLICATION_TITLE)) {
+ if (! empty($conf->global->MAIN_APPLICATION_TITLE))
+ {
$appli=$conf->global->MAIN_APPLICATION_TITLE; $doliurl='';
+ if (preg_match('/\d\.\d/', $appli))
+ {
+ if (! preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) $appli.=" (".DOL_VERSION.")"; // If new title contains a version that is different than core
+ }
+ else $appli.=" ".DOL_VERSION;
}
- $appli.=" ".DOL_VERSION;
+ else $appli.=" ".DOL_VERSION;
print '
';
print "\n";
// Show all lines in taskarray (recursive function to go down on tree)
diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php
index 301629dd17a1a..f29c290548f7b 100644
--- a/htdocs/societe/consumption.php
+++ b/htdocs/societe/consumption.php
@@ -270,8 +270,8 @@
print '';
print '';
print '