Ticket #2208: in-up.diff

File in-up.diff, 3.8 KB (added by skeltoac, 6 years ago)
  • C:/Apache/Apache2/htdocs/wp-admin/inline-uploading.php

     
    3232 
    3333case 'delete': 
    3434 
    35 if ( !current_user_can('edit_post', (int) $attachment) )         
     35if ( !current_user_can('edit_post', (int) $attachment) ) 
    3636        die(__('You are not allowed to delete this attachment.').' <a href="'.basename(__FILE__)."?post=$post&amp;all=$all&amp;action=upload\">".__('Go back').'</a>'); 
    3737 
    3838wp_delete_attachment($attachment); 
     
    296296<script type="text/javascript"> 
    297297/* Define any variables we'll need, such as alternate URLs. */ 
    298298<?php echo $script; ?> 
    299  
     299function htmldecode(st) { 
     300        o = document.getElementById('htmldecode'); 
     301        if (! o) { 
     302                o = document.createElement("A"); 
     303                o.id = "htmldecode" 
     304        } 
     305        o.innerHTML = st; 
     306        r = o.innerHTML; 
     307        return r; 
     308} 
    300309function cancelUpload() { 
    301310        o = document.getElementById('uploadForm'); 
    302311        o.method = 'GET'; 
     
    332341        } else { 
    333342                img = imgb[n]; 
    334343        } 
    335         if ( ol.innerHTML == notlinked ) { 
     344        if ( ol.innerHTML == htmldecode(notlinked) ) { 
    336345                od.innerHTML = ab[n]+img+'</a>'; 
    337346                ol.innerHTML = linkedtoimage; 
    338         } else if ( ol.innerHTML == linkedtoimage ) { 
     347        } else if ( ol.innerHTML == htmldecode(linkedtoimage) ) { 
    339348                od.innerHTML = aa[n]+img+'</a>'; 
    340349                ol.innerHTML = linkedtopage; 
    341350        } else { 
     
    348357        ol=document.getElementById('L'+n); 
    349358        oi=document.getElementById('p'+n); 
    350359        ih=oi.innerHTML; 
    351         if ( ol.innerHTML == linkedtofile ) { 
     360        if ( ol.innerHTML == htmldecode(linkedtofile) ) { 
    352361                od.innerHTML = aa[n]; 
    353362                ol.innerHTML = linkedtopage; 
    354363        } else { 
     
    361370function toggleImage(n) { 
    362371        o = document.getElementById('image'+n); 
    363372        oi = document.getElementById('I'+n); 
    364         if ( oi.innerHTML == usingthumbnail ) { 
     373        if ( oi.innerHTML == htmldecode(usingthumbnail) ) { 
    365374                o.src = srcb[n]; 
    366375                oi.innerHTML = usingoriginal; 
    367376        } else { 
     
    373382        od = document.getElementById('div'+n); 
    374383        o = document.getElementById('p'+n); 
    375384        oi = document.getElementById('I'+n); 
    376         if ( oi.innerHTML == usingtitle ) { 
     385        if ( oi.innerHTML == htmldecode(usingtitle) ) { 
    377386                o.innerHTML = filename[n]; 
    378387                oi.innerHTML = usingfilename; 
    379         } else if ( oi.innerHTML == usingfilename && icon[n] != '' ) { 
     388        } else if ( oi.innerHTML == htmldecode(usingfilename) && icon[n] != '' ) { 
    380389                o.innerHTML = icon[n]; 
    381390                oi.innerHTML = usingicon; 
    382391        } else { 
     
    466475        text-align: center; 
    467476        width: 128px; 
    468477} 
    469 .usingicon a { 
    470 } 
    471478.usingtext { 
    472479        padding: 3px; 
    473480        height: 90px; 
    474481        text-align: left; 
    475482        width: 122px; 
    476483} 
    477 .usingtext a { 
    478 } 
    479484.filetype { 
    480485        font-size: 80%; 
    481486        border-bottom: 3px double #89a 
     
    483488.imagewrap, .imagewrap img, .imagewrap a, .imagewrap a img, .imagewrap a:hover img, .imagewrap a:visited img, .imagewrap a:active img { 
    484489        text-decoration: none; 
    485490} 
    486  
    487491#upload-menu { 
    488492        background: #fff; 
    489493        margin: 0px; 
     
    493497        border-bottom: 1px solid #448abd; 
    494498        width: 100%; 
    495499} 
    496  
    497500#upload-menu li { 
    498501        float: left; 
    499502        margin: 0 0 0 .75em; 
    500503} 
    501  
    502504#upload-menu a { 
    503505        display: block; 
    504506        padding: 5px; 
     
    506508        color: #000; 
    507509        border-top: 3px solid #fff; 
    508510} 
    509  
    510511#upload-menu .current a { 
    511512        background: #dfe8f1; 
    512513        border-right: 2px solid #448abd; 
    513514} 
    514  
    515515#upload-menu a:hover { 
    516516        background: #dfe8f1; 
    517517        color: #000; 
    518518} 
    519  
    520  
    521519.tip { 
    522520        color: rgb(68, 138, 189); 
    523521        padding: 2px 1em; 
     
    598596        color: #333; 
    599597        padding: 0.25em; 
    600598} 
    601  
    602599#submit input:active { 
    603600        background: #f4f4f4; 
    604601        border: 3px double #ccc; 
     
    614611#links { 
    615612        margin: 3px 8px; 
    616613        line-height: 2em; 
    617          
    618614} 
    619615#links textarea { 
    620616        width: 95%;