[svn r21055] FS#306 - A fix: Moving code that includes the multi-byte string library after the section that declares constants. For PHP 5.2.9-2 (tested on Windows Vista, IIS7, FastCGI) notices were produced. The contant LIBRARY_PATH has to be declared first.

skala
Ivan Tcholakov 16 years ago
parent 768ec4064c
commit 2f13dbf0a9
  1. 30
      main/inc/lib/main_api.lib.php

@ -31,21 +31,6 @@
===============================================================================
*/
/*
==============================================================================
MAIN API EXTENSIONS
==============================================================================
*/
// Including extensions to the main API works in two different ways:
if (api_get_path(LIBRARY_PATH) == '/lib/') {
// when we are running the installer script.
require_once 'multibyte_string_functions.lib.php';
} else {
// when the system has been already installed, this is the usual way.
require_once api_get_path(LIBRARY_PATH).'multibyte_string_functions.lib.php';
}
/**
==============================================================================
* This is a code library for Dokeos.
@ -181,6 +166,21 @@ define('DIR_HOTPOTATOES','/HotPotatoes_files');
// true whether the server runs on Windows OS, false otherwise.
define ('IS_WINDOWS_OS', api_is_windows_os());
/*
==============================================================================
MAIN API EXTENSIONS
==============================================================================
*/
// Including extensions to the main API works in two different ways:
if (api_get_path(LIBRARY_PATH) == '/lib/') {
// when we are running the installer script.
require_once 'multibyte_string_functions.lib.php';
} else {
// when the system has been already installed, this is the usual way.
require_once api_get_path(LIBRARY_PATH).'multibyte_string_functions.lib.php';
}
/*
==============================================================================
PROTECTION FUNCTIONS

Loading…
Cancel
Save