Browse Source

Feature #306 - Starting to exploit the powered function api_get_path(), for the online editor. The class Media (media.lib.php) becomes obsolete, it will be removed.

Ivan Tcholakov 15 years ago
parent
commit
c40ccb5ec2
3 changed files with 9 additions and 1 deletions
  1. 1 1
      main/inc/global.inc.php
  2. 6 0
      main/inc/lib/fckeditor/fckeditor.php
  3. 2 0
      main/inc/lib/media.lib.php

+ 1 - 1
main/inc/global.inc.php

@@ -190,7 +190,7 @@ require_once($lib_path.'display.lib.php');
 require_once($lib_path.'text.lib.php');
 require_once($lib_path.'security.lib.php');
 require_once($lib_path.'events.lib.inc.php');
-require_once($lib_path.'media.lib.php');
+//require_once($lib_path.'media.lib.php'); // TODO: Deprecated, to be removed. Ivan Tcholakov, 23-SEP-2003.
 
 // @todo: this shouldn't be done here. It should be stored correctly during installation
 if(empty($_configuration['statistics_database']) && $already_installed)

+ 6 - 0
main/inc/lib/fckeditor/fckeditor.php

@@ -584,10 +584,16 @@ class FCKeditor
 	 * @return array
 	 */
 	private function & get_media_configuration() {
+		/*
 		$config['FlashPlayerAudio'] = Media::get_path(FLASH_PLAYER_AUDIO, REL_PATH);
 		$config['FlashPlayerVideo'] = Media::get_path(FLASH_PLAYER_VIDEO, REL_PATH);
 		$config['ScriptSWFObject'] = Media::get_path(SCRIPT_SWFOBJECT, REL_PATH);
 		$config['ScriptASCIIMathML'] = Media::get_path(SCRIPT_ASCIIMATHML, REL_PATH);
+		*/
+		$config['FlashPlayerAudio'] = api_get_path(TO_REL, FLASH_PLAYER_AUDIO);
+		$config['FlashPlayerVideo'] = api_get_path(TO_REL, FLASH_PLAYER_VIDEO);
+		$config['ScriptSWFObject'] = api_get_path(TO_REL, SCRIPT_SWFOBJECT);
+		$config['ScriptASCIIMathML'] = api_get_path(TO_REL, SCRIPT_ASCIIMATHML);
 		return $config;
 	}
 

+ 2 - 0
main/inc/lib/media.lib.php

@@ -1,5 +1,7 @@
 <?php
 
+// TODO: This file is deprecated, it will be removed. Ivan Tcholakov, 23-SEP-2003.
+
 // These constants specify multi-media related resource files (scripts, players, etc.).
 define('FLASH_PLAYER_AUDIO', 'FLASH_PLAYER_AUDIO');
 define('FLASH_PLAYER_VIDEO', 'FLASH_PLAYER_VIDEO');