Fixed bug #10953: Validation issue: <a> attribute "href" lacks value in shortcut...
authorPatrick Broens <patrick@netcreators.com>
Thu, 23 Apr 2009 12:00:09 +0000 (12:00 +0000)
committerPatrick Broens <patrick@netcreators.com>
Thu, 23 Apr 2009 12:00:09 +0000 (12:00 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5347 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/classes/class.shortcutmenu.php

index 5dabad8..cf3476b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2009-04-24  Patrick Broens  <patrick@patrickbroens.nl>
 
        * Fixed bug #10952: Iframe produced by typo3/backend.php has proprietary attribute "noresize"
+       * Fixed bug #10953: Validation issue: <a> attribute "href" lacks value in shortcut menu
 
 2009-04-23  Steffen Kamper  <info@sk-typo3.de>
 
index 247a150..b6b0031 100644 (file)
@@ -148,7 +148,7 @@ class ShortcutMenu implements backend_toolbarItem {
                        <tr id="shortcut-'.$shortcut['raw']['uid'].'" class="shortcut">
                                <td class="shortcut-icon">'.$shortcut['icon'].'</td>
                                <td class="shortcut-label">
-                                       <a id="shortcut-label-'.$shortcut['raw']['uid'].'" href="" onclick="'.$shortcut['action'].'">'.$shortcut['label'].'</a>
+                                       <a id="shortcut-label-'.$shortcut['raw']['uid'].'" href="#" onclick="'.$shortcut['action'].'; return false;">'.$shortcut['label'].'</a>
                                </td>
                                <td class="shortcut-edit">'.$editIcon.' id="shortcut-edit-'.$shortcut['raw']['uid'].'" /></td>
                                <td class="shortcut-delete">'.$deleteIcon.'</td>
@@ -181,7 +181,7 @@ class ShortcutMenu implements backend_toolbarItem {
                                        <tr id="shortcut-'.$shortcut['raw']['uid'].'" class="shortcut'.$firstRow.'">
                                                <td class="shortcut-icon">'.$shortcut['icon'].'</td>
                                                <td class="shortcut-label">
-                                                       <a id="shortcut-label-'.$shortcut['raw']['uid'].'" href="" onclick="'.$shortcut['action'].'">'.$shortcut['label'].'</a>
+                                                       <a id="shortcut-label-'.$shortcut['raw']['uid'].'" href="#" onclick="'.$shortcut['action'].'; return false;">'.$shortcut['label'].'</a>
                                                </td>
                                                <td class="shortcut-edit">'.$editIcon.' id="shortcut-edit-'.$shortcut['raw']['uid'].'" /></td>
                                                <td class="shortcut-delete">'.$deleteIcon.'</td>
@@ -518,10 +518,10 @@ class ShortcutMenu implements backend_toolbarItem {
                } else {
                        $shortcut['type'] = 'other';
                }
-               
+
                        // Lookup the title of this page and use it as default description
                $pageId = $shortcut['recordid'] ? $shortcut['recordid'] : $this->getLinkedPageId($url);
-               
+
                if(t3lib_div::testInt($pageId)) {
                        $page = t3lib_BEfunc::getRecord('pages', $pageId);
                        if(count($page)) {
@@ -532,16 +532,16 @@ class ShortcutMenu implements backend_toolbarItem {
                                        $shortcutName = $shortcutNamePrepend.' '.$LANG->sL($TCA[$shortcut['table']]['ctrl']['title']).' ('.$page['title'].')';
                                }
                        }
-               } else { 
-                       $dirName = urldecode($pageId);         
+               } else {
+                       $dirName = urldecode($pageId);
                        if (preg_match('/\/$/', $dirName))      {
                                        // if $pageId is a string and ends with a slash,
                                        // assume it is a fileadmin reference and set
                                        // the description to the basename of that path
-                               $shortcutName .= ' ' . basename($dirName);   
+                               $shortcutName .= ' ' . basename($dirName);
                        }
                }
-               
+
                        // adding the shortcut
                if($module && $url) {
                        $fieldValues = array(