Fixed SQL statement (missing quotes) reported by Martin Erichsen.
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_clipboard.php
index c30f3d2..b76c5ae 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
+*  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
  *  247:     function cleanUpCBC($CBarr,$table,$removeDeselected=0)    
  *  265:     function isElements()     
  *  274:     function printClipboard() 
- *  352:     function printContentFromTab($pad)        
- *  423:     function padTitleWrap($str,$pad)  
- *  440:     function linkItemText($str,$rec,$table='')        
- *  465:     function isSelected($table,$uid)  
- *  479:     function getSelectedRecord($table='',$uid='')     
- *  502:     function selUrlDB($table,$uid,$copy=0,$deselect=0,$baseArray=array())     
- *  518:     function selUrlFile($path,$copy=0,$deselect=0,$baseArray=array()) 
- *  535:     function pasteUrl($table,$uid,$setRedirect=1)     
- *  552:     function deleteUrl($setRedirect=1,$file=0)        
- *  569:     function editUrl()        
- *  590:     function removeUrl($table,$uid)   
- *  600:     function cleanCurrent()   
- *  627:     function elFromTable($matchTable='',$pad='')      
- *  659:     function confirmMsg($table,$rec,$type,$clElements)        
- *  702:     function removeElement($el)       
- *  714:     function saveClipboard()  
- *  724:     function currentMode()    
- *  735:     function clLabel($key,$Akey='labels')     
+ *  363:     function printContentFromTab($pad)        
+ *  437:     function padTitleWrap($str,$pad)  
+ *  454:     function linkItemText($str,$rec,$table='')        
+ *  479:     function isSelected($table,$uid)  
+ *  493:     function getSelectedRecord($table='',$uid='')     
+ *  516:     function selUrlDB($table,$uid,$copy=0,$deselect=0,$baseArray=array())     
+ *  532:     function selUrlFile($path,$copy=0,$deselect=0,$baseArray=array()) 
+ *  549:     function pasteUrl($table,$uid,$setRedirect=1)     
+ *  566:     function deleteUrl($setRedirect=1,$file=0)        
+ *  583:     function editUrl()        
+ *  604:     function removeUrl($table,$uid)   
+ *  614:     function cleanCurrent()   
+ *  641:     function elFromTable($matchTable='',$pad='')      
+ *  673:     function confirmMsg($table,$rec,$type,$clElements)        
+ *  716:     function removeElement($el)       
+ *  728:     function saveClipboard()  
+ *  738:     function currentMode()    
+ *  749:     function clLabel($key,$Akey='labels')     
  *
  *              SECTION: FOR USE IN tce_db.php:
- *  776:     function makePasteCmdArray($ref,$CMD)     
- *  805:     function makeDeleteCmdArray($CMD) 
+ *  790:     function makePasteCmdArray($ref,$CMD)     
+ *  819:     function makeDeleteCmdArray($CMD) 
  *
  *              SECTION: FOR USE IN tce_file.php:
