Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
Browse files Browse the repository at this point in the history
dev_fix5353

Conflicts:
	build/pad/DoliWamp.pml
	build/pad/Dolibarr.pml
	build/pad/pad_dolibarr.xml
	build/pad/pad_doliwamp.xml
  • Loading branch information
atm-florian committed Jul 7, 2016
2 parents 1d96f53 + 63ad970 commit 1bb2864
Show file tree
Hide file tree
Showing 72 changed files with 651 additions and 286 deletions.
2 changes: 1 addition & 1 deletion .tx/config
Expand Up @@ -170,7 +170,7 @@ source_file = htdocs/langs/en_US/interventions.lang
source_lang = en_US
type = MOZILLAPROPERTIES

[dolibarr.languages]
[dolibarr.languages-not-res]
file_filter = htdocs/langs/<lang>/languages.lang
source_file = htdocs/langs/en_US/languages.lang
source_lang = en_US
Expand Down
8 changes: 4 additions & 4 deletions build/exe/doliwamp/Languages/MyFrench.isl
Expand Up @@ -21,10 +21,10 @@ TechnicalParameters=Param
IfFirstInstall=S'il s'agit de la première installation, merci de spécifier ces quelques paramètres techniques. Si vous ne les comprennez pas, êtes non sûr, ou procédez à une mise à jour, laissez les champs avec les valeurs proposées par défaut.
; WARNING !!! STRINGS FOR THIS 4 STRINGS MUST BE LOWER THAN 60 CHARACTERS
SMTPServer=Serveur SMTP (le votre ou celui de votre FAI, première installation uniquement) :
ApachePort=Port Apache (première installation uniquement, le choix standard est 80) :
MySqlPort=Port Mysql (première installation uniquement, le choix standard est 3306) :
; WARNING !!! STRINGS FOR THIS 4 STRINGS MUST BE LOWER THAN 70 CHARACTERS
SMTPServer=Serveur SMTP (le votre ou de votre FAI, première installation uniquement):
ApachePort=Port Apache (première installation uniquement, le choix standard est 80):
MySqlPort=Port Mysql (première installation uniquement, le choix standard est 3306):
MySqlPassword=Mot de passe serveur+base MySql de root (première installation uniquement):
FailedToDeleteLock=Echec de la suppression du fichier %1/www/dolibarr/install.lock. Vous pouvez ignorer l'avertissement mais il est possible que vous deviez le supprimer manuellement plus tard. Dans ce cas, cela vous sera signalé. Cliquez sur OK pour continuer...
Expand Down
Binary file modified build/exe/doliwamp/doliwamp.bmp
Binary file not shown.
34 changes: 20 additions & 14 deletions build/exe/doliwamp/doliwamp.iss
Expand Up @@ -99,13 +99,13 @@ Source: "build\exe\doliwamp\builddemosslfiles.bat.install"; DestDir: "{app}\"; F
Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversion;
; PhpMyAdmin, Apache, Php, Mysql
; Put here path of Wampserver applications
; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45 or 5.1.36
; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45 or 5.1.36
; Value ???: apache 2.4.19, php 5.5.12, mysql 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe)
; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45
; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45
; Value ???: apache 2.4.19, php 5.5.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe)
Source: "C:\Program Files\Wamp\apps\phpmyadmin4.1.14\*.*"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange"
Source: "C:\Program Files\Wamp\bin\apache\apache2.4.9\*.*"; DestDir: "{app}\bin\apache\apache2.4.9"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
Source: "C:\Program Files\Wamp\bin\php\php5.5.12\*.*"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
Source: "C:\Program Files\Wamp\bin\mysql\mysql5.6.17\*.*"; DestDir: "{app}\bin\mysql\mysql5.6.17"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
; Mysql data files (does not overwrite if exists)
Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
; Dolibarr
Expand All @@ -119,7 +119,7 @@ Source: "build\exe\doliwamp\phpmyadmin.conf.install"; DestDir: "{app}\alias"; Fl
Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
Source: "build\exe\doliwamp\config.inc.php.install"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion;
Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.9\conf"; Flags: ignoreversion;
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.6.17"; Flags: ignoreversion;
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion;
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion;
Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion;
Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion;
Expand All @@ -146,6 +146,12 @@ Name: "{userdesktop}\Dolibarr Help center"; Filename: "{app}\rundolihelp.bat"; W
;Name: "{userstartup}\DoliWamp server"; Filename: "{app}\startdoliwamp.bat"; WorkingDir: "{app}"; Flags: runminimized; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico


