mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Qual: Spelling outside htdocs (#27448)
* Qual: Spelling outside htdocs # Qual: Fix spelling of files not in the htdocs subdirectory. Highlight: - Change in email test from unvalid to invalid that should give the same test result. * Update Dolibarr-soapui-project.xml --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
@@ -34,7 +34,7 @@ See makepack-howto.txt for prerequisites.
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build developper documentation, launch the script
|
||||
- To build developer documentation, launch the script
|
||||
> perl dolibarr-doxygen-build.pl
|
||||
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ export QUILT_PATCHES=debian/patches
|
||||
# dpkg -l List all packages
|
||||
# dpkg -b To build binary only package
|
||||
# dpkg -c package.deb List content of package
|
||||
# dpkg -I package.deb Give informations on package
|
||||
# dpkg -I package.deb Give information on package
|
||||
# dpkg -i package.deb Install a package
|
||||
# dpkg-reconfigure -plow package Reconfigure package
|
||||
# dpkg -L packagename List content of installed package
|
||||
@@ -173,7 +173,7 @@ or
|
||||
> ls /srv/chroot
|
||||
|
||||
Puis pour se connecter et préparer l'environnement
|
||||
> schroot -c name_of_chroot (exemple schroot -c unstable-amd64-sbuild)
|
||||
> schroot -c name_of_chroot (example schroot -c unstable-amd64-sbuild)
|
||||
> cat /etc/debian_chroot to check which debian branch we are into
|
||||
> apt-get install vim dialog
|
||||
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
|
||||
@@ -249,7 +249,7 @@ ou
|
||||
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-x.y.z]
|
||||
|
||||
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-3.5.x]
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommitted file
|
||||
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
|
||||
Note: Package is built into directory ../build-area
|
||||
Note: To compare 2 packages: debdiff package1.dsc package2.dsc
|
||||
@@ -345,7 +345,7 @@ To update dolibarr debian package when only files not into debian has changed:
|
||||
|
||||
* Checkout the branch you want to work on: master of debian/...
|
||||
* Manually, add patches into debian/patches and update the file debian/series, or do the 2 steps with "quilt import filepatch.patch"
|
||||
* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
|
||||
* You can test patching of series with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
|
||||
* Update the debian/changelog to add entry of change.
|
||||
|
||||
Once files has been prepared, it's time to test:
|
||||
@@ -357,7 +357,7 @@ ou
|
||||
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
|
||||
|
||||
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommitted file
|
||||
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
|
||||
Note: Package is built into directory ../build-area
|
||||
Note: To compare 2 packages: debdiff package1.dsc package2.dsc
|
||||
|
||||
@@ -64,7 +64,7 @@ License: GPL-3+
|
||||
Files: htdocs/includes/ckeditor/*
|
||||
Copyright: 2003-2012 CKSource - Frederico Knabben
|
||||
License: GPL-2+
|
||||
The ckeditor is tripple licensed under the GNU General Public License (GPL),
|
||||
The ckeditor is triple licensed under the GNU General Public License (GPL),
|
||||
GNU Lesser General Public License (LGPL), and Mozilla Public License (MPL).
|
||||
In Debian, it is distributed under the GNU General Public License (GPL).
|
||||
.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
export DH_VERBOSE=1
|
||||
export DH_OPTIONS=-v
|
||||
|
||||
#export DH_COMPAT=7 # This is the debhelper compatability version to use, now defined into compat file
|
||||
#export DH_COMPAT=7 # This is the debhelper compatibility version to use, now defined into compat file
|
||||
|
||||
|
||||
%:
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM mariadb:latest
|
||||
# Enable comented out UTF8 charset/collation options
|
||||
# Enable commented out UTF8 charset/collation options
|
||||
RUN sed '/utf8/ s/^#//' /etc/mysql/mariadb.cnf >/tmp/t && mv /tmp/t /etc/mysql/mariadb.cnf
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/perl
|
||||
#--------------------------------------------------------------------
|
||||
# Lance la generation de la doc dev doxygen
|
||||
# Start the generation of the development documentation with doxygen
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
# Detecte repertoire du script
|
||||
# Determine the patho of this script
|
||||
($DIR=$0) =~ s/([^\/\\]+)$//;
|
||||
$DIR||='.';
|
||||
$DIR =~ s/([^\/\\])[\\\/]+$/$1/;
|
||||
|
||||
@@ -283,10 +283,10 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
# For small to medium size projects (<1000 input files) the default value is
|
||||
# probably good enough. For larger projects a too small cache size can cause
|
||||
# doxygen to be busy swapping symbols to and from disk most of the time
|
||||
# causing a significant performance penality.
|
||||
# causing a significant performance penalty.
|
||||
# If the system has enough physical memory increasing the cache will improve the
|
||||
# performance by keeping more symbols in memory. Note that the value works on
|
||||
# a logarithmic scale so increasing the size by one will rougly double the
|
||||
# a logarithmic scale so increasing the size by one will roughly double the
|
||||
# memory usage. The cache size is given by this formula:
|
||||
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols
|
||||
|
||||
@@ -160,7 +160,7 @@ html {
|
||||
--toc-background: var(--side-nav-background);
|
||||
--toc-foreground: var(--side-nav-foreground);
|
||||
|
||||
/* height of an item in any tree / collapsable table */
|
||||
/* height of an item in any tree / collapsible table */
|
||||
--tree-item-height: 30px;
|
||||
|
||||
--memname-font-size: var(--code-font-size);
|
||||
|
||||
@@ -49,7 +49,7 @@ If you want to build/test package locally:
|
||||
Use URL pattern (stable):
|
||||
For stable: http://www.dolibarr.org/files/lastbuild/package_debian-ubuntu/dolibarr_x.z.*.tar.gz
|
||||
|
||||
- For Dev, you can also add link serie to GIT HEAD.
|
||||
- For Dev, you can also add link series to GIT HEAD.
|
||||
- For stable, you can init from command line
|
||||
cd bzr/dolibarr-stable
|
||||
bzr init
|
||||
|
||||
@@ -258,7 +258,7 @@ foreach my $target (keys %CHOOSEDTARGET) {
|
||||
if ($CHOOSEDTARGET{$target} < 0) {
|
||||
print "Package $target not built (bad requirement).\n";
|
||||
} else {
|
||||
print "Package $target built succeessfully in $DESTI\n";
|
||||
print "Package $target built successfully in $DESTI\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Prerequisites to build autoexe DoliWamp package from Linux (solution seems broke
|
||||
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
|
||||
> Add path to ISCC into PATH windows var:
|
||||
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
|
||||
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
|
||||
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommended),
|
||||
open file build/exe/doliwamp.iss and click on button "Compile".
|
||||
The .exe file will be build into directory build.
|
||||
|
||||
@@ -47,7 +47,7 @@ Prerequisites to build autoexe DoliWamp package from Windows:
|
||||
This files describe steps made by Dolibarr packaging team to make a
|
||||
beta version of Dolibarr, step by step.
|
||||
|
||||
- Check all files are commited.
|
||||
- Check all files are committed.
|
||||
- Update version/info in ChangeLog, for this you can:
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
@@ -72,7 +72,7 @@ Recopy the content of the output file into the file ChangeLog.
|
||||
This files describe steps made by Dolibarr packaging team to make a
|
||||
complete release of Dolibarr, step by step.
|
||||
|
||||
- Check all files are commited.
|
||||
- Check all files are committed.
|
||||
- Update version/info in ChangeLog, for this you can:
|
||||
To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
To generate a changelog of a major new version x.y.0 (from a repo pn branch x.y), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
|
||||
@@ -54,5 +54,5 @@ OBS:QualityCategory Stable|Testing|Development|Private
|
||||
For example: https://bugzilla.novell.com/show_bug.cgi?id=848083 to be a maintener of category
|
||||
https://build.opensuse.org/project/show/Application:ERP
|
||||
- Once done, go into project, category, subproject and enter a subproject for your application.
|
||||
Fo example: Dolibarr
|
||||
For example: Dolibarr
|
||||
- Then go onto project into your home and ask a publish to the category/you project your created.
|
||||
|
||||
@@ -4,6 +4,6 @@ Building a Patch file
|
||||
##################################################
|
||||
|
||||
This directory contains tools to build a patch after a developer has made changes on files in its Dolibarr tree.
|
||||
The output patch file can then be submited on Dolibarr dev mailing-list, with explanation on its goal, for inclusion in main branch.
|
||||
The output patch file can then be submitted on Dolibarr dev mailing-list, with explanation on its goal, for inclusion in main branch.
|
||||
|
||||
Using this tool is now deprecated. You must use git pull requests to submit contributions.
|
||||
|
||||
@@ -177,14 +177,14 @@ into
|
||||
|
||||
* Removed useless directories ("examples", "tools")
|
||||
|
||||
* Optionnaly, removed all fonts except
|
||||
dejavusans* (used by greek, arab, persan, romanian, turkish),
|
||||
* Optionally, removed all fonts except
|
||||
dejavusans* (used by greek, arab, person, romanian, turkish),
|
||||
freemono* (russian),
|
||||
cid*+msungstdlight+stsongstdlight+uni2cid* (chinese),
|
||||
helvetica* (all other languages),
|
||||
zapfdingbats.php (for special chars like form checkboxes)
|
||||
|
||||
* Optionnaly, made freemono the default monotype font if we removed courier
|
||||
* Optionally, made freemono the default monotype font if we removed courier
|
||||
In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
|
||||
- protected $default_monospaced_font = 'courier';
|
||||
+ protected $default_monospaced_font = 'freemono';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Example fo recurring event, 1 week, no end, exported by Google
|
||||
Example for recurring event, 1 week, no end, exported by Google
|
||||
|
||||
# The recurring event were recorded every monday the 20150518. This is the Recurrence-id, but then
|
||||
# first occurrence was moved on tuesday. So this record were added.
|
||||
@@ -38,7 +38,7 @@ END:VEVENT
|
||||
|
||||
|
||||
|
||||
Example fo recurring event, every 2 month, no end, exported by Google
|
||||
Example for recurring event, every 2 month, no end, exported by Google
|
||||
|
||||
BEGIN:VEVENT
|
||||
DTSTART;TZID=Europe/Paris:20150519T080000
|
||||
|
||||
@@ -48,7 +48,7 @@ require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php";
|
||||
|
||||
|
||||
/*
|
||||
* Parametre
|
||||
* Parameter
|
||||
*/
|
||||
|
||||
define('GEN_NUMBER_COMMANDE', $argv[1] ?? 10);
|
||||
|
||||
@@ -50,7 +50,7 @@ $listoflastname = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Doroth
|
||||
|
||||
|
||||
/*
|
||||
* Parametre
|
||||
* Parameter
|
||||
*/
|
||||
|
||||
define('GEN_NUMBER_SOCIETE', $argv[1] ?? 10);
|
||||
|
||||
@@ -153,7 +153,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
|
||||
}
|
||||
$object->cond_reglement_id = dol_getIdFromCode($db, $condpayment, 'c_payment_term', 'libelle_facture', 'rowid', 1);
|
||||
if (empty($object->cond_reglement_id)) {
|
||||
print " - Error cant find payment mode for ".$condpayment."\n";
|
||||
print " - Error can't find payment mode for ".$condpayment."\n";
|
||||
$errorrecord++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</Files>
|
||||
|
||||
|
||||
# Log directoves
|
||||
# Log directives
|
||||
ErrorLog /var/log/apache2/myvirtualalias_error_log
|
||||
TransferLog /var/log/apache2/myvirtualalias_access_log
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
AddEncoding gzip .jgz
|
||||
|
||||
|
||||
# Add cach performance directives
|
||||
# Add cache performance directives
|
||||
ExpiresActive On
|
||||
ExpiresByType image/x-icon A2592000
|
||||
ExpiresByType image/gif A2592000
|
||||
|
||||
@@ -1533,7 +1533,7 @@ session.cache_expire = 180
|
||||
; - User may send URL contains active session ID
|
||||
; to other person via. email/irc/etc.
|
||||
; - URL that contains active session ID may be stored
|
||||
; in publically accessible computer.
|
||||
; in publicly accessible computer.
|
||||
; - User may access your site with the same session ID
|
||||
; always using URL stored in browser's history or bookmarks.
|
||||
; http://php.net/session.use-trans-sid
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
</rule> -->
|
||||
|
||||
|
||||
<!-- Check assignement have the = align on each line. Have 20 chars padding maximum and always show as errors -->
|
||||
<!-- Check assignment have the = align on each line. Have 20 chars padding maximum and always show as errors -->
|
||||
<!-- Disabled: Report some false warning
|
||||
<rule ref="Generic.Formatting.MultipleStatementAlignment">
|
||||
<properties>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Examle of rule you can add to fail2ban to restrict bruteforce attacks.
|
||||
# Example of rule you can add to fail2ban to restrict bruteforce attacks.
|
||||
#
|
||||
|
||||
|
||||
|
||||
@@ -379,7 +379,7 @@ $html .= '</div>';
|
||||
$html .= '<div class="box inline-box back2">';
|
||||
$html .= 'COCOMO effort<br><span class="small">(Basic organic model)</span><br>';
|
||||
$html .= '<b>'.formatNumber($arraycocomo['proj']['people'] * $arraycocomo['proj']['effort'] + $arraycocomo['dep']['people'] * $arraycocomo['dep']['effort']);
|
||||
$html .= ' monthes people</b>';
|
||||
$html .= ' months people</b>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
@@ -432,7 +432,7 @@ if ($fh) {
|
||||
|
||||
print 'Generation of output file '.$outputfile.' done.'."\n";
|
||||
} else {
|
||||
print 'Failed to open '.$outputfile.' for ouput.'."\n";
|
||||
print 'Failed to open '.$outputfile.' for output.'."\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -441,7 +441,7 @@ if ($fh) {
|
||||
*
|
||||
* @param string|int $number Number to format
|
||||
* @param int $nbdec Number of decimal digits
|
||||
* @return string Formated string
|
||||
* @return string Formatted string
|
||||
*/
|
||||
function formatNumber($number, $nbdec = 0)
|
||||
{
|
||||
|
||||
@@ -159,7 +159,7 @@ foreach my $file (keys %filelist) {
|
||||
}
|
||||
if ($create_sql ne "") { # we are inside create table statement so lets process datatypes
|
||||
|
||||
if (/\);/i) { # end of create table squence
|
||||
if (/\);/i) { # end of create table sequence
|
||||
$create_sql =~ s/,$//g; # strip last , inside create table
|
||||
&output_create;
|
||||
&reset_vars();
|
||||
|
||||
@@ -95,7 +95,7 @@ function getfieldname($l)
|
||||
* formatsize
|
||||
*
|
||||
* @param string $s Size to format
|
||||
* @return string Formated size
|
||||
* @return string Formatted size
|
||||
*/
|
||||
function formatsize($s)
|
||||
{
|
||||
@@ -417,9 +417,9 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
|
||||
$before = str_replace("\"", "`", $before);
|
||||
|
||||
// in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string'), but could also be (number, E'string'); so we cant search for the previoous '
|
||||
// in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string'), but could also be (number, E'string'); so we can't search for the previous '
|
||||
// ugh i guess its possible these strings could exist IN the data as well, but the only way to solve that is to process these lines one character
|
||||
// at a time, and thats just stupid, so lets just hope this doesnt appear anywhere in the actual data
|
||||
// at a time, and that's just stupid, so lets just hope this doesn't appear anywhere in the actual data
|
||||
$after = str_replace(" (E'", " ('", $after);
|
||||
$after = str_replace(", E'", ", '", $after);
|
||||
|
||||
@@ -439,7 +439,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
|
||||
// in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string')
|
||||
// ugh i guess its possible these strings could exist IN the data as well, but the only way to solve that is to process these lines one character
|
||||
// at a time, and thats just stupid, so lets just hope this doesnt appear anywhere in the actual data
|
||||
// at a time, and that's just stupid, so lets just hope this doesn't appear anywhere in the actual data
|
||||
$after = str_replace(" (E'", " ('", $after);
|
||||
$after = str_replace(", E'", ", '", $after);
|
||||
|
||||
@@ -457,9 +457,9 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
|
||||
|
||||
// in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string')
|
||||
// ugh i guess its possible these strings could exist IN the data as well, but the only way to solve that is to process these lines one character
|
||||
// at a time, and thats just stupid, so lets just hope this doesnt appear anywhere in the actual data
|
||||
// at a time, and that's just stupid, so lets just hope this doesn't appear anywhere in the actual data
|
||||
|
||||
// after the first line, we only need to check for it in the middle, not at the beginning of an insert (becuase the beginning will be on the first line)
|
||||
// after the first line, we only need to check for it in the middle, not at the beginning of an insert (because the beginning will be on the first line)
|
||||
// $after=str_replace(" (E'","' ('",$after);
|
||||
$line = $lines[$linenumber];
|
||||
$line = str_replace("', E'", "', '", $line);
|
||||
|
||||
@@ -53,7 +53,7 @@ class autoTranslator
|
||||
public function __construct($_destlang, $_refLang, $_langDir, $_limittofile, $_apikey)
|
||||
{
|
||||
|
||||
// Set enviorment variables
|
||||
// Set environment variables
|
||||
$this->_destlang = $_destlang;
|
||||
$this->_refLang = $_refLang;
|
||||
$this->_langDir = $_langDir.self::DIR_SEPARATOR;
|
||||
@@ -206,7 +206,7 @@ class autoTranslator
|
||||
}
|
||||
|
||||
/**
|
||||
* Put in array _translatedFiles[$file], line of a new tranlated pair
|
||||
* Put in array _translatedFiles[$file], line of a new translated pair
|
||||
*
|
||||
* @param string $content Existing content of dest file
|
||||
* @param string $file Target file name translated (xxxx.lang)
|
||||
|
||||
@@ -219,7 +219,7 @@ foreach ($dups as $string => $pages) {
|
||||
|
||||
$s.=$file." ";
|
||||
|
||||
// Loop on each line keword was found into file.
|
||||
// Loop on each line keyword was found into file.
|
||||
$listoffilesforthisentry=array();
|
||||
foreach ($lines as $line => $translatedvalue) {
|
||||
if (!empty($listoffilesforthisentry[$file])) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
This directory contains several subdirectories with entries for informations on Dolibarr.<br>
|
||||
This directory contains several subdirectories with entries for information on Dolibarr.<br>
|
||||
But if you are looking for other resources (downloads, documentation, addons, ...), you can find this on Internet on web following sites:<br>
|
||||
|
||||
<br>
|
||||
|
||||
@@ -117,7 +117,7 @@ if ($result <= 0) {
|
||||
print "Export for bank account ".$acct->ref." (".$acct->label.").\n";
|
||||
}
|
||||
|
||||
// Creation de la classe d'export du model ExportXXX
|
||||
// Create the export class for the model ExportXXX
|
||||
$dir = DOL_DOCUMENT_ROOT."/core/modules/export/";
|
||||
$file = "export_".$model.".modules.php";
|
||||
$classname = "Export".$model;
|
||||
@@ -249,7 +249,7 @@ if ($resql) {
|
||||
|
||||
// Libelle
|
||||
$reg = array();
|
||||
preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parenthese on tente recherche de traduction
|
||||
preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parentheses on tente recherche de traduction
|
||||
if ($reg[1] && $langs->transnoentitiesnoconv($reg[1]) != $reg[1]) {
|
||||
$description = $langs->transnoentitiesnoconv($reg[1]);
|
||||
} else {
|
||||
|
||||
@@ -139,7 +139,7 @@ if ($resql) {
|
||||
$info = $contact->_load_ldap_info();
|
||||
$dn = $contact->_load_ldap_dn($info);
|
||||
|
||||
$result = $ldap->add($dn, $info, $user); // Wil fail if already exists
|
||||
$result = $ldap->add($dn, $info, $user); // Will fail if already exists
|
||||
$result = $ldap->update($dn, $info, $user, $olddn);
|
||||
if ($result > 0) {
|
||||
print " - ".$langs->trans("OK");
|
||||
|
||||
@@ -218,7 +218,7 @@ if (empty($option) && count($filter) <= 0) {
|
||||
rebuild_merge_pdf_usage();
|
||||
exit(-1);
|
||||
}
|
||||
// Check if there is no uncompatible choice
|
||||
// Check if there is no incompatible choice
|
||||
if (in_array('payments', $filter) && in_array('nopayment', $filter)) {
|
||||
rebuild_merge_pdf_usage();
|
||||
exit(-1);
|
||||
|
||||
@@ -148,7 +148,7 @@ if ($resql) {
|
||||
$info = $member->_load_ldap_info();
|
||||
$dn = $member->_load_ldap_dn($info);
|
||||
|
||||
$result = $ldap->add($dn, $info, $user); // Wil fail if already exists
|
||||
$result = $ldap->add($dn, $info, $user); // Will fail if already exists
|
||||
$result = $ldap->update($dn, $info, $user, $olddn);
|
||||
if ($result > 0) {
|
||||
print " - ".$langs->transnoentities("OK");
|
||||
|
||||
@@ -192,7 +192,7 @@ if ($result >= 0) {
|
||||
// We disable synchro Dolibarr-LDAP
|
||||
$conf->global->LDAP_MEMBER_ACTIVE = 0;
|
||||
|
||||
$ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_MEMBER_DN'), getDolGlobalString('LDAP_KEY_MEMBERS'), $required_fields, 'member'); // Fiter on 'member' filter param
|
||||
$ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_MEMBER_DN'), getDolGlobalString('LDAP_KEY_MEMBERS'), $required_fields, 'member'); // Filter on 'member' filter param
|
||||
if (is_array($ldaprecords)) {
|
||||
$db->begin();
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ if ($resql) {
|
||||
$info = $membertype->_load_ldap_info();
|
||||
$dn = $membertype->_load_ldap_dn($info);
|
||||
|
||||
$result = $ldap->add($dn, $info, $user); // Wil fail if already exists
|
||||
$result = $ldap->add($dn, $info, $user); // Will fail if already exists
|
||||
$result = $ldap->update($dn, $info, $user, $olddn);
|
||||
if ($result > 0) {
|
||||
print " - ".$langs->trans("OK");
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/**
|
||||
* \file scripts/user/sync_groups_dolibarr2ldap.php
|
||||
* \ingroup ldap core
|
||||
* \brief Script de mise a jour des groupes dans LDAP depuis base Dolibarr
|
||||
* \brief Script to update the groups in LDAP from the Dolibarr DB
|
||||
*/
|
||||
|
||||
if (!defined('NOSESSION')) {
|
||||
@@ -97,7 +97,7 @@ if ($resql) {
|
||||
$info = $fgroup->_load_ldap_info();
|
||||
$dn = $fgroup->_load_ldap_dn($info);
|
||||
|
||||
$result = $ldap->add($dn, $info, $user); // Wil fail if already exists
|
||||
$result = $ldap->add($dn, $info, $user); // Will fail if already exists
|
||||
$result = $ldap->update($dn, $info, $user, $olddn);
|
||||
if ($result > 0) {
|
||||
print " - ".$langs->trans("OK");
|
||||
|
||||
@@ -172,8 +172,8 @@ if ($result >= 0) {
|
||||
|
||||
// print_r($group);
|
||||
|
||||
// Gestion des utilisateurs associés au groupe
|
||||
// 1 - Association des utilisateurs du groupe LDAP au groupe Dolibarr
|
||||
// Management of the users associated with the group
|
||||
// 1 - Association of users in the LDAP group with the Dolibarr group
|
||||
$userList = array();
|
||||
$userIdList = array();
|
||||
foreach ($ldapgroup[getDolGlobalString('LDAP_GROUP_FIELD_GROUPMEMBERS')] as $tmpkey => $userdn) {
|
||||
@@ -184,7 +184,7 @@ if ($result >= 0) {
|
||||
// Schéma rfc2307: les membres sont listés dans l'attribut memberUid sous form de login uniquement
|
||||
if (getDolGlobalString('LDAP_GROUP_FIELD_GROUPMEMBERS') === 'memberUid') {
|
||||
$userKey = array($userdn);
|
||||
} else { // Pour les autres schémas, les membres sont listés sous forme de DN complets
|
||||
} else { // Pour les autres schémas, les membres sont listés sous forme de DN completes
|
||||
$userFilter = explode(',', $userdn);
|
||||
$userKey = $ldap->getAttributeValues('('.$userFilter[0].')', getDolGlobalString('LDAP_KEY_USERS'));
|
||||
}
|
||||
@@ -207,14 +207,14 @@ if ($result >= 0) {
|
||||
|
||||
$userIdList[$userdn] = $fuser->id;
|
||||
|
||||
// Ajout de l'utilisateur dans le groupe
|
||||
// Add the user in the group
|
||||
if (!in_array($fuser->id, array_keys($group->members))) {
|
||||
$fuser->SetInGroup($group->id, $group->entity);
|
||||
echo $fuser->login.' added'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// 2 - Suppression des utilisateurs du groupe Dolibarr qui ne sont plus dans le groupe LDAP
|
||||
// 2 - Delete users from the Dolibarr group that are no longer in the LDAP group
|
||||
foreach ($group->members as $guser) {
|
||||
if (!in_array($guser->id, $userIdList)) {
|
||||
$guser->RemoveFromGroup($group->id, $group->entity);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/**
|
||||
* \file scripts/user/sync_users_dolibarr2ldap.php
|
||||
* \ingroup ldap core
|
||||
* \brief Script de mise a jour des users dans LDAP depuis base Dolibarr
|
||||
* \brief Script to update users in LDAP from Dolibarr DB
|
||||
*/
|
||||
|
||||
if (!defined('NOSESSION')) {
|
||||
@@ -96,7 +96,7 @@ if ($resql) {
|
||||
$info = $fuser->_load_ldap_info();
|
||||
$dn = $fuser->_load_ldap_dn($info);
|
||||
|
||||
$result = $ldap->add($dn, $info, $user); // Wil fail if already exists
|
||||
$result = $ldap->add($dn, $info, $user); // Will fail if already exists
|
||||
$result = $ldap->update($dn, $info, $user, $olddn);
|
||||
if ($result > 0) {
|
||||
print " - ".$langs->trans("OK");
|
||||
|
||||
@@ -177,7 +177,7 @@ if ($result >= 0) {
|
||||
// We disable synchro Dolibarr-LDAP
|
||||
$conf->global->LDAP_SYNCHRO_ACTIVE = 0;
|
||||
|
||||
$ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_USER_DN'), getDolGlobalString('LDAP_KEY_USERS'), $required_fields, 'user'); // Fiter on 'user' filter param
|
||||
$ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_USER_DN'), getDolGlobalString('LDAP_KEY_USERS'), $required_fields, 'user'); // Filter on 'user' filter param
|
||||
if (is_array($ldaprecords)) {
|
||||
$db->begin();
|
||||
|
||||
@@ -264,8 +264,8 @@ if ($result >= 0) {
|
||||
print "\n";
|
||||
// print_r($fuser);
|
||||
|
||||
// Gestion des groupes
|
||||
// TODO : revoir la gestion des groupes (ou script de sync groupes)
|
||||
// Management of the groups
|
||||
// TODO : Review the group management (or script for syncing groups)
|
||||
/*
|
||||
* if(!$error) {
|
||||
* foreach ($ldapuser[getDolGlobalString('LDAP_FIELD_USERGROUPS') as $groupdn) {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/**
|
||||
* \file scripts/website/migrate_news_joomla2dolibarr.php
|
||||
* \ingroup scripts
|
||||
* \brief Migrate news from a Joomla databse into a Dolibarr website
|
||||
* \brief Migrate news from a Joomla database into a Dolibarr website
|
||||
*/
|
||||
|
||||
if (!defined('NOSESSION')) {
|
||||
@@ -54,7 +54,7 @@ if (empty($argv[3]) || !in_array($argv[1], array('test', 'confirm')) || empty($w
|
||||
print '***** '.$script_file.' *****'."\n";
|
||||
print "Usage: $script_file (test|confirm) website login:pass@serverjoomla/tableprefix/databasejoomla [nbmaxrecord]\n";
|
||||
print "\n";
|
||||
print "Load joomla news and create them into Dolibarr database (if they don't alreay exist).\n";
|
||||
print "Load joomla news and create them into Dolibarr database (if they don't already exist).\n";
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ SERVER = "localhostdolibarr" # Domain name of main server to test (www.mysite.co
|
||||
#PROXYSERVER = "http://my.proxy.server:port/" # If the web application to test is after a proxy
|
||||
|
||||
BOTNAME = "AWBot" # String value to force bot name used in the user agent string
|
||||
DELAY = 0 # Delay beetween each HTTP request (-1 wait a key, 0 no delay, n number of seconds)
|
||||
DELAY = 0 # Delay between each HTTP request (-1 wait a key, 0 no delay, n number of seconds)
|
||||
MAXSIZE = 0 # Maximum size of HTTP response (0 = no limit)
|
||||
TIMEOUT = 120 # Timeout (when waiting for a server response after sending a request)
|
||||
LANG = "en" # Choose output language
|
||||
|
||||
@@ -86,7 +86,7 @@ class AccountingAccountTest extends PHPUnit\Framework\TestCase
|
||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
||||
|
||||
if (!isModEnabled('accounting')) {
|
||||
print __METHOD__." module accouting must be enabled.\n";
|
||||
print __METHOD__." module accounting must be enabled.\n";
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
|
||||
// Must not found $this->db->
|
||||
$ok=true;
|
||||
$matches=array();
|
||||
// Check string $this->db-> into a non class.php file (it shoud be $db-> into such classes)
|
||||
// Check string $this->db-> into a non class.php file (it should be $db-> into such classes)
|
||||
preg_match_all('/'.preg_quote('$this->db->', '/').'/', $filecontent, $matches, PREG_SET_ORDER);
|
||||
foreach ($matches as $key => $val) {
|
||||
$ok=false;
|
||||
|
||||
@@ -455,7 +455,7 @@ class ExportTest extends PHPUnit\Framework\TestCase
|
||||
|
||||
$filterdatatoexport='';
|
||||
//$filterdatatoexport='';
|
||||
//$array_selected = array("s.rowid"=>1, "s.nom"=>2); // Mut be fields found into declaration of dataset
|
||||
//$array_selected = array("s.rowid"=>1, "s.nom"=>2); // Must be fields found into declaration of dataset
|
||||
|
||||
// Load properties of arrays to make export
|
||||
$objexport=new Export($db);
|
||||
|
||||
@@ -597,7 +597,7 @@ class FilesLibTest extends PHPUnit\Framework\TestCase
|
||||
dol_copy($file, $dirsrcpath.'/file.csv');
|
||||
$result=dol_move_dir($dirsrcpath, $dirdestpath, 1, 1, 1);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertTrue($result, 'move of directory with file whitout rename needed in directory');
|
||||
$this->assertTrue($result, 'move of directory with file without rename needed in directory');
|
||||
|
||||
// To test a move with a directory to rename in src directory
|
||||
dol_mkdir($dirsrcpath);
|
||||
@@ -613,6 +613,6 @@ class FilesLibTest extends PHPUnit\Framework\TestCase
|
||||
dol_mkdir($dirsrcpath.'/notorename');
|
||||
$result=dol_move_dir($dirsrcpath, $dirdestpath, 1, 1, 1);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertTrue($result, 'move of directory with directory whitout rename needed in directory');
|
||||
$this->assertTrue($result, 'move of directory with directory without rename needed in directory');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ class Functions2LibTest extends PHPUnit\Framework\TestCase
|
||||
*/
|
||||
public function testIsValidMailDomain()
|
||||
{
|
||||
$mail = 'bidon@unvalid.unvalid';
|
||||
$mail = 'bidon@invalid.invalid';
|
||||
$result = isValidMailDomain($mail);
|
||||
$this->assertEquals(0, $result, 'Email isValidMailDomain('.$mail.') should return 0 (not valid) but returned '.$result);
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase
|
||||
$localobject->initAsSpecimen();
|
||||
$localobject->fetch_thirdparty();
|
||||
|
||||
$localobject->date=dol_mktime(12, 0, 0, 1, 1, 1915); // we use year 1915 to be sure to not have existing invoice for this year (usefull only if numbering is {0000@1}
|
||||
$localobject->date=dol_mktime(12, 0, 0, 1, 1, 1915); // we use year 1915 to be sure to not have existing invoice for this year (useful only if numbering is {0000@1}
|
||||
$numbering=new mod_facture_mercure();
|
||||
$result=$numbering->getNextValue($mysoc, $localobject);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
@@ -181,7 +181,7 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase
|
||||
$this->assertEquals('1915-0001', $result, "Test to get last value with param 'last'");
|
||||
$result=$numbering->getNextValue($mysoc, $localobject2);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals('1916-0002', $result); // counter must be now 2 (not reseted)
|
||||
$this->assertEquals('1916-0002', $result); // counter must be now 2 (not reset)
|
||||
$result2=$localobject2->create($user, 1);
|
||||
print __METHOD__." result2=".$result."\n";
|
||||
$result3=$localobject2->validate($user, $result); // create invoice by forcing ref
|
||||
@@ -228,7 +228,7 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase
|
||||
$numbering=new mod_facture_mercure();
|
||||
$result=$numbering->getNextValue($mysoc, $localobject3);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals('1911-0001', $result, 'Test for {yyyy}-{0000@1} 3nd invoice, same day'); // counter must be now 1
|
||||
$this->assertEquals('1911-0001', $result, 'Test for {yyyy}-{0000@1} 3rd invoice, same day'); // counter must be now 1
|
||||
|
||||
// Same but we add month after year
|
||||
$conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@1}';
|
||||
@@ -259,7 +259,7 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase
|
||||
$result2=$localobject2->create($user, 1);
|
||||
$result3=$localobject2->validate($user, $result);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals('192101-0001', $result); // counter must be reseted to 1
|
||||
$this->assertEquals('192101-0001', $result); // counter must be reset to 1
|
||||
$result=$localobject2->is_erasable();
|
||||
print __METHOD__." is_erasable=".$result."\n";
|
||||
$this->assertGreaterThanOrEqual(1, $result); // Can be deleted
|
||||
@@ -293,7 +293,7 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase
|
||||
$result2=$localobject2->create($user, 1);
|
||||
$result3=$localobject2->validate($user, $result);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals('0125-0002', $result, 'Test for {mm}{yy}-{0000@1} 2st invoice'); // counter must be now 2
|
||||
$this->assertEquals('0125-0002', $result, 'Test for {mm}{yy}-{0000@1} 2nd invoice'); // counter must be now 2
|
||||
$result=$localobject2->is_erasable();
|
||||
print __METHOD__." is_erasable=".$result."\n";
|
||||
$this->assertGreaterThanOrEqual(1, $result); // Can be deleted
|
||||
@@ -681,7 +681,7 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase
|
||||
$localobject->initAsSpecimen();
|
||||
$localobject->fetch_thirdparty();
|
||||
|
||||
$localobject->date_creation = dol_mktime(12, 0, 0, 1, 1, 1980); // we use year 1915 to be sure to not have existing invoice for this year (usefull only if numbering is {0000@1}
|
||||
$localobject->date_creation = dol_mktime(12, 0, 0, 1, 1, 1980); // we use year 1915 to be sure to not have existing invoice for this year (useful only if numbering is {0000@1}
|
||||
$numbering=new mod_expedition_safor();
|
||||
$result=$numbering->getNextValue($mysoc, $localobject);
|
||||
|
||||
|
||||
@@ -170,12 +170,12 @@ class RepositoryTest extends PHPUnit\Framework\TestCase
|
||||
{
|
||||
global $conf,$user,$langs,$db;
|
||||
|
||||
// Scan dir to guarante we don't have library jquery twice
|
||||
// Scan dir to guarantee we don't have library jquery twice
|
||||
$foundfiles=dol_dir_list(DOL_DOCUMENT_ROOT.'/includes/', 'files', 1, '^jquery\.js', array('ckeditor'));
|
||||
print __METHOD__." count(founddirs)=".count($foundfiles)."\n";
|
||||
$this->assertEquals(1, count($foundfiles), 'We found jquery lib (jquery.js) twice');
|
||||
|
||||
// Scan dir to guarante we don't have library jquery twice
|
||||
// Scan dir to guarantee we don't have library jquery twice
|
||||
$foundfiles=dol_dir_list(DOL_DOCUMENT_ROOT.'/includes/', 'files', 1, '^jquery\.min\.js', array('ckeditor'));
|
||||
print __METHOD__." count(founddirs)=".count($foundfiles)."\n";
|
||||
$this->assertEquals(1, count($foundfiles), 'We found jquery lib (jquery.min.js) twice '.(empty($foundfiles[0]) ? '' : $foundfiles[0]['fullname']).' '.(empty($foundfiles[1]) ? '' : $foundfiles[1]['fullname']));
|
||||
|
||||
@@ -202,7 +202,7 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase
|
||||
*/
|
||||
public function testRestCreateUser()
|
||||
{
|
||||
// attemp to create without mandatory fields :
|
||||
// attempt to create without mandatory fields :
|
||||
$url = $this->api_url.'/users?api_key='.$this->api_key;
|
||||
$addheaders=array('Content-Type: application/json');
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
$this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject mmm');
|
||||
|
||||
|
||||
$test="Text with ' encoded with the numeric html entity converted into text entity ' (like when submited by CKEditor)";
|
||||
$test="Text with ' encoded with the numeric html entity converted into text entity ' (like when submitted by CKEditor)";
|
||||
$result=testSqlAndScriptInject($test, 0); // result must be 0
|
||||
$this->assertEquals(0, $result, 'Error on testSqlAndScriptInject mmm, result should be 0 and is not');
|
||||
|
||||
@@ -408,7 +408,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
$_POST["param12"]='<!DOCTYPE html><html>aaa</html>';
|
||||
$_POST["param13"]='n n > < " <a href=\"javascript:alert(document.domain)\">XSS</a>';
|
||||
$_POST["param13b"]='n n > < " <a href=\"javascript:alert(document.domain)\">XSS</a>';
|
||||
$_POST["param14"]="Text with ' encoded with the numeric html entity converted into text entity ' (like when submited by CKEditor)";
|
||||
$_POST["param14"]="Text with ' encoded with the numeric html entity converted into text entity ' (like when submitted by CKEditor)";
|
||||
$_POST["param15"]="<img onerror<=alert(document.domain)> src=>0xbeefed";
|
||||
//$_POST["param15b"]="<html><head><title>Example HTML</title></head><body><div><p>This is a paragraph.</div><ul><li>Item 1</li><li>Item 2</li></ol></body><html>";
|
||||
$_POST["param16"]='<a style="z-index: 1000">abc</a>';
|
||||
@@ -577,7 +577,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
|
||||
$result=GETPOST("param14", 'restricthtml');
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals("Text with ' encoded with the numeric html entity converted into text entity ' (like when submited by CKEditor)", $result, 'Test 14');
|
||||
$this->assertEquals("Text with ' encoded with the numeric html entity converted into text entity ' (like when submitted by CKEditor)", $result, 'Test 14');
|
||||
|
||||
$result=GETPOST("param15", 'restricthtml'); // param15 = <img onerror<=alert(document.domain)> src=>0xbeefed that is a dangerous string
|
||||
print __METHOD__." result=".$result."\n";
|
||||
@@ -588,7 +588,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
$this->assertEquals('<a href="(alert(document.cookie))">XSS</a>', $result, 'Test 19');
|
||||
|
||||
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML only to test disabling of bad atrributes
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML only to test disabling of bad attributes
|
||||
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1;
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 0;
|
||||
@@ -615,7 +615,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
//$this->assertEquals('"c:\this is a path~1\aaan 110;" abcdef', $result); // ... on other PHP and libxml versions, we got a HTML that has been cleaned
|
||||
|
||||
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY only to test disabling of bad atrributes
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY only to test disabling of bad attributes
|
||||
|
||||
if (extension_loaded('tidy') && class_exists("tidy")) {
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 0;
|
||||
@@ -639,7 +639,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
}
|
||||
|
||||
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML + MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY to test disabling of bad atrributes
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML + MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY to test disabling of bad attributes
|
||||
|
||||
if (extension_loaded('tidy') && class_exists("tidy")) {
|
||||
$conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1;
|
||||
@@ -663,7 +663,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
}
|
||||
|
||||
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES to test disabling of bad atrributes
|
||||
// Test with restricthtml + MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES to test disabling of bad attributes
|
||||
|
||||
unset($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML);
|
||||
unset($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY);
|
||||
@@ -814,23 +814,23 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
{
|
||||
$stringtotest = '<a href="javascript:aaa">bbbڴ';
|
||||
$decodedstring = dol_string_onlythesehtmltags($stringtotest, 1, 1, 1);
|
||||
$this->assertEquals('<a href="aaa">bbbڴ', $decodedstring, 'Function did not sanitize correclty with test 1');
|
||||
$this->assertEquals('<a href="aaa">bbbڴ', $decodedstring, 'Function did not sanitize correctly with test 1');
|
||||
|
||||
$stringtotest = '<a href="java'.chr(0).'script:aaa">bbbڴ';
|
||||
$decodedstring = dol_string_onlythesehtmltags($stringtotest, 1, 1, 1);
|
||||
$this->assertEquals('<a href="aaa">bbbڴ', $decodedstring, 'Function did not sanitize correclty with test 2');
|
||||
$this->assertEquals('<a href="aaa">bbbڴ', $decodedstring, 'Function did not sanitize correctly with test 2');
|
||||
|
||||
$stringtotest = '<a href="javascript:aaa">bbbڴ';
|
||||
$decodedstring = dol_string_onlythesehtmltags($stringtotest, 1, 1, 1);
|
||||
$this->assertEquals('<a href="aaa">bbbڴ', $decodedstring, 'Function did not sanitize correclty with test 3');
|
||||
$this->assertEquals('<a href="aaa">bbbڴ', $decodedstring, 'Function did not sanitize correctly with test 3');
|
||||
|
||||
$stringtotest = 'text <link href="aaa"> text';
|
||||
$decodedstring = dol_string_onlythesehtmltags($stringtotest, 1, 1, 1, 0, array(), 0);
|
||||
$this->assertEquals('text text', $decodedstring, 'Function did not sanitize correclty with test 4a');
|
||||
$this->assertEquals('text text', $decodedstring, 'Function did not sanitize correctly with test 4a');
|
||||
|
||||
$stringtotest = 'text <link href="aaa"> text';
|
||||
$decodedstring = dol_string_onlythesehtmltags($stringtotest, 1, 1, 1, 0, array(), 1);
|
||||
$this->assertEquals('text <link href="aaa"> text', $decodedstring, 'Function did not sanitize correclty with test 4b');
|
||||
$this->assertEquals('text <link href="aaa"> text', $decodedstring, 'Function did not sanitize correctly with test 4b');
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -844,12 +844,12 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
{
|
||||
$stringtotest = 'eée';
|
||||
$decodedstring = dol_string_onlythesehtmlattributes($stringtotest);
|
||||
$this->assertEquals('eée', $decodedstring, 'Function did not sanitize correclty with test 1');
|
||||
$this->assertEquals('eée', $decodedstring, 'Function did not sanitize correctly with test 1');
|
||||
|
||||
$stringtotest = '<div onload="ee"><a href="123"><span class="abc">abc</span></a></div>';
|
||||
$decodedstring = dol_string_onlythesehtmlattributes($stringtotest);
|
||||
$decodedstring = preg_replace("/\n$/", "", $decodedstring);
|
||||
$this->assertEquals('<div><a href="123"><span class="abc">abc</span></a></div>', $decodedstring, 'Function did not sanitize correclty with test 2');
|
||||
$this->assertEquals('<div><a href="123"><span class="abc">abc</span></a></div>', $decodedstring, 'Function did not sanitize correctly with test 2');
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1182,7 +1182,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
|
||||
|
||||
|
||||
// For a string that is already HTML (contains HTML tags) with special tags but badly formated
|
||||
// For a string that is already HTML (contains HTML tags) with special tags but badly formatted
|
||||
$stringtotest = "">";
|
||||
$stringfixed = "">";
|
||||
//$result = dol_htmlentitiesbr($stringtotest);
|
||||
@@ -1194,7 +1194,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
$this->assertEquals($stringfixed, $result, 'Error'); // Expected '' because should failed because login 'auto' does not exists
|
||||
|
||||
|
||||
// For a string that is already HTML (contains HTML tags) with special tags but badly formated
|
||||
// For a string that is already HTML (contains HTML tags) with special tags but badly formatted
|
||||
$stringtotest = "testA\n<h1>hhhh</h1><z>ddd</z><header>aaa</header><footer>bbb</footer>";
|
||||
if (getDolGlobalString("MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY")) {
|
||||
$stringfixed = "testA\n<h1>hhhh</h1>\nddd\n<header>aaa</header>\n<footer>bbb</footer>\n";
|
||||
@@ -1210,7 +1210,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
$this->assertEquals($stringfixed, $result, 'Error');
|
||||
|
||||
|
||||
// For a string that is already HTML (contains HTML tags) but badly formated
|
||||
// For a string that is already HTML (contains HTML tags) but badly formatted
|
||||
$stringtotest = "testB\n<h1>hhh</h1>\n<td>td alone</td><h1>iii</h1>";
|
||||
if (getDolGlobalString("MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY")) {
|
||||
$stringfixed = "testB\n<h1>hhh</h1>\n<h1>iii</h1>\n<table>\n<tr>\n<td>td alone</td>\n</tr>\n</table>\n";
|
||||
|
||||
@@ -187,7 +187,7 @@ class TakePosFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
} else {
|
||||
// Disable the module
|
||||
$this->byHref('modTakePos')->click();
|
||||
// Reenable the module
|
||||
// Re-enable the module
|
||||
$this->byHref('modTakePos')->click();
|
||||
}
|
||||
// Page reloaded, we need a new Xpath
|
||||
|
||||
@@ -27815,4 +27815,4 @@
|
||||
</order>
|
||||
</ns:updateOrder>
|
||||
</soapenv:Body>
|
||||
</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#updateOrder"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:properties/><con:wssContainer/></con:soapui-project>
|
||||
</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#updateOrder"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:properties/><con:wssContainer/></con:soapui-project>
|
||||
|
||||
Reference in New Issue
Block a user