- *  848:     function makePasteCmdArray_file($ref,$FILE)       
- *  870:     function makeDeleteCmdArray_file($FILE)   
+ *  862:     function makePasteCmdArray_file($ref,$FILE)       
+ *  884:     function makeDeleteCmdArray_file($FILE)   
  *
  * TOTAL FUNCTIONS: 30
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -166,7 +166,7 @@ class t3lib_clipboard {
         *              Array $cmd['el'] has keys = element-ident, value = element value (see description of clipData array in header)
         *              Selecting elements for 'copy' should be done by simultaneously setting setCopyMode.
         * 
-        * @param       array           
+        * @param       array           Array of actions, see function description
         * @return      void            
         */
        function setCmd($cmd)   {
@@ -278,8 +278,9 @@ class t3lib_clipboard {
                $elCount = count($this->elFromTable($this->fileMode?'_FILE':''));
                
                        // Upper header
-               $out[]='<tr bgcolor="'.$TBE_TEMPLATE->bgColor2.'">
-                       <td colspan="3" nowrap="nowrap" align="center"><strong>'.t3lib_div::danish_strtoupper($this->clLabel('clipboard','buttons')).'</strong></td>
+               $out[]='
+                       <tr class="bgColor2">
+                               <td colspan="3" nowrap="nowrap" align="center"><span class="uppercase"><strong>'.$this->clLabel('clipboard','buttons').'</strong></span></td>
                        </tr>';
 
                        // Button/menu header:
@@ -289,54 +290,64 @@ class t3lib_clipboard {
                
                        // Selector menu + clear button
                $opt=array();
-               $opt[]='<option value="" selected="selected">'.htmlspecialchars($this->clLabel('menu','rm')).'</option>';
-               if (!$this->fileMode && $elCount)       $opt[]='<option value="'.htmlspecialchars("document.location='".$this->editUrl()."&returnUrl='+top.rawurlencode(document.location);").'">'.htmlspecialchars($this->clLabel('edit','rm')).'</option>';
+               $opt[]='<option value="" selected="selected">'.$this->clLabel('menu','rm').'</option>';
+               if (!$this->fileMode && $elCount)       $opt[]='<option value="'.htmlspecialchars("document.location='".$this->editUrl()."&returnUrl='+top.rawurlencode(document.location);").'">'.$this->clLabel('edit','rm').'</option>';
                if ($elCount)   $opt[]='<option value="'.htmlspecialchars("
                        if(confirm(".$GLOBALS['LANG']->JScharCode(sprintf($LANG->sL('LLL:EXT:lang/locallang_core.php:mess.deleteClip'),$elCount)).")){
                                document.location='".$this->deleteUrl(0,$this->fileMode?1:0)."&redirect='+top.rawurlencode(document.location);
                        }
-                       ").'">'.htmlspecialchars($this->clLabel('delete','rm')).'</option>';
+                       ").'">'.$this->clLabel('delete','rm').'</option>';
                $selector_menu = '<select name="_clipMenu" onchange="eval(this.options[this.selectedIndex].value);this.selectedIndex=0;">'.implode('',$opt).'</select>';
                        
-               $out[]='<tr class="typo3-clipboard-head">
-                       <td>'.
-                       '<a href="'.htmlspecialchars($thumb_url).'#clip_head">'.
-                               '<img src="'.$this->backPath.'gfx/thumb_'.($this->clipData['_setThumb']?'s':'n').'.gif" width="21" height="16" vspace="2" border="0"'.t3lib_BEfunc::titleAttrib($this->clLabel('thumbmode_clip'),1).' alt="" />'.
-                               '</a>'.
-                       '<a href="'.htmlspecialchars($copymode_url).'#clip_head">'.
-                               '<img src="'.$this->backPath.'gfx/copymode_'.($this->currentMode()=='copy'?'s':'n').'.gif" width="21" height="16" vspace="2" border="0"'.t3lib_BEfunc::titleAttrib($this->clLabel('copymode'),1).' alt="" />'.
-                               '</a>'.
-                       '</td>
-                       <td width="95%">'.$selector_menu.'</td>
-                       <td><a href="'.htmlspecialchars($rmall_url).'#clip_head">'.$LANG->sL('LLL:EXT:lang/locallang_core.php:buttons.clear',1).'</a></td>
+               $out[]='
+                       <tr class="typo3-clipboard-head">
+                               <td>'.
+                               '<a href="'.htmlspecialchars($thumb_url).'#clip_head">'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/thumb_'.($this->clipData['_setThumb']?'s':'n').'.gif','width="21" height="16"').' vspace="2" border="0" title="'.$this->clLabel('thumbmode_clip').'" alt="" />'.
+                                       '</a>'.
+                               '<a href="'.htmlspecialchars($copymode_url).'#clip_head">'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/copymode_'.($this->currentMode()=='copy'?'s':'n').'.gif','width="21" height="16"').' vspace="2" border="0" title="'.$this->clLabel('copymode').'" alt="" />'.
+                                       '</a>'.
+                               '</td>
+                               <td width="95%">'.$selector_menu.'</td>
+                               <td><a href="'.htmlspecialchars($rmall_url).'#clip_head">'.$LANG->sL('LLL:EXT:lang/locallang_core.php:buttons.clear',1).'</a></td>
                        </tr>';
 
 
                        // Print header and content for the NORMAL tab:
-               $out[]='<tr bgcolor="'.$TBE_TEMPLATE->bgColor5.'">
-                       <td colspan="3"><a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('CB'=>array('setP'=>'normal')))).'#clip_head">'.
-                               '<img src="'.$this->backPath.'gfx/ol/'.($this->current=='normal'?'minus':'plus').'bullet.gif" width="18" height="16" border="0" align="top" alt="" />'.
-                               $this->padTitleWrap('Normal','normal').
-                               '</a></td>
+               $out[]='
+                       <tr class="bgColor5">
+                               <td colspan="3"><a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('CB'=>array('setP'=>'normal')))).'#clip_head">'.
+                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.($this->current=='normal'?'minus':'plus').'bullet.gif','width="18" height="16"').' border="0" align="top" alt="" />'.
+                                       $this->padTitleWrap('Normal','normal').
+                                       '</a></td>
                        </tr>';
                if ($this->current=='normal')   $out=array_merge($out,$this->printContentFromTab('normal'));
                
                        // Print header and content for the NUMERIC tabs:
                for ($a=1;$a<=$this->numberTabs;$a++)   {
-                       $out[]='<tr bgcolor="'.$TBE_TEMPLATE->bgColor5.'">
-                               <td colspan="3"><a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('CB'=>array('setP'=>'tab_'.$a)))).'#clip_head">'.
-                                       '<img src="'.$this->backPath.'gfx/ol/'.($this->current=='tab_'.$a?'minus':'plus').'bullet.gif" width="18" height="16" border="0" align="top" alt="" />'.
-                                       $this->padTitleWrap($this->clLabel('cliptabs').$a,'tab_'.$a).
-                                       '</a></td>
+                       $out[]='
+                               <tr class="bgColor5">
+                                       <td colspan="3"><a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('CB'=>array('setP'=>'tab_'.$a)))).'#clip_head">'.
+                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.($this->current=='tab_'.$a?'minus':'plus').'bullet.gif','width="18" height="16"').' border="0" align="top" alt="" />'.
+                                               $this->padTitleWrap($this->clLabel('cliptabs').$a,'tab_'.$a).
+                                               '</a></td>
                                </tr>';
                        if ($this->current=='tab_'.$a)  $out=array_merge($out,$this->printContentFromTab('tab_'.$a));
                }
                
                        // Wrap accumulated rows in a table:
