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

This commit is contained in:
Laurent Destailleur 2012-12-21 14:26:26 +01:00
commit a3f679183f
7 changed files with 116 additions and 73 deletions

View File

@ -25,6 +25,13 @@ function CombinePaths( $sBasePath, $sFolder )
{ {
return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/'); return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/');
} }
/**
* GetResourceTypePath
*
* @param string $resourceType Resource type
* @param string $sCommand Command
* @return string Config
*/
function GetResourceTypePath($resourceType, $sCommand) function GetResourceTypePath($resourceType, $sCommand)
{ {
global $Config ; global $Config ;
@ -35,6 +42,13 @@ function GetResourceTypePath( $resourceType, $sCommand )
return $Config['FileTypesPath'][$resourceType] ; return $Config['FileTypesPath'][$resourceType] ;
} }
/**
* GetResourceTypeDirectory
*
* @param unknown_type $resourceType Resource type
* @param unknown_type $sCommand Command
* @return string
*/
function GetResourceTypeDirectory($resourceType, $sCommand) function GetResourceTypeDirectory($resourceType, $sCommand)
{ {
global $Config ; global $Config ;
@ -61,11 +75,24 @@ function GetUrlFromPath( $resourceType, $folderPath, $sCommand )
return CombinePaths(GetResourceTypePath($resourceType, $sCommand), $folderPath); return CombinePaths(GetResourceTypePath($resourceType, $sCommand), $folderPath);
} }
/**
* RemoveExtension
*
* @param string $fileName Filename
* @return string String without extension
*/
function RemoveExtension($fileName) function RemoveExtension($fileName)
{ {
return substr($fileName, 0, strrpos($fileName, '.')); return substr($fileName, 0, strrpos($fileName, '.'));
} }
/**
* ServerMapFolder
*
* @param string $resourceType Resource type
* @param string $folderPath Folder
* @param string $sCommand Command
* @return void
*/
function ServerMapFolder($resourceType, $folderPath, $sCommand) function ServerMapFolder($resourceType, $folderPath, $sCommand)
{ {
// Get the resource type directory. // Get the resource type directory.
@ -85,7 +112,13 @@ function GetParentFolder( $folderPath )
$sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ; $sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ;
return preg_replace($sPattern, '', $folderPath); return preg_replace($sPattern, '', $folderPath);
} }
/**
* CreateServerFolder
*
* @param string $folderPath Folder
* @param string $lastFolder Folder
* @return string ''=success, error message otherwise
*/
function CreateServerFolder($folderPath, $lastFolder = null) function CreateServerFolder($folderPath, $lastFolder = null)
{ {
global $Config ; global $Config ;
@ -213,6 +246,12 @@ function IsAllowedType( $resourceType )
return true ; return true ;
} }
/**
* IsAllowedCommand
*
* @param string $sCommand Command
* @return boolean True or false
*/
function IsAllowedCommand($sCommand) function IsAllowedCommand($sCommand)
{ {
global $Config ; global $Config ;
@ -223,6 +262,11 @@ function IsAllowedCommand( $sCommand )
return true ; return true ;
} }
/**
* GetCurrentFolder
*
* @return string current folder
*/
function GetCurrentFolder() function GetCurrentFolder()
{ {
if (!isset($_GET)) { if (!isset($_GET)) {
@ -310,8 +354,7 @@ function SendCKEditorResults ($callback, $sFileUrl, $customMsg = '')
$rpl = array( '\\' => '\\\\', '"' => '\\"' ); $rpl = array( '\\' => '\\\\', '"' => '\\"' );
echo 'window.parent.CKEDITOR.tools.callFunction("'. $callback. '","'. echo 'window.parent.CKEDITOR.tools.callFunction("'. $callback. '","'. strtr($sFileUrl, $rpl). '", "'. strtr($customMsg, $rpl). '");' ;
strtr($sFileUrl, $rpl). '", "'. strtr($customMsg, $rpl). '");' ;
echo '</script>'; echo '</script>';
} }

View File

@ -19,7 +19,7 @@
/** /**
* File that defines the balance of paid holiday of users. * File that defines the balance of paid holiday of users.
* *
* \file define_holiday.php * \file htdocs/holiday/define_holiday.php
* \ingroup holiday * \ingroup holiday
* \brief File that defines the balance of paid holiday of users. * \brief File that defines the balance of paid holiday of users.
*/ */

View File

@ -18,7 +18,7 @@
*/ */
/** /**
* \file fiche.php * \file htdocs/holiday/fiche.php
* \ingroup holiday * \ingroup holiday
* \brief Form and file creation of paid holiday. * \brief Form and file creation of paid holiday.
*/ */

View File

@ -18,7 +18,7 @@
*/ */
/** /**
* \file index.php * \file htdocs/holiday/index.php
* \ingroup holiday * \ingroup holiday
* \brief List of holiday. * \brief List of holiday.
*/ */

View File

@ -17,7 +17,7 @@
*/ */
/** /**
* \file month_report.php * \file htdocs/holiday/month_report.php
* \ingroup holiday * \ingroup holiday
* \brief Monthly report of paid holiday. * \brief Monthly report of paid holiday.
*/ */

View File

@ -19,7 +19,7 @@
/** /**
* Displays the log of actions performed in the module. * Displays the log of actions performed in the module.
* *
* \file view_log.php * \file htdocs/holiday/view_log.php
* \ingroup holiday * \ingroup holiday
*/ */

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2012 Nicolas Péré <nicolas@amarok2.net> /* Copyright (C) 2012 Nicolas Péré <nicolas@amarok2.net>
* Copyright (C) 2012 Xavier Peyronnet <xavier.peyronnet@free.fr> * Copyright (C) 2012 Xavier Peyronnet <xavier.peyronnet@free.fr>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* Version 0.6 (2012-10-30) * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -652,7 +652,7 @@ div.ficheaddleft {
/* boutons : */ /* boutons : */
.button, .butAction {background: #999;border: solid 1px #666;} .button, .butAction {background: #999;border: solid 1px #666;}
.butActionRefused {background: #ccc;} .butActionRefused {background: #eaeaea; color:rgba(0,0,0,0.6)}
.butActionDelete {background: #b33c37;border:solid 1px #8d2f2b;} .butActionDelete {background: #b33c37;border:solid 1px #8d2f2b;}
.button, .butAction, .butActionRefused, .butActionDelete { .button, .butAction, .butActionRefused, .butActionDelete {
@ -688,7 +688,7 @@ border-left: solid 1px rgba(0,0,0,.3);
td.formdocbutton {padding-top:6px;} td.formdocbutton {padding-top:6px;}
.button:hover, .butAction:hover, .butActionRefused:hover, .butActionDelete:hover { .button:hover, .butAction:hover, .butActionDelete:hover {
background-image: linear-gradient(top, rgba(255,255,255,.3) 100%, rgba(0,0,0,.3) 0%); background-image: linear-gradient(top, rgba(255,255,255,.3) 100%, rgba(0,0,0,.3) 0%);
background-image: -o-linear-gradient(top, rgba(255,255,255,.3) 100%, rgba(0,0,0,.3) 0%); background-image: -o-linear-gradient(top, rgba(255,255,255,.3) 100%, rgba(0,0,0,.3) 0%);
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3) 100%, rgba(0,0,0,.3) 0%); background-image: -moz-linear-gradient(top, rgba(255,255,255,.3) 100%, rgba(0,0,0,.3) 0%);