* Fixed bug #8254: htmlArea RTE sets invalid link to file selected using DAM media...
authorStanislas Rolland <typo3@sjbr.ca>
Sat, 26 Apr 2008 19:02:48 +0000 (19:02 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Sat, 26 Apr 2008 19:02:48 +0000 (19:02 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3635 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_dam_browse_links.php

index 9ca5ba5..d42950a 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-26  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Fixed bug #8254: htmlArea RTE sets invalid link to file selected using DAM media browser. Thanks to Xavier Perseguers.
+
 2008-04-26  Ingo Renner  <ingo@typo3.org>
 
        * Removed redundant files from t3editor
index 2dcc40e..5a35657 100644 (file)
@@ -1,3 +1,7 @@
+2008-04-26  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Fixed bug #8254: htmlArea RTE sets invalid link to file selected using DAM media browser. Thanks to Xavier Perseguers.
+
 2008-04-09  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug 8066: Incorrect height of htmlArea RTE dropdown selectors in some browsers
index 2285858..c8dd790 100644 (file)
@@ -3,7 +3,7 @@
 *  Copyright notice
 *
 *  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
-*  (c) 2005-2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+*  (c) 2005-2008 Stanislas Rolland <typo3(arobas)sjbr.ca>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -35,7 +35,7 @@
  * TYPO3 SVN ID: $Id$
  *
  * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
- * @author     Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
+ * @author     Stanislas Rolland <typo3(arobas)sjbr.ca>
  */
 
 require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
@@ -412,24 +412,8 @@ class tx_rtehtmlarea_dam_browse_links extends tx_dam_browse_media {
                                        return false;
                                }
                        }
-                       function insertElement(table, uid, type, filename,fp,filetype,imagefile,action, close)  {       //
-                               if (1=='.($pArr[0]&&!$pArr[1]&&!$pArr[2] ? 1 : 0).')    {
-                                       addElement(filename,table+"_"+uid,fp,close);
-                               } else {
-                                       if (setReferences())    {
-                                               parent.window.opener.group_change("add","'.$pArr[0].'","'.$pArr[1].'","'.$pArr[2].'",elRef,targetDoc);
-                                       } else {
-                                               alert("Error - reference to main window is not set properly!");
-                                       }
-                                       if (close)      {
-                                               parent.window.opener.focus();
-                                               parent.close();
-                                       }
-                               }
-                               return false;
-                       }
-                       function insertElement(table, uid, type, filename,fp,filetype,imagefile,action, close)  {       //
-                               link_folder(filename);
+                       function insertElement(table, uid, type, filename, fp, filetype, imagefile, action, close)      {       //
+                               link_folder(fp.substring('.strlen(PATH_site).'));
                                return false;
                        }
                        function addElement(elName,elValue,altElValue,close)    {       //