-               $output = '<a name="clip_head"></a><table cellpadding="0" cellspacing="1" border="0" width="290">'.implode('',$out).'</table>';
+               $output = '<a name="clip_head"></a>
+
+                       <!--
+                               TYPO3 Clipboard:
+                       -->
+                       <table cellpadding="0" cellspacing="1" border="0" width="290" id="typo3-clipboard">
+                               '.implode('',$out).'
+                       </table>';
                
                        // Wrap in form tag:
-               $output = '<form>'.$output.'</form>';
+               $output = '<form action="">'.$output.'</form>';
 
                        // Return the accumulated content:
                return $output;
@@ -358,25 +369,26 @@ class t3lib_clipboard {
                        while(list($k,$v)=each($this->clipData[$pad]['el']))    {
                                if ($v) {
                                        list($table,$uid) = explode('|',$k);
-                                       $bgCol = ($table=='_FILE'&&$this->fileMode)||($table!='_FILE'&&!$this->fileMode) ? t3lib_div::modifyhtmlColorAll($TBE_TEMPLATE->bgColor4,-20) : $TBE_TEMPLATE->bgColor4;
+                                       $bgColClass = ($table=='_FILE'&&$this->fileMode)||($table!='_FILE'&&!$this->fileMode) ? 'bgColor4-20' : 'bgColor4';
 
                                        if ($table=='_FILE')    {       // Rendering files/directories on the clipboard:
                                                if (@file_exists($v) && t3lib_div::isAllowedAbsPath($v))        {
                                                        $fI=pathinfo($v);
                                                        $icon = is_dir($v) ? 'folder.gif' : t3lib_BEfunc::getFileIcon(strtolower($fI['extension']));
                                                        $size=' ('.t3lib_div::formatSize(filesize($v)).'bytes)';
-                                                       $icon = '<img src="gfx/fileicons/'.$icon.'" width="18" height="16" border="0" hspace="20"'.t3lib_BEfunc::titleAttrib($fI['basename'].$size,1).' align="absmiddle" alt="" />';
+                                                       $icon = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/fileicons/'.$icon,'width="18" height="16"').' border="0" hspace="20" class="absmiddle" title="'.htmlspecialchars($fI['basename'].$size).'" alt="" />';
                                                        $thumb= $this->clipData['_setThumb'] ? (t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],$fI['extension']) ? t3lib_BEfunc::getThumbNail($this->backPath.'thumbs.php',$v,' vspace="4"') : '') :'';
 
-                                                       $lines[]='<tr>
-                                                               <td bgcolor="'.$bgCol.'">'.$icon.'</td>
-                                                               <td bgcolor="'.$bgCol.'" nowrap="nowrap" width="95%">&nbsp;'.$this->linkItemText(htmlspecialchars(t3lib_div::fixed_lgd(basename($v),$GLOBALS['BE_USER']->uc['titleLen'])),$v).
-                                                                       ($pad=='normal'?(' <strong>('.htmlspecialchars($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')).')</strong>'):'').'&nbsp;'.($thumb?'<br />'.$thumb:'').'</td>
-                                                               <td bgcolor="'.$bgCol.'" align="center">'.
-                                                               '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$v.'\', \'\'); return false;').'"><img src="'.$this->backPath.'gfx/zoom2.gif" width="12" height="12" hspace="2" border="0"'.t3lib_BEfunc::titleAttrib($this->clLabel('info','cm'),1).' alt="" /></a>'.
-                                                               '<a href="'.htmlspecialchars($this->removeUrl('_FILE',t3lib_div::shortmd5($v))).'#clip_head"><img src="'.$this->backPath.'gfx/close_12h.gif" width="11" height="12" border="0"'.t3lib_BEfunc::titleAttrib($this->clLabel('removeItem'),1).' alt="" /></a>'.
-                                                               '</td>
-                                                       </tr>';
+                                                       $lines[]='
+                                                               <tr>
+                                                                       <td class="'.$bgColClass.'">'.$icon.'</td>
+                                                                       <td class="'.$bgColClass.'" nowrap="nowrap" width="95%">&nbsp;'.$this->linkItemText(htmlspecialchars(t3lib_div::fixed_lgd(basename($v),$GLOBALS['BE_USER']->uc['titleLen'])),$v).
+                                                                               ($pad=='normal'?(' <strong>('.($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')).')</strong>'):'').'&nbsp;'.($thumb?'<br />'.$thumb:'').'</td>
+                                                                       <td class="'.$bgColClass.'" align="center">'.
+                                                                       '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$v.'\', \'\'); return false;').'"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' hspace="2" border="0" title="'.$this->clLabel('info','cm').'" alt="" /></a>'.
+                                                                       '<a href="'.htmlspecialchars($this->removeUrl('_FILE',t3lib_div::shortmd5($v))).'#clip_head"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/close_12h.gif','width="11" height="12"').' border="0" title="'.$this->clLabel('removeItem').'" alt="" /></a>'.
+                                                                       '</td>
+                                                               </tr>';
                                                } else {
                                                                // If the file did not exist (or is illegal) then it is removed from the clipboard immediately:
                                                        unset($this->clipData[$pad]['el'][$k]);
@@ -385,15 +397,16 @@ class t3lib_clipboard {
                                        } else {        // Rendering records:
                                                $rec=t3lib_BEfunc::getRecord($table,$uid);
                                                if (is_array($rec))     {
-                                                       $lines[]='<tr>
-                                                               <td bgcolor="'.$bgCol.'">'.$this->linkItemText(t3lib_iconWorks::getIconImage($table,$rec,$this->backPath,'hspace="20" '.t3lib_BEfunc::titleAttrib(t3lib_BEfunc::getRecordIconAltText($rec,$table),1)),$rec,$table).'</td>
-                                                               <td bgcolor="'.$bgCol.'" nowrap="nowrap" width="95%">&nbsp;'.$this->linkItemText(htmlspecialchars(t3lib_div::fixed_lgd(t3lib_BEfunc::getRecordTitle($table,$rec),$GLOBALS['BE_USER']->uc['titleLen'])),$rec,$table).
-                                                                       ($pad=='normal'?(' <strong>('.htmlspecialchars($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')).')</strong>'):'').'&nbsp;</td>
-                                                               <td bgcolor="'.$bgCol.'" align="center">'.
-                                                               '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$table.'\', \''.intval($uid).'\'); return false;').'"><img src="'.$this->backPath.'gfx/zoom2.gif" width="12" height="12" hspace="2" border="0"'.t3lib_BEfunc::titleAttrib($this->clLabel('info','cm'),1).' alt="" /></a>'.
-                                                               '<a href="'.htmlspecialchars($this->removeUrl($table,$uid)).'#clip_head"><img src="'.$this->backPath.'gfx/close_12h.gif" width="11" height="12" border="0"'.t3lib_BEfunc::titleAttrib($this->clLabel('removeItem'),1).' alt="" /></a>'.
-                                                               '</td>
-                                                       </tr>';
+                                                       $lines[]='
+                                                               <tr>
+                                                                       <td class="'.$bgColClass.'">'.$this->linkItemText(t3lib_iconWorks::getIconImage($table,$rec,$this->backPath,'hspace="20" title="'.htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($rec,$table)).'"'),$rec,$table).'</td>
+                                                                       <td class="'.$bgColClass.'" nowrap="nowrap" width="95%">&nbsp;'.$this->linkItemText(htmlspecialchars(t3lib_div::fixed_lgd(t3lib_BEfunc::getRecordTitle($table,$rec),$GLOBALS['BE_USER']->uc['titleLen'])),$rec,$table).
+                                                                               ($pad=='normal'?(' <strong>('.($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')).')</strong>'):'').'&nbsp;</td>
+                                                                       <td class="'.$bgColClass.'" align="center">'.
+                                                                       '<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$table.'\', \''.intval($uid).'\'); return false;').'"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' hspace="2" border="0" title="'.$this->clLabel('info','cm').'" alt="" /></a>'.
+                                                                       '<a href="'.htmlspecialchars($this->removeUrl($table,$uid)).'#clip_head"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/close_12h.gif','width="11" height="12"').' border="0" title="'.$this->clLabel('removeItem').'" alt="" /></a>'.
+                                                                       '</td>
+                                                               </tr>';
                                                } else {
                                                        unset($this->clipData[$pad]['el'][$k]);
                                                        $this->changed=1;
@@ -403,10 +416,11 @@ class t3lib_clipboard {
                        }
                }
                if (!count($lines))     {
-                       $lines[]='<tr>
-                               <td bgcolor="'.$TBE_TEMPLATE->bgColor4.'"><img src="clear.gif" width="56" height="1" alt="" /></td>
-                               <td colspan="2" bgcolor="'.$TBE_TEMPLATE->bgColor4.'" nowrap="nowrap" width="95%">&nbsp;<em>('.htmlspecialchars($this->clLabel('clipNoEl')).')</em>&nbsp;</td>
-                       </tr>';
+                       $lines[]='
+                                                               <tr>
+                                                                       <td class="bgColor4"><img src="clear.gif" width="56" height="1" alt="" /></td>
+                                                                       <td colspan="2" class="bgColor4" nowrap="nowrap" width="95%">&nbsp;<em>('.$this->clLabel('clipNoEl').')</em>&nbsp;</td>
+                                                               </tr>';
                }
                
                $this->endClipboard();
@@ -416,16 +430,16 @@ class t3lib_clipboard {
        /**
         * Wraps title of pad in bold-tags and maybe the number of elements if any.
         * 
-        * @param       string          String
+        * @param       string          String (already htmlspecialchars()'ed)
         * @param       string          Pad reference
         * @return      string          HTML output (htmlspecialchar'ed content inside of tags.)
         */
        function padTitleWrap($str,$pad)        {
                $el = count($this->elFromTable($this->fileMode?'_FILE':'',$pad));
                if ($el)        {
-                       return '<strong>'.htmlspecialchars($str).'</strong> ('.htmlspecialchars($pad=='normal'?($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')):$el).')';
+                       return '<strong>'.$str.'</strong> ('.($pad=='normal'?($this->clipData['normal']['mode']=='copy'?$this->clLabel('copy','cm'):$this->clLabel('cut','cm')):htmlspecialchars($el)).')';
                } else {
-                       return $GLOBALS['TBE_TEMPLATE']->dfw(htmlspecialchars($str));
+                       return $GLOBALS['TBE_TEMPLATE']->dfw($str);
                }
        }
 
@@ -463,7 +477,7 @@ class t3lib_clipboard {
         * @return      string          
         */
        function isSelected($table,$uid)        {
-               $k=$table."|".$uid;
+               $k=$table.'|'.$uid;
                return $this->clipData[$this->current]['el'][$k] ? ($this->current=='normal'?$this->currentMode():1) : '';
        }
 
@@ -687,8 +701,8 @@ class t3lib_clipboard {
                        // Message:             
                $conf='confirm('.$GLOBALS['LANG']->JScharCode(sprintf(
                        $msg,
-                       $selRecTitle,
-                       $thisRecTitle
+                       t3lib_div::fixed_lgd($selRecTitle,30),
+                       t3lib_div::fixed_lgd($thisRecTitle,30)
                        )).')';
                return $conf;
        }
@@ -728,12 +742,12 @@ class t3lib_clipboard {
        /**
         * Clipboard label - getting from "EXT:lang/locallang_core.php:"
         * 
-        * @param       string          Key
+        * @param       string          Label Key
         * @param       string          Alternative key to "labels"
         * @return      string          
         */
        function clLabel($key,$Akey='labels')   {
-               return $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:'.$Akey.'.'.$key);
+               return htmlspecialchars($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:'.$Akey.'.'.$key));
        }
 
 
@@ -797,7 +811,7 @@ class t3lib_clipboard {
        }
        
        /**
-        * Delete cmd array
+        * Delete record entries in CMD array
         * 
         * @param       array           Command-array
         * @return      array           Modified Command-array
@@ -841,7 +855,7 @@ class t3lib_clipboard {
         * Applies the proper paste configuration in the $file array send to tce_file.php. 
         * The current pad is pasted
         * 
-        * @param       string          
+        * @param       string          Reference to element (splitted by "|")
         * @param       array           Command-array
         * @return      array           Modified Command-array
         */
@@ -862,7 +876,7 @@ class t3lib_clipboard {
        }
        
        /**
-        * Delete cmd array
+        * Delete files in CMD array
         * 
         * @param       array           Command-array
         * @return      array           Modified Command-array