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
32 32 33 33 case 'delete': 34 34 35 if ( !current_user_can('edit_post', (int) $attachment) ) 35 if ( !current_user_can('edit_post', (int) $attachment) ) 36 36 die(__('You are not allowed to delete this attachment.').' <a href="'.basename(__FILE__)."?post=$post&all=$all&action=upload\">".__('Go back').'</a>'); 37 37 38 38 wp_delete_attachment($attachment); … … 296 296 <script type="text/javascript"> 297 297 /* Define any variables we'll need, such as alternate URLs. */ 298 298 <?php echo $script; ?> 299 299 function 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 } 300 309 function cancelUpload() { 301 310 o = document.getElementById('uploadForm'); 302 311 o.method = 'GET'; … … 332 341 } else { 333 342 img = imgb[n]; 334 343 } 335 if ( ol.innerHTML == notlinked) {344 if ( ol.innerHTML == htmldecode(notlinked) ) { 336 345 od.innerHTML = ab[n]+img+'</a>'; 337 346 ol.innerHTML = linkedtoimage; 338 } else if ( ol.innerHTML == linkedtoimage) {347 } else if ( ol.innerHTML == htmldecode(linkedtoimage) ) { 339 348 od.innerHTML = aa[n]+img+'</a>'; 340 349 ol.innerHTML = linkedtopage; 341 350 } else { … … 348 357 ol=document.getElementById('L'+n); 349 358 oi=document.getElementById('p'+n); 350 359 ih=oi.innerHTML; 351 if ( ol.innerHTML == linkedtofile) {360 if ( ol.innerHTML == htmldecode(linkedtofile) ) { 352 361 od.innerHTML = aa[n]; 353 362 ol.innerHTML = linkedtopage; 354 363 } else { … … 361 370 function toggleImage(n) { 362 371 o = document.getElementById('image'+n); 363 372 oi = document.getElementById('I'+n); 364 if ( oi.innerHTML == usingthumbnail) {373 if ( oi.innerHTML == htmldecode(usingthumbnail) ) { 365 374 o.src = srcb[n]; 366 375 oi.innerHTML = usingoriginal; 367 376 } else { … … 373 382 od = document.getElementById('div'+n); 374 383 o = document.getElementById('p'+n); 375 384 oi = document.getElementById('I'+n); 376 if ( oi.innerHTML == usingtitle) {385 if ( oi.innerHTML == htmldecode(usingtitle) ) { 377 386 o.innerHTML = filename[n]; 378 387 oi.innerHTML = usingfilename; 379 } else if ( oi.innerHTML == usingfilename&& icon[n] != '' ) {388 } else if ( oi.innerHTML == htmldecode(usingfilename) && icon[n] != '' ) { 380 389 o.innerHTML = icon[n]; 381 390 oi.innerHTML = usingicon; 382 391 } else { … … 466 475 text-align: center; 467 476 width: 128px; 468 477 } 469 .usingicon a {470 }471 478 .usingtext { 472 479 padding: 3px; 473 480 height: 90px; 474 481 text-align: left; 475 482 width: 122px; 476 483 } 477 .usingtext a {478 }479 484 .filetype { 480 485 font-size: 80%; 481 486 border-bottom: 3px double #89a … … 483 488 .imagewrap, .imagewrap img, .imagewrap a, .imagewrap a img, .imagewrap a:hover img, .imagewrap a:visited img, .imagewrap a:active img { 484 489 text-decoration: none; 485 490 } 486 487 491 #upload-menu { 488 492 background: #fff; 489 493 margin: 0px; … … 493 497 border-bottom: 1px solid #448abd; 494 498 width: 100%; 495 499 } 496 497 500 #upload-menu li { 498 501 float: left; 499 502 margin: 0 0 0 .75em; 500 503 } 501 502 504 #upload-menu a { 503 505 display: block; 504 506 padding: 5px; … … 506 508 color: #000; 507 509 border-top: 3px solid #fff; 508 510 } 509 510 511 #upload-menu .current a { 511 512 background: #dfe8f1; 512 513 border-right: 2px solid #448abd; 513 514 } 514 515 515 #upload-menu a:hover { 516 516 background: #dfe8f1; 517 517 color: #000; 518 518 } 519 520 521 519 .tip { 522 520 color: rgb(68, 138, 189); 523 521 padding: 2px 1em; … … 598 596 color: #333; 599 597 padding: 0.25em; 600 598 } 601 602 599 #submit input:active { 603 600 background: #f4f4f4; 604 601 border: 3px double #ccc; … … 614 611 #links { 615 612 margin: 3px 8px; 616 613 line-height: 2em; 617 618 614 } 619 615 #links textarea { 620 616 width: 95%;