[Registry]
; Add "run as admin" flag. Same than command line: reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "<Path to your exe>" /t REG_SZ /d RUNASADMIN
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue;
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue;


[Code]
//variables globales
Expand Down Expand Up @@ -198,7 +204,7 @@ begin
//version des applis, a modifier pour chaque version de WampServer 2
apacheVersion := '2.4.9';
phpVersion := '5.5.12' ;
mysqlVersion := '5.6.17';
mysqlVersion := '5.0.45';
phpmyadminVersion := '4.1.14';
smtpServer := 'localhost';
Expand Down Expand Up @@ -262,13 +268,15 @@ begin
if firstinstall
then
begin
// False means it's not a password edit
Page.Add(CustomMessage('SMTPServer'), False);
Page.Add(CustomMessage('ApachePort'), False);
Page.Add(CustomMessage('MySqlPort'), False);
Page.Add(CustomMessage('MySqlPassword'), False);
end
else
begin
// False means it's not a password edit
Page.Add(CustomMessage('SMTPServer'), False);
Page.Add(CustomMessage('ApachePort'), False);
Page.Add(CustomMessage('MySqlPort'), False);
Expand Down Expand Up @@ -308,8 +316,7 @@ function NextButtonClick(CurPageID: Integer): Boolean;
var myResult: Integer;
var res: Boolean;
var paramok: Boolean;
var datadirold: String;
var datadirnew: String;
var datadir: String;
var exedirold: String;
var exedirnew: String;
var themessage: String;
Expand All @@ -328,14 +335,13 @@ begin
winPath := ExpandConstant('{win}');
pathWithSlashes := path;
StringChange (pathWithSlashes, '\','/');
datadirold := pathWithSlashes+'/bin/mysql/mysql5.6.17/data';
datadirnew := pathWithSlashes+'/bin/mysql/data';
exedirold := pathWithSlashes+'/bin/mysql/mysql5.6.17';
exedirnew := pathWithSlashes+'/bin/mysql/mysql5.6.17';
datadir := pathWithSlashes+'/bin/mysql/data';
exedirold := pathWithSlashes+'/bin/mysql/mysql5.0.45';
exedirnew := pathWithSlashes+'/bin/mysql/mysql5.0.45';
//----------------------------------------------
// Test if VC11Redist has been installed
// Test if msvcr110 DLL has been installed
//----------------------------------------------
if not FileExists ('c:/windows/system32/msvcr110.dll') and not FileExists ('c:/windows/sysWOW64/msvcr110.dll') and not FileExists ('c:/winnt/system32/msvcr110.dll') and not FileExists ('c:/winnt/sysWOW64/msvcr110.dll') then
Expand Down Expand Up @@ -995,7 +1001,7 @@ Filename: "{app}\rundoliwamp.bat"; Description: {cm:LaunchNow}; Flags: shellexec

[UninstallDelete]
Type: files; Name: "{app}\*.*"
Type: files; Name: "{app}\bin\mysql\mysql5.6.17\*.*"
Type: files; Name: "{app}\bin\mysql\mysql5.0.45\*.*"
Type: filesandordirs; Name: "{app}\alias"
Type: filesandordirs; Name: "{app}\apps"
Type: filesandordirs; Name: "{app}\bin\apache"
Expand Down
Binary file modified build/exe/doliwamp/doliwampsmall.bmp
Binary file not shown.
4 changes: 2 additions & 2 deletions build/exe/doliwamp/install_services.bat.install
Expand Up @@ -16,9 +16,9 @@ REM reg add HKLM\SYSTEM\CurrentControlSet\Services\doliwampapache /V Start /t RE

REM Mysql 5.0-
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --install-manual doliwampmysqld
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --install doliwampmysqld
.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --install doliwampmysqld
REM Mysql 5.1+
.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --install doliwampmysqld
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --install doliwampmysqld

echo ---- End script >> doliwamp.log 2>>&1

Expand Down
2 changes: 1 addition & 1 deletion build/exe/doliwamp/my.ini.install
Expand Up @@ -196,7 +196,7 @@ port=WAMPMYSQLPORT


#Path to installation directory. All paths are usually resolved relative to this.
basedir=WAMPROOT/bin/mysql/mysql5.6.17
basedir=WAMPROOT/bin/mysql/mysqlWAMPMYSQLVERSION

#log file
log-error=WAMPROOT/logs/mysql.log
Expand Down
4 changes: 2 additions & 2 deletions build/exe/doliwamp/startdoliwamp_manual_donotuse.bat.install
Expand Up @@ -12,7 +12,7 @@ start WAMPROOT\bin\apache\apacheWAMPAPACHEVERSION\bin\httpd.exe -f conf\httpd.co
echo

echo Running Mysql as user process (this process does not return so we use "start")
REM start WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini --console
start WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini --console
start WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini --console
REM start WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --defaults-file=WAMPROOT\bin\mysql\mysqlWAMPMYSQLVERSION\my.ini --console

pause
4 changes: 2 additions & 2 deletions build/exe/doliwamp/uninstall_services.bat.install
Expand Up @@ -11,9 +11,9 @@ NET STOP doliwampapache

NET STOP doliwampmysqld
REM Mysql 5.0-
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --remove doliwampmysqld
.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld-nt.exe --remove doliwampmysqld
REM Mysql 5.1+
.\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --remove doliwampmysqld
REM .\bin\mysql\mysqlWAMPMYSQLVERSION\bin\mysqld.exe --remove doliwampmysqld

REM wampmanager.exe -quit -id={doliwampserver}
echo ---- End script >> doliwamp.log 2>>&1
Expand Down
4 changes: 3 additions & 1 deletion dev/codesniffer/ruleset.xml
Expand Up @@ -187,7 +187,9 @@
<severity>0</severity>
</rule>

<rule ref="PEAR.Commenting.ClassComment.MissingTag" />
<rule ref="PEAR.Commenting.ClassComment.MissingTag">
<severity>0</severity>
</rule>

<rule ref="PEAR.Commenting.ClassComment.MissingAuthorTag">
<severity>0</severity>
Expand Down
2 changes: 1 addition & 1 deletion dev/skeletons/modMyModule.class.php
Expand Up @@ -90,7 +90,7 @@ public function __construct($db)
// 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
// 'css' => array('/mymodule/css/mymodule.css.php'), // Set this to relative path of css file if module has its own css file
// 'js' => array('/mymodule/js/mymodule.js'), // Set this to relative path of js file if module must load a js on all pages
// 'hooks' => array('hookcontext1','hookcontext2') // Set here all hooks context managed by module
// 'hooks' => array('hookcontext1','hookcontext2',...) // Set here all hooks context managed by module. You can also set hook context 'all'
// 'dir' => array('output' => 'othermodulename'), // To force the default directories names
// 'workflow' => array('WORKFLOW_MODULE1_YOURACTIONTYPE_MODULE2'=>array('enabled'=>'! empty($conf->module1->enabled) && ! empty($conf->module2->enabled)', 'picto'=>'yourpicto@mymodule')) // Set here all workflow context managed by module
// );
Expand Down
9 changes: 5 additions & 4 deletions dev/skeletons/skeleton_class.class.php
Expand Up @@ -35,6 +35,7 @@
* Class Skeleton_Class
*
* Put here description of your class
*
* @see CommonObject
*/
class Skeleton_Class extends CommonObject
Expand Down Expand Up @@ -228,7 +229,7 @@ public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, arra
if (count($sqlwhere) > 0) {
$sql .= ' WHERE ' . implode(' '.$filtermode.' ', $sqlwhere);
}

if (!empty($sortfield)) {
$sql .= $this->db->order($sortfield,$sortorder);
}
Expand Down Expand Up @@ -463,7 +464,7 @@ function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss=
$result.= $link . $this->ref . $linkend;
return $result;
}

