This commit is contained in:
Laurent Destailleur 2014-01-20 11:25:58 +01:00
commit 70debe9d9f
40 changed files with 177 additions and 551 deletions

View File

@ -138,6 +138,18 @@ parameter. All methods addline in this case were modified to remove this paramet
***** ChangeLog for 3.4.3 compared to 3.4.2 *****
Fix: Bad get of localtaxes into contracts add lines
***** ChangeLog for 3.4.3 compared to 3.4.2 *****
Fix: Warning into bank conciliation feature.
Fix: Bad get of localtaxes into contracts add lines.
Fix: Add a limit into list to avoid browser to hang when database is too large.
Fix: [ bug #1212 ] 'jqueryFileTree.php' directory traversal vulnerability
***** ChangeLog for 3.4.3 compared to 3.4.2 *****
Fix: Warning into bank conciliation feature.
Fix: Bad get of localtaxes into contracts add lines.
Fix: Add a limit into list to avoid browser to hang when database is too large.
Fix: [ bug #1212 ] 'jqueryFileTree.php' directory traversal vulnerability
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
Fix: field's problem into company's page (RIB).
Fix: Document cerfa doesn't contained firstname & lastname from donator.

0
build/doxygen/dolibarr-doxygen-build.pl Normal file → Executable file
View File

0
build/doxygen/dolibarr-doxygen-filter.pl Normal file → Executable file
View File

0
build/doxygen/dolibarr-doxygen-getversion.pl Normal file → Executable file
View File

View File

@ -54,3 +54,9 @@ window.location.href=pRef
JCROP:
------
* Remove analytics tag into file index.html
JQUERYFILETREE:
---------------
* Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors

View File

@ -499,7 +499,7 @@ class Categorie
$column_name=$type;
if ($type=='contact') $column_name='socpeople';
if ($type=='fournisseur') $column_name='societe';
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_".$type;
$sql .= " WHERE fk_categorie = ".$this->id;
$sql .= " AND fk_".$column_name." = ".$obj->id;
@ -573,9 +573,10 @@ class Categorie
/**
* check for the presence of an object in a category
* @param string $type object type
* @param int $object_id id of the object to search
* @return int nb number of occurrences
*
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
* @param int $object_id id of the object to search
* @return int number of occurrences
*/
function containsObject($type, $object_id)
{

View File

@ -473,8 +473,10 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
$var=true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").'</td></tr>';
while ($i < $num)
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1">('.$num.')</td></tr>';
$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?1000:$conf->global->MAIN_MAXLIST_OVERLOAD));
while ($i < $nbofloop)
{
$obj = $db->fetch_object($result);
$var=!$var;
@ -511,7 +513,12 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
$i++;
$total += $obj->total_ttc;
}
if ($total>0) {
if ($num > $nbofloop)
{
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
}
else if ($total>0)
{
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td>&nbsp;</td></tr>";
}
print "</table><br>";

View File

@ -313,8 +313,10 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
$var=true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal.php?viewstatut=1">('.$num.')</a></td></tr>';
while ($i < $num)
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1">('.$num.')</a></td></tr>';
$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?1000:$conf->global->MAIN_MAXLIST_OVERLOAD));
while ($i < $nbofloop)
{
$obj = $db->fetch_object($result);
$var=!$var;
@ -356,7 +358,12 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
$i++;
$total += $obj->total_ttc;
}
if ($total>0) {
if ($num > $nbofloop)
{
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
}
else if ($total>0)
{
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td>&nbsp;</td></tr>";
}
print "</table><br>";

View File

@ -796,7 +796,7 @@ class FormFile
{
print '<td align="center">';
$tmp=explode('.',$file['name']);
$minifile=$tmp[0].'_mini.'.$tmp[1];
$minifile=$tmp[0].'_mini.'.strtolower($tmp[1]); // Thumbs are created with filename in lower case
if (image_format_supported($file['name']) > 0) print '<img border="0" height="'.$maxheightmini.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&file='.urlencode($relativepath.'thumbs/'.$minifile).'" title="">';
else print '&nbsp;';
print '</td>';

View File

@ -557,7 +557,13 @@ function listOfSessions()
global $conf;
$arrayofSessions = array();
$sessPath = ini_get("session.save_path").'/';
// session.save_path can be returned empty so we set a default location and work from there
$sessPath = '/tmp';
$iniPath = ini_get("session.save_path");
if ($iniPath) {
$sessPath = $iniPath;
}
$sessPath .= '/'; // We need the trailing slash
dol_syslog('admin.lib:listOfSessions sessPath='.$sessPath);
$dh = @opendir(dol_osencode($sessPath));

View File

@ -538,13 +538,13 @@ function dol_move($srcfile, $destfile, $newmask=0, $overwriteifexists=1)
$newpathofdestfile=dol_osencode($destfile);
$result=@rename($newpathofsrcfile, $newpathofdestfile); // To see errors, remove @
if (! $result)
if (! $result)
{
if ($destexists)
if ($destexists)
{
dol_syslog("files.lib.php::dol_move failed. We try to delete first and move after.", LOG_WARNING);
// We force delete and try again. Rename function sometimes fails to replace dest file with some windows NTFS partitions.
dol_delete_file($destfile);
dol_delete_file($destfile);
$result=@rename($newpathofsrcfile, $newpathofdestfile); // To see errors, remove @
}
else dol_syslog("files.lib.php::dol_move failed", LOG_WARNING);
@ -726,6 +726,8 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n
$langs->load("other");
$langs->load("errors");
dol_syslog("dol_delete_file file=".$file." disableglob=".$disableglob." nophperrors=".$nophperrors." nohook=".$nohook);
if (empty($nohook))
{
$hookmanager->initHooks(array('fileslib'));
@ -1301,7 +1303,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
if (empty($modulepart)) return 'ErrorBadParameter';
if (empty($entity)) $entity=0;
dol_syslog('modulepart='.$modulepart.' original_file= '.$original_file);
dol_syslog('modulepart='.$modulepart.' original_file='.$original_file);
// We define $accessallowed and $sqlprotectagainstexternals
$accessallowed=0;
$sqlprotectagainstexternals='';

View File

@ -23,15 +23,15 @@
/**
* \defgroup agenda Module agenda
* \brief Module pour gerer l'agenda et actions
* \brief Module to manage agenda and events
* \file htdocs/core/modules/modAgenda.class.php
* \ingroup agenda
* \brief Fichier de description et activation du module agenda
* \brief File of class to describe and enable/disable module Agenda
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* Classe de description et activation du module Adherent
* Class to describe and enable/disable module Agenda
*/
class modAgenda extends DolibarrModules
{

View File

@ -41,12 +41,17 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
{
if ($object->id)
{
$urlfile = GETPOST('urlfile', 'alpha');
$linkid = GETPOST('linkid', 'int');
$urlfile = GETPOST('urlfile', 'alpha'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
if (GETPOST('section')) $file = $upload_dir . "/" . $urlfile; // For a delete of GED module urlfile contains full path from upload_dir
else // For documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile.
{
$urlfile=basename($urlfile);
$file = $upload_dir . "/" . $urlfile;
}
$linkid = GETPOST('linkid', 'int'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
if ($urlfile)
{
$file = $upload_dir . "/" . $urlfile; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
$ret = dol_delete_file($file, 0, 0, 0, $object);
if ($ret) {
setEventMessage($langs->trans("FileWasRemoved", $urlfile));

View File

@ -25,7 +25,7 @@ if (GETPOST('dol_optimize_smallscreen')) $conf->dol_optimize_smallscreen=1;
if (GETPOST('dol_no_mouse_hover')) $conf->dol_no_mouse_hover=1;
if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1;
$arrayofjs=array('/core/js/dst.js'); // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second
$arrayofjs=array('/core/js/dst.js'.(empty($conf->dol_use_jmobile)?'':'?version='.urlencode(DOL_VERSION))); // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second
$titleofloginpage=$langs->trans('Login').' '.$title; // title is defined by dol_loginfunction in security2.lib.php
print top_htmlhead('',$titleofloginpage,0,0,$arrayofjs);
?>
@ -33,12 +33,14 @@ print top_htmlhead('',$titleofloginpage,0,0,$arrayofjs);
<body class="body bodylogin">
<?php if (empty($conf->dol_use_jmobile)) { ?>
<script type="text/javascript">
$(document).ready(function () {
// Set focus on correct field
<?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
});
</script>
<?php } ?>
<center>

View File

@ -31,13 +31,14 @@ print top_htmlhead('',$langs->trans('Login').' '.$title);
<body class="bodylogin">
<!-- Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second -->
<?php if (empty($conf->dol_use_jmobile)) { ?>
<script type="text/javascript">
$(document).ready(function () {
// Set focus on correct field
<?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
});
</script>
<?php } ?>
<center>

View File

@ -1378,7 +1378,7 @@ class FactureFournisseur extends CommonInvoice
while ($obj=$this->db->fetch_object($resql))
{
$this->nbtodo++;
if ($this->db->jdate($obj->datefin) < ($now - $conf->facture->fournisseur->warning_delay)) $this->nbtodolate++;
if (! empty($obj->datefin) && $this->db->jdate($obj->datefin) < ($now - $conf->facture->fournisseur->warning_delay)) $this->nbtodolate++;
}
$this->db->free($resql);
return 1;

View File

@ -1,44 +0,0 @@
<%
'
' jQuery File Tree ASP (VBS) Connector
' Copyright 2008 Chazzuka
' programmer@chazzuka.com
' http://www.chazzuka.com/
'
' retrive base directory
dim BaseFileDir:BaseFileDir=Request.Form("dir")
' if blank give default value
if len(BaseFileDir)=0 then BaseFileDir="/userfiles/"
dim ObjFSO,BaseFile,Html
' resolve the absolute path
BaseFile = Server.MapPath(BaseFileDir)&"\"
' create FSO
Set ObjFSO = Server.CreateObject("Scripting.FileSystemObject")
' if given folder is exists
if ObjFSO.FolderExists(BaseFile) then
dim ObjFolder,ObjSubFolder,ObjFile,i__Name,i__Ext
Html = Html + "<ul class=""jqueryFileTree"" style=""display: none;"">"&VBCRLF
Set ObjFolder = ObjFSO.GetFolder(BaseFile)
' LOOP THROUGH SUBFOLDER
For Each ObjSubFolder In ObjFolder.SubFolders
i__Name=ObjSubFolder.name
Html = Html + "<li class=""directory collapsed"">"&_
"<a href=""#"" rel="""+(BaseFileDir+i__Name+"/")+""">"&_
(i__Name)+"</a></li>"&VBCRLF
Next
'LOOP THROUGH FILES
For Each ObjFile In ObjFolder.Files
' name
i__Name=ObjFile.name
' extension
i__Ext = LCase(Mid(i__Name, InStrRev(i__Name, ".", -1, 1) + 1))
Html = Html + "<li class=""file ext_"&i__Ext&""">"&_
"<a href=""#"" rel="""+(BaseFileDir+i__Name)+""">"&_
(i__name)+"</a></li>"&VBCRLF
Next
Html = Html + "</ul>"&VBCRLF
end if
Response.Write Html
%>

View File

@ -1,31 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" %>
<%
//
// jQuery File Tree ASP Connector
//
// Version 1.0
//
// Copyright (c)2008 Andrew Sweeny
// asweeny@fit.edu
// 24 March 2008
//
string dir;
if(Request.Form["dir"] == null || Request.Form["dir"].Length <= 0)
dir = "/";
else
dir = Server.UrlDecode(Request.Form["dir"]);
System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(dir);
Response.Write("<ul class=\"jqueryFileTree\" style=\"display: none;\">\n");
foreach (System.IO.DirectoryInfo di_child in di.GetDirectories())
Response.Write("\t<li class=\"directory collapsed\"><a href=\"#\" rel=\"" + dir + di_child.Name + "/\">" + di_child.Name + "</a></li>\n");
foreach (System.IO.FileInfo fi in di.GetFiles())
{
string ext = "";
if(fi.Extension.Length > 1)
ext = fi.Extension.Substring(1).ToLower();
Response.Write("\t<li class=\"file ext_" + ext + "\"><a href=\"#\" rel=\"" + dir + fi.Name + "\">" + fi.Name + "</a></li>\n");
}
Response.Write("</ul>");
%>

View File

@ -1,19 +0,0 @@
<!---
jQuery File Tree
ColdFusion connector script
By Tjarko Rikkerink (http://carlosgallupa.com/)
--->
<cfparam name="form.dir" default="/somedir" />
<cfdirectory action="LIST" directory="#expandpath('#URLDecode(form.dir)#')#" name="qDir" sort="type, name" type="all" listinfo="all" recurse="no">
<ul class="jqueryFileTree" style="display: none;">
<cfoutput query="qDir">
<cfif type eq "dir">
<li class="directory collapsed"><a href="##" rel="#URLDecode(form.dir)##name#/">#name#</a></li>
<cfelseif type eq "file">
<li class="file ext_#listLast(name,'.')#"><a href="##" rel="#URLDecode(form.dir)##name#">#name# (#round(size/1024)#KB)</a></li>
</cfif>
</cfoutput>
</ul>

View File

@ -1,49 +0,0 @@
<%@ page
import="java.io.File,java.io.FilenameFilter,java.util.Arrays"%>
<%
/**
* jQuery File Tree JSP Connector
* Version 1.0
* Copyright 2008 Joshua Gould
* 21 April 2008
*/
String dir = request.getParameter("dir");
if (dir == null) {
return;
}
if (dir.charAt(dir.length()-1) == '\\') {
dir = dir.substring(0, dir.length()-1) + "/";
} else if (dir.charAt(dir.length()-1) != '/') {
dir += "/";
}
dir = java.net.URLDecoder.decode(dir, "UTF-8");
if (new File(dir).exists()) {
String[] files = new File(dir).list(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.charAt(0) != '.';
}
});
Arrays.sort(files, String.CASE_INSENSITIVE_ORDER);
out.print("<ul class=\"jqueryFileTree\" style=\"display: none;\">");
// All dirs
for (String file : files) {
if (new File(dir, file).isDirectory()) {
out.print("<li class=\"directory collapsed\"><a href=\"#\" rel=\"" + dir + file + "/\">"
+ file + "</a></li>");
}
}
// All files
for (String file : files) {
if (!new File(dir, file).isDirectory()) {
int dotIndex = file.lastIndexOf('.');
String ext = dotIndex > 0 ? file.substring(dotIndex + 1) : "";
out.print("<li class=\"file ext_" + ext + "\"><a href=\"#\" rel=\"" + dir + file + "\">"
+ file + "</a></li>");
}
}
out.print("</ul>");
}
%>

View File

@ -1,43 +0,0 @@
<?php
//
// jQuery File Tree PHP Connector
//
// Version 1.01
//
// Cory S.N. LaViska
// A Beautiful Site (http://abeautifulsite.net/)
// 24 March 2008
//
// History:
//
// 1.01 - updated to work with foreign characters in directory/file names (12 April 2008)
// 1.00 - released (24 March 2008)
//
// Output a list of files for jQuery File Tree
//
$_POST['dir'] = urldecode($_POST['dir']);
if( file_exists($root . $_POST['dir']) ) {
$files = scandir($root . $_POST['dir']);
natcasesort($files);
if( count($files) > 2 ) { /* The 2 accounts for . and .. */
echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
// All dirs
foreach( $files as $file ) {
if( file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && is_dir($root . $_POST['dir'] . $file) ) {
echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "/\">" . htmlentities($file) . "</a></li>";
}
}
// All files
foreach( $files as $file ) {
if( file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && !is_dir($root . $_POST['dir'] . $file) ) {
$ext = preg_replace('/^.*\./', '', $file);
echo "<li class=\"file ext_$ext\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "\">" . htmlentities($file) . "</a></li>";
}
}
echo "</ul>";
}
}
?>

View File

@ -1,102 +0,0 @@
#!/usr/bin/perl
use strict;
use HTML::Entities ();
#-----------------------------------------------------------
# jQuery File Tree Perl Connector
#
# Version 1.0
#
# Oleg Burlaca
# http://www.burlaca.com/2009/02/jquery-file-tree-connector/
# 12 February 2009
#-----------------------------------------------------------
# for security reasons, specify a root folder
# to prevent the whole filesystem to be shown
# for ex: the root folder of your webbrowser
my $root = "/var/www/html/";
#----------------------------------------------------------
my $params = &getCGIParams();
print "Content-type: text/html\n\n";
my $dir = $params->{dir};
my $fullDir = $root . $dir;
exit if ! -e $fullDir;
opendir(BIN, $fullDir) or die "Can't open $dir: $!";
my (@folders, @files);
my $total = 0;
while( defined (my $file = readdir BIN) ) {
next if $file eq '.' or $file eq '..';
$total++;
if (-d "$fullDir/$file") {
push (@folders, $file);
} else {
push (@files, $file);
}
}
closedir(BIN);
return if $total == 0;
print "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
# print Folders
foreach my $file (sort @folders) {
next if ! -e $fullDir . $file;
print '<li class="directory collapsed"><a href="#" rel="' .
&HTML::Entities::encode($dir . $file) . '/">' .
&HTML::Entities::encode($file) . '</a></li>';
}
# print Files
foreach my $file (sort @files) {
next if ! -e $fullDir . $file;
$file =~ /\.(.+)$/;
my $ext = $1;
print '<li class="file ext_' . $ext . '"><a href="#" rel="' .
&HTML::Entities::encode($dir . $file) . '/">' .
&HTML::Entities::encode($file) . '</a></li>';
}
print "</ul>\n";
#--------------------------------------------------------------------------------------------------
sub getCGIParams {
my $line;
if ($ENV{'REQUEST_METHOD'} eq "POST") {
read(STDIN, $line, $ENV{'CONTENT_LENGTH'});
} else {
$line = $ENV{'QUERY_STRING'};
}
my (@pairs) = split(/&/, $line);
my ($name, $value, %F);
foreach (@pairs) {
($name, $value) = split(/=/);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
if (! exists $F{$name}) {
$F{$name} = $value;
} elsif (exists $F{$name} and ref($F{$name}) ne 'ARRAY') {
my $prev_value = $F{$name};
delete $F{$name};
$F{$name} = [ $prev_value, $value ];
} else { push @{ $F{$name} }, $value }
}
return \%F;
}
#--------------------------------------------------------------------------------------------------

View File

@ -1,25 +0,0 @@
#
# jQuery File Tree
# Python/Django connector script
# By Martin Skou
#
import os
import urllib
def dirlist(request):
r=['<ul class="jqueryFileTree" style="display: none;">']
try:
r=['<ul class="jqueryFileTree" style="display: none;">']
d=urllib.unquote(request.POST.get('dir','c:\\temp'))
for f in os.listdir(d):
ff=os.path.join(d,f)
if os.path.isdir(ff):
r.append('<li class="directory collapsed"><a href="#" rel="%s/">%s</a></li>' % (ff,f))
else:
e=os.path.splitext(f)[1][1:] # get .ext and remove dot
r.append('<li class="file ext_%s"><a href="#" rel="%s">%s</a></li>' % (e,ff,f))
r.append('</ul>')
except Exception,e:
r.append('Could not load directory: %s' % str(e))
r.append('</ul>')
return HttpResponse(''.join(r))

View File

@ -1,61 +0,0 @@
#
# jQuery File Tree Ruby Connector
#
# Version 1.01
#
# Erik Lax
# http://datahack.se
# 13 July 2008
#
# History
#
# 1.01 Initial Release
#
# Output a list of files for jQuery File Tree
#
#<settings>
#root = "/absolute/path/"
# or
root = File.expand_path(".")
#</settings>
#<code>
require "cgi"
cgi = CGI.new
cgi.header("type" => "text/html")
dir = cgi.params["dir"].to_s
puts "<ul class=\"jqueryFileTree\" style=\"display: none;\">"
begin
path = root + "/" + dir
# chdir() to user requested dir (root + "/" + dir)
Dir.chdir(File.expand_path(path).untaint);
# check that our base path still begins with root path
if Dir.pwd[0,root.length] == root then
#loop through all directories
Dir.glob("*") {
|x|
if not File.directory?(x.untaint) then next end
puts "<li class=\"directory collapsed\"><a href=\"#\" rel=\"#{dir}#{x}/\">#{x}</a></li>";
}
#loop through all files
Dir.glob("*") {
|x|
if not File.file?(x.untaint) then next end
ext = File.extname(x)[1..-1]
puts "<li class=\"file ext_#{ext}\"><a href=\"#\" rel=\"#{dir}#{x}\">#{x}</a></li>"
}
else
#only happens when someone tries to go outside your root directory...
puts "You are way out of your league"
end
rescue
puts "Internal Error"
end
puts "</ul>"
#</code>

View File

@ -1,36 +0,0 @@
[
//
// jQuery File Tree Lasso Connector
//
// Version 1.00
//
// Jason Huck
// http://devblog.jasonhuck.com/
// 1 May 2008
//
// History:
//
// 1.00 - released (1 May 2008)
//
// Output a list of files for jQuery File Tree
//
!action_param('dir') ? abort;
var('dir') = action_param('dir');
var('files') = file_listdirectory($dir);
'<ul class="jqueryFileTree" style="display: none;">';
iterate($files, local('file'));
#file->beginswith('.') ? loop_continue;
if(#file->endswith('/'));
'<li class="directory collapsed"><a href="#" rel="' + $dir + #file + '">' + #file + '</a></li>';
else;
local('ext') = #file->split('.')->last;
'<li class="file ext_' + #ext + '"><a href="#" rel="' + $dir + #file + '">' + #file + '</a></li>';
/if;
/iterate;
'</ul>';
]

View File

@ -1,48 +0,0 @@
<?LassoScript
//
// jQuery File Tree LASSO Connector
//
// Version 1.00
//
// Marc Sabourdin
// CysNET (http://www.marcsabourdin.com/)
// 23 May 2008
//
// History:
//
// 1.00 - released (23 May 2008)
//
// Output a list of files for jQuery File Tree
//
Encode_set:-EncodeNone;
Variable:'root' = 'path_to_desired_and_Lasso_allowed_root';
Variable:'_POST.dir' = (action_param:'dir');
Variable:'files';
if:( file_exists: ($root + $_POST.dir) )&&( File_IsDirectory:($root + $_POST.dir) );
$files = (File_ListDirectory:($root + $_POST.dir));
$files->(Sort);
if:( $files->(Size) > 0 );
output:'<ul class="jqueryFileTree" style="display: none;">';
// All dirs
Iterate:($files),(Local:'file');
if:( file_exists:($root + $_POST.dir + #file) )&&( #file != '.' )&&( #file != '..' )&&( File_IsDirectory:($root + $_POST.dir + #file) );
output:'<li class="directory collapsed"><a href="#" rel="' + (String_replace:($_POST.dir + #file),-Find=' ',-Replace='__') + '">' + (Encode_HTML:(#file)) + '</a></li>';
/if;
/Iterate;
// All files
Local:'ext';
Iterate:($files),(Local:'file');
if:( file_exists:($root + $_POST.dir + #file) )&&( #file != '.' )&&( #file != '..' )&&( (File_IsDirectory:($root + $_POST.dir + #file))==false );
#ext = (#file)->(Split:'.')->Last;
output:'<li class="file ext_' + (#ext) + '"><a href="' + ($_POST.dir + #file) + '">' + (Encode_HTML:(#file)) + '</a></li>';
/if;
/Iterate;
output:'</ul>';
/if;
/if;
/Encode_set;
?>

View File

@ -15,6 +15,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* 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 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
}
}
/*
* Remove deprecated indexes and constraints for Mysql
*/
@ -343,12 +352,12 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
{
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 '<div class="error">'.$langs->trans("ErrorCanNotReadDir",$dir).'</div>';
}
@ -413,7 +422,6 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
if ($db->connected) $db->close();
}
if (empty($actiondone))
{
print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>';

View File

@ -16,6 +16,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* 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
*/
/**

View File

@ -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

View File

@ -666,6 +666,8 @@ SaveUploadedFileWithMask=Save file on server with name "<strong>%s</strong>" (ot
OriginFileName=Original filename
SetDemandReason=Set source
ViewPrivateNote=View notes
XMoreLines=%s line(s) hidden
# Week day
Monday=Monday
Tuesday=Tuesday

View File

@ -666,6 +666,7 @@ SaveUploadedFileWithMask=Sauver le fichier sur le serveur sous le nom "<strong>%
OriginFileName=nom du fichier source
SetDemandReason=Définir l'origine
ViewPrivateNote=Voir notes
XMoreLines=%s ligne(s) non affichée(s)
# Week day
Monday=Lundi

View File

@ -972,41 +972,44 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
else print "<title>".$appli."</title>";
print "\n";
$ext='';
if (! empty($conf->dol_use_jmobile)) $ext='version='.urlencode(DOL_VERSION);
if (! defined('DISABLE_JQUERY') && ! $disablejs && $conf->use_javascript_ajax)
{
print '<!-- Includes CSS for JQuery (Ajax library) -->'."\n";
$jquerytheme = 'smoothness';
if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/tipTip.css" />'."\n"; // Tooltip
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css" />'."\n"; // JNotify
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css'.($ext?'?'.$ext:'').'" />'."\n"; // JQuery
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css'.($ext?'?'.$ext:'').'" />'."\n"; // JQuery
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/tipTip.css'.($ext?'?'.$ext:'').'" />'."\n"; // Tooltip
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css'.($ext?'?'.$ext:'').'" />'."\n"; // JNotify
/*if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) || (defined('REQUIRE_JQUERY_FILEUPLOAD') && constant('REQUIRE_JQUERY_FILEUPLOAD'))) // jQuery fileupload
{
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/css/jquery.fileupload-ui.css" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/css/jquery.fileupload-ui.css'.($ext?'?'.$ext:'').'" />'."\n";
}*/
if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES) || (defined('REQUIRE_JQUERY_DATATABLES') && constant('REQUIRE_JQUERY_DATATABLES'))) // jQuery datatables
{
//print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/css/jquery.dataTables.css" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/css/jquery.dataTables_jui.css" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColReorder/css/ColReorder.css" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/css/ColVis.css" />'."\n";
//print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/css/ColVisAlt.css" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/css/TableTools.css" />'."\n";
//print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/css/jquery.dataTables.css'.($ext?'?'.$ext:'').'" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/css/jquery.dataTables_jui.css'.($ext?'?'.$ext:'').'" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColReorder/css/ColReorder.css'.($ext?'?'.$ext:'').'" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/css/ColVis.css'.($ext?'?'.$ext:'').'" />'."\n";
//print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/css/ColVisAlt.css'.($ext?'?'.$ext:'').'" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/css/TableTools.css'.($ext?'?'.$ext:'').'" />'."\n";
}
if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT'))) // jQuery multiselect
{
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiselect/css/ui.multiselect.css" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiselect/css/ui.multiselect.css'.($ext?'?'.$ext:'').'" />'."\n";
}
// jQuery Timepicker
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
{
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.css" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.css'.($ext?'?'.$ext:'').'" />'."\n";
}
// jQuery jMobile
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile))
{
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css'.($ext?'?'.$ext:'').'" />'."\n";
}
}
@ -1029,6 +1032,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
}
}
$themeparam='?lang='.$langs->defaultlang.'&amp;theme='.$conf->theme.(GETPOST('optioncss')?'&amp;optioncss='.GETPOST('optioncss','alpha',1):'').'&amp;userid='.$user->id.'&amp;entity='.$conf->entity;
$themeparam.=($ext?'&amp;'.$ext:'');
if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&amp;dol_resetcache='.$_SESSION['dol_resetcache'];
if (GETPOST('dol_hide_topmenu')) { $themeparam.='&amp;dol_hide_topmenu='.GETPOST('dol_hide_topmenu'); }
if (GETPOST('dol_hide_leftmenu')) { $themeparam.='&amp;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 '<!-- Includes JS for JQuery -->'."\n";
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min'.$ext.'"></script>'."\n";
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
if (constant('JS_JQUERY_UI')) print '<script type="text/javascript" src="'.JS_JQUERY_UI.'jquery-ui.min.js"></script>'."\n";
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui-latest.custom.min'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/jquery.tipTip.min'.$ext.'"></script>'."\n";
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
if (constant('JS_JQUERY_UI')) print '<script type="text/javascript" src="'.JS_JQUERY_UI.'jquery-ui.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui-latest.custom.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/jquery.tipTip.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
// jQuery Layout
if (! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT'))
{
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/layout/jquery.layout-latest'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/layout/jquery.layout-latest.js'.($ext?'?'.$ext:'').'"></script>'."\n";
}
// jQuery jnotify
if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && ! defined('DISABLE_JQUERY_JNOTIFY'))
{
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify.min.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/jnotify.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/jnotify.js'.($ext?'?'.$ext:'').'"></script>'."\n";
}
// jQuery blockUI
if (! empty($conf->global->MAIN_USE_JQUERY_BLOCKUI) || defined('REQUIRE_JQUERY_BLOCKUI'))
{
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/blockUI/jquery.blockUI.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/blockUI/jquery.blockUI.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript">'."\n";
print 'var indicatorBlockUI = \''.DOL_URL_ROOT."/theme/".$conf->theme."/img/working2.gif".'\';'."\n";
print '</script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/blockUI.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/blockUI.js'.($ext?'?'.$ext:'').'"></script>'."\n";
}
// Flot
if (empty($conf->global->MAIN_DISABLE_JQUERY_FLOT))
{
if (constant('JS_JQUERY_FLOT'))
{
print '<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="/javascript/excanvas/excanvas.min.js"></script><![endif]-->'."\n";
print '<script type="text/javascript" src="'.JS_JQUERY_FLOT.'jquery.flot.js"></script>'."\n";
print '<script type="text/javascript" src="'.JS_JQUERY_FLOT.'jquery.flot.pie.js"></script>'."\n";
print '<script type="text/javascript" src="'.JS_JQUERY_FLOT.'jquery.flot.stack.js"></script>'."\n";
print '<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="/javascript/excanvas/excanvas.min.js'.($ext?'?'.$ext:'').'"></script><![endif]-->'."\n";
print '<script type="text/javascript" src="'.JS_JQUERY_FLOT.'jquery.flot.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.JS_JQUERY_FLOT.'jquery.flot.pie.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.JS_JQUERY_FLOT.'jquery.flot.stack.js'.($ext?'?'.$ext:'').'"></script>'."\n";
}
else
{
print '<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/flot/excanvas.min.js"></script><![endif]-->'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/flot/jquery.flot.min.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/flot/jquery.flot.pie.min.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/flot/jquery.flot.stack.min.js"></script>'."\n";
print '<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/flot/excanvas.min.js'.($ext?'?'.$ext:'').'"></script><![endif]-->'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/flot/jquery.flot.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/flot/jquery.flot.pie.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/flot/jquery.flot.stack.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
}
}
// jQuery jeditable
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE))
{
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.min'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ui-datepicker.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ui-autocomplete.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ui-datepicker.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ui-autocomplete.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript">'."\n";
print 'var urlSaveInPlace = \''.DOL_URL_ROOT.'/core/ajax/saveinplace.php\';'."\n";
print 'var urlLoadInPlace = \''.DOL_URL_ROOT.'/core/ajax/loadinplace.php\';'."\n";
@ -1134,40 +1136,40 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print 'var submitInPlace = \''.$langs->trans('Ok').'\';'."\n";
print 'var indicatorInPlace = \'<img src="'.DOL_URL_ROOT."/theme/".$conf->theme."/img/working.gif".'">\';'."\n";
print '</script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/editinplace.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ckeditor.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/editinplace.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ckeditor.js'.($ext?'?'.$ext:'').'"></script>'."\n";
}
// jQuery File Upload
/*
if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) || (defined('REQUIRE_JQUERY_FILEUPLOAD') && constant('REQUIRE_JQUERY_FILEUPLOAD')))
{
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/template/tmpl.min.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/js/jquery.iframe-transport.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/js/jquery.fileupload.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/js/jquery.fileupload-fp.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/js/jquery.fileupload-ui.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/js/jquery.fileupload-jui.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/template/tmpl.min'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/js/jquery.iframe-transport'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/js/jquery.fileupload'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/js/jquery.fileupload-fp'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/js/jquery.fileupload-ui'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/js/jquery.fileupload-jui'.$ext.'"></script>'."\n";
print '<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE8+ -->'."\n";
print '<!--[if gte IE 8]><script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/js/cors/jquery.xdr-transport.js"></script><![endif]-->'."\n";
print '<!--[if gte IE 8]><script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/js/cors/jquery.xdr-transport'.$ext.'"></script><![endif]-->'."\n";
}*/
// jQuery DataTables
if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES) || (defined('REQUIRE_JQUERY_DATATABLES') && constant('REQUIRE_JQUERY_DATATABLES')))
{
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/js/jquery.dataTables.min'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColReorder/js/ColReorder.min'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/js/ColVis.min'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/js/TableTools.min'.$ext.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/js/jquery.dataTables.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColReorder/js/ColReorder.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/js/ColVis.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/js/TableTools.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
}
// jQuery Multiselect
if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT')))
{
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiselect/js/ui.multiselect.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiselect/js/ui.multiselect.js'.($ext?'?'.$ext:'').'"></script>'."\n";
}
// jQuery Timepicker
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
{
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/timepicker.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/timepicker.js.php?lang='.$langs->defaultlang.($ext?'&amp;'.$ext:'').'"></script>'."\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
});
</script>';
}
if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 3) print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 3) print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
}
}
@ -1207,15 +1209,15 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print 'var ckeditorFilebrowserBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n";
print 'var ckeditorFilebrowserImageBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Type=Image&Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n";
print '</script>'."\n";
print '<script type="text/javascript" src="'.$pathckeditor.'ckeditor_basic.js"></script>'."\n";
print '<script type="text/javascript" src="'.$pathckeditor.'ckeditor_basic.js'.($ext?'?'.$ext:'').'"></script>'."\n";
}
// Global js function
print '<!-- Includes JS of Dolibarr -->'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_head.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_head.js'.($ext?'?'.$ext:'').'"></script>'."\n";
// Add datepicker default options
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/datepicker.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/datepicker.js.php?lang='.$langs->defaultlang.($ext?'&amp;'.$ext:'').'"></script>'."\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.='<br><b>'.$langs->trans("DisabledModules").'</b>: <br>'.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.'<br>';
$logouthtmltext=$appli.'<br>';
$logouthtmltext.=$langs->trans("Logout").'<br>';
//$logouthtmltext.="<br>";
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 '<div id="blockvmenuhelp" class="blockvmenuhelp">';
if ($doliurl) print '<a class="help" target="_blank" href="'.$doliurl.'">';
print $appli;

View File

@ -27,7 +27,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
/**
* Class to manage tasks
* Initialy built by build_class_from_table on 2008-09-10 12:41
*/
class Task extends CommonObject
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -967,7 +967,6 @@ td.photo {
/* ============================================================================== */
.toolbar {
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$conf->theme.'/img/tmenu2.png',1); ?>) !important;
background-repeat: repeat-x !important;
border: 1px solid #BBB !important;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB