[svn r21641] FS#2867 - The FCKEditor: Some minor corrections about using the already defined constant IS_WINDOWS_OS.

skala
Ivan Tcholakov 16 years ago
parent 9810154301
commit 84955ff93e
  1. 2
      main/inc/lib/fckeditor/editor/filemanager/connectors/php/phpcompat.php
  2. 13
      main/inc/lib/fckeditor/editor/filemanager/connectors/php/util.php
  3. 10
      main/inc/lib/fckeditor/fckeditor.php

@ -12,6 +12,6 @@ if ( !isset( $_FILES ) ) {
if ( !defined( 'DIRECTORY_SEPARATOR' ) ) {
define( 'DIRECTORY_SEPARATOR',
strtoupper(substr(PHP_OS, 0, 3) == 'WIN') ? '\\' : '/'
IS_WINDOWS_OS ? '\\' : '/'
) ;
}

@ -59,18 +59,9 @@ function FindBadUtf8( $string )
function ConvertToXmlAttribute( $value )
{
if ( defined( 'PHP_OS' ) )
if ( IS_WINDOWS_OS || FindBadUtf8( $value ) )
{
$os = PHP_OS ;
}
else
{
$os = php_uname() ;
}
if ( strtoupper( substr( $os, 0, 3 ) ) === 'WIN' || FindBadUtf8( $value ) )
{
return ( utf8_encode( htmlspecialchars( $value ) ) ) ;
return ( api_utf8_encode( htmlspecialchars( $value ) ) ) ;
}
else
{

@ -432,15 +432,7 @@ class FCKeditor
$server_base = explode('/', api_get_path(WEB_PATH));
$server_base_ip = $server_base[0].'/'.$server_base[1].'/127.0.0.1/'; // To avoid problems on Windows Vista.
$server_base = $server_base[0].'/'.$server_base[1].'/'.$server_base[2].'/';
if (defined('PHP_OS'))
{
$os = PHP_OS;
}
else
{
$os = php_uname();
}
if (strtoupper(substr($os, 0, 3 )) === 'WIN')
if (IS_WINDOWS_OS)
{
$this->Config['MimetexUrl'] = $server_base.'cgi-bin/mimetex.exe';
$check_mimetex_url = $server_base_ip.'cgi-bin/mimetex.exe';

Loading…
Cancel
Save