/**
* Retourne le libelle du status d'un user (actif, inactif)
*
Expand Down Expand Up @@ -518,8 +519,8 @@ function LibStatut($status,$mode=0)
if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
}
}


/**
* Initialise object with example values
* Id must be 0 if object instance is a specimen
Expand Down
4 changes: 3 additions & 1 deletion htdocs/accountancy/class/accountancyexport.class.php
Expand Up @@ -142,7 +142,7 @@ public function export(&$TData) {
case self::$EXPORT_TYPE_COGILOG :
$this->exportCogilog($TData);
break;
default :
default:
$this->errors[] = $langs->trans('accountancy_error_modelnotfound');
break;
}
Expand All @@ -156,6 +156,8 @@ public function export(&$TData) {
* @return void
*/
public function exportNormal($objectLines) {
global $conf;

foreach ( $objectLines as $line ) {
// Std export
$date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
Expand Down
5 changes: 3 additions & 2 deletions htdocs/adherents/class/cotisation.class.php
Expand Up @@ -190,11 +190,12 @@ function update($user,$notrigger=0)
*/
function delete($user)
{
$accountline=new AccountLine($this->db);

// It subscription is linked to a bank transaction, we get it
if ($this->fk_bank)
if ($this->fk_bank > 0)
{
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$accountline=new AccountLine($this->db);
$result=$accountline->fetch($this->fk_bank);
}

Expand Down
28 changes: 14 additions & 14 deletions htdocs/categories/class/categorie.class.php
Expand Up @@ -1008,13 +1008,13 @@ function build_path_from_id_categ($id_categ,$protection=1000)
}

/**
* Affiche contenu de $this->cats
* Display content of $this->cats
*
* @return void
*/
function debug_cats()
{
// Affiche $this->cats
// Display $this->cats
foreach($this->cats as $key => $val)
{
print 'id: '.$this->cats[$key]['id'];
Expand All @@ -1029,11 +1029,11 @@ function debug_cats()


/**
* Retourne toutes les categories
* Returns all categories
*
* @param int $type Type of category
* @param boolean $parent Just parent categories if true
* @return array Tableau d'objet Categorie
* @return array Table of Object Category
*/
function get_all_categories($type=null, $parent=false)
{
Expand Down Expand Up @@ -1064,9 +1064,9 @@ function get_all_categories($type=null, $parent=false)
}

/**
* Retourne le nombre total de categories
* Returns total number of categories
*
* @return int Nombre de categories
* @return int Number of categories
* @deprecated function not used ?
*/
function get_nb_categories()
Expand Down Expand Up @@ -1133,7 +1133,7 @@ function already_exists()
}

/**
* Retourne les categories de premier niveau (qui ne sont pas filles)
* Returns the top level categories (which are not girls)
*
* @param int $type Type of category
* @return array
Expand All @@ -1144,8 +1144,8 @@ function get_main_categories($type=null)
}

/**
* Retourne les chemin de la categorie, avec les noms des categories
* separes par $sep (" >> " par defaut)
* Returns the path of the category, with the names of the categories
* separated by $sep (" >> " by default)
*
* @param string $sep Separator
* @param string $url Url
Expand Down Expand Up @@ -1205,7 +1205,7 @@ function print_all_ways($sep = " &gt;&gt; ", $url='', $nocolor=0)


/**
* Retourne un tableau contenant la liste des categories meres
* Returns an array containing the list of parent categories
*
* @return int|array <0 KO, array OK
*/
Expand Down Expand Up @@ -1239,8 +1239,8 @@ function get_meres()
}

/**
* Retourne dans un tableau tous les chemins possibles pour arriver a la categorie
* en partant des categories principales, representes par des tableaux de categories
* Returns in a table all possible paths to get to the category
* starting with the major categories represented by Tables of categories
*
* @return array
*/
Expand Down Expand Up @@ -1324,8 +1324,8 @@ function containing($id, $type, $mode='object')


/**
* Retourne les categories dont l'id ou le nom correspond
* ajoute des wildcards au nom sauf si $exact = true
* Returns categories whose id or name match
* add wildcards in the name unless $exact = true
*
* @param int $id Id
* @param string $nom Name
Expand Down

0 comments on commit 1bb2864

Please sign in to comment.