Fix: Checkstyle
This commit is contained in:
parent
5dfefa1313
commit
8f2baf08ac
@ -25,6 +25,12 @@ function CombinePaths( $sBasePath, $sFolder )
|
|||||||
{
|
{
|
||||||
return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/');
|
return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/');
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* GetResourceTypePath
|
||||||
|
*
|
||||||
|
* @param unknown_type $resourceType
|
||||||
|
* @param unknown_type $sCommand
|
||||||
|
*/
|
||||||
function GetResourceTypePath($resourceType, $sCommand)
|
function GetResourceTypePath($resourceType, $sCommand)
|
||||||
{
|
{
|
||||||
global $Config ;
|
global $Config ;
|
||||||
@ -35,6 +41,13 @@ function GetResourceTypePath( $resourceType, $sCommand )
|
|||||||
return $Config['FileTypesPath'][$resourceType] ;
|
return $Config['FileTypesPath'][$resourceType] ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GetResourceTypeDirectory
|
||||||
|
*
|
||||||
|
* @param unknown_type $resourceType
|
||||||
|
* @param unknown_type $sCommand
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
function GetResourceTypeDirectory($resourceType, $sCommand)
|
function GetResourceTypeDirectory($resourceType, $sCommand)
|
||||||
{
|
{
|
||||||
global $Config ;
|
global $Config ;
|
||||||
@ -61,11 +74,22 @@ function GetUrlFromPath( $resourceType, $folderPath, $sCommand )
|
|||||||
return CombinePaths(GetResourceTypePath($resourceType, $sCommand), $folderPath);
|
return CombinePaths(GetResourceTypePath($resourceType, $sCommand), $folderPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RemoveExtension
|
||||||
|
*
|
||||||
|
* @param unknown_type $fileName
|
||||||
|
*/
|
||||||
function RemoveExtension($fileName)
|
function RemoveExtension($fileName)
|
||||||
{
|
{
|
||||||
return substr($fileName, 0, strrpos($fileName, '.'));
|
return substr($fileName, 0, strrpos($fileName, '.'));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* ServerMapFolder
|
||||||
|
*
|
||||||
|
* @param unknown_type $resourceType
|
||||||
|
* @param unknown_type $folderPath
|
||||||
|
* @param unknown_type $sCommand
|
||||||
|
*/
|
||||||
function ServerMapFolder($resourceType, $folderPath, $sCommand)
|
function ServerMapFolder($resourceType, $folderPath, $sCommand)
|
||||||
{
|
{
|
||||||
// Get the resource type directory.
|
// Get the resource type directory.
|
||||||
@ -85,7 +109,12 @@ function GetParentFolder( $folderPath )
|
|||||||
$sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ;
|
$sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ;
|
||||||
return preg_replace($sPattern, '', $folderPath);
|
return preg_replace($sPattern, '', $folderPath);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* CreateServerFolder
|
||||||
|
*
|
||||||
|
* @param unknown_type $folderPath
|
||||||
|
* @param unknown_type $lastFolder
|
||||||
|
*/
|
||||||
function CreateServerFolder($folderPath, $lastFolder = null)
|
function CreateServerFolder($folderPath, $lastFolder = null)
|
||||||
{
|
{
|
||||||
global $Config ;
|
global $Config ;
|
||||||
@ -213,6 +242,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 +258,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 +350,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>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user