Changes in [3103:fff9fac482c6:3104:60d91f58d63e]
- Files:
-
- 12 added
- 28 edited
-
.hgsigs (added)
-
.hgsubstate (modified) (1 diff)
-
.hgtags (modified) (1 diff)
-
admin/blog_pref.php (modified) (1 diff)
-
admin/comments.php (modified) (1 diff)
-
admin/images/grid-off.png (added)
-
admin/images/grid-on.png (added)
-
admin/images/list-off.png (added)
-
admin/images/list-on.png (added)
-
admin/media.php (modified) (20 diffs)
-
admin/media_item.php (modified) (2 diffs)
-
admin/style/default.css (modified) (3 diffs)
-
inc/admin/class.dc.favorites.php (modified) (1 diff)
-
inc/admin/class.dc.menu.php (modified) (3 diffs)
-
inc/admin/lib.admincombos.php (modified) (2 diffs)
-
inc/admin/lib.dc.page.php (modified) (4 diffs)
-
inc/admin/lib.pager.php (modified) (9 diffs)
-
inc/admin/prepend.php (modified) (1 diff)
-
inc/core/class.dc.error.php (modified) (1 diff)
-
inc/core/class.dc.media.php (modified) (2 diffs)
-
inc/prepend.php (modified) (1 diff)
-
locales/fi/date.po (added)
-
locales/fi/main.po (added)
-
locales/fi/plugins.po (added)
-
locales/fi/public.po (added)
-
locales/fi/resources.php (added)
-
locales/fr/main.po (modified) (5 diffs)
-
plugins/aboutConfig/index.php (modified) (1 diff)
-
plugins/dcCKEditor/_define.php (modified) (1 diff)
-
plugins/dcCKEditor/_install.php (modified) (1 diff)
-
plugins/dcCKEditor/_post_config.php (modified) (3 diffs)
-
plugins/dcCKEditor/inc/_config.php (modified) (1 diff)
-
plugins/dcCKEditor/index.php (modified) (1 diff)
-
plugins/dcCKEditor/locales/fi/main.po (added)
-
plugins/dcCKEditor/locales/fr/main.po (modified) (1 diff)
-
plugins/dcCKEditor/tpl/index.tpl (modified) (1 diff)
-
plugins/dcLegacyEditor/locales/fi/main.po (added)
-
plugins/maintenance/index.php (modified) (2 diffs)
-
plugins/pages/class.listpage.php (modified) (2 diffs)
-
plugins/userPref/index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
.hgsubstate
r3063 r3102 1 8be811511655a8c3aabd56fe1cb627811dc43600inc/libs/clearbricks1 08a2862f246a89b713a74750b510eee9c9175392 inc/libs/clearbricks -
.hgtags
r3096 r3098 25 25 c45489df2bde825c7ed9c756e00444b54caf8e10 2.7.3 26 26 27e258e592e45b56a803038279adb6faa5865265 2.7.4 27 5e377b0f479e0f45cf199b24c3f997449a6f5a8a 2.8.0 27 28 7b52a5c13c7e8129f9a07f38482fe58b25e96349 2.8.1 -
admin/blog_pref.php
r3030 r3091 587 587 '<div class="col">'. 588 588 '<h5>'.__('Generated image sizes (in pixels)').'</h5>'. 589 '<p class="field"><label for="media_img_t_size"> Thumbnail</label> '.589 '<p class="field"><label for="media_img_t_size">'.__('Thumbnail').'</label> '. 590 590 form::field('media_img_t_size',3,3,$blog_settings->system->media_img_t_size).'</p>'. 591 591 592 '<p class="field"><label for="media_img_s_size"> Small</label> '.592 '<p class="field"><label for="media_img_s_size">'.__('Small').'</label> '. 593 593 form::field('media_img_s_size',3,3,$blog_settings->system->media_img_s_size).'</p>'. 594 594 595 '<p class="field"><label for="media_img_m_size"> Medium</label> '.595 '<p class="field"><label for="media_img_m_size">'.__('Medium').'</label> '. 596 596 form::field('media_img_m_size',3,3,$blog_settings->system->media_img_m_size).'</p>'. 597 597 '</div>'. -
admin/comments.php
r3053 r3091 245 245 '<p><label for="order" class="ib">'.__('Sort:').'</label> '. 246 246 form::combo('order',$order_combo,$order).'</p>'. 247 '<p><span class="label ib"> Afficher</span> <label for="nb" class="classic">'.247 '<p><span class="label ib">'.__('Show').'</span> <label for="nb" class="classic">'. 248 248 form::field('nb',3,3,$nb_per_page).' '. 249 249 __('comments per page').'</label></p>'. -
admin/media.php
r3034 r3101 44 44 } 45 45 46 # We set session information about directory and page46 # We set session information about directory, page and display mode 47 47 if ($d) { 48 48 $_SESSION['media_manager_dir'] = $d; … … 55 55 unset($_SESSION['media_manager_page']); 56 56 } 57 58 # Get query in any 59 $q = isset($_REQUEST['q']) ? $_REQUEST['q'] : null; 57 60 58 61 # Sort combo … … 64 67 ); 65 68 69 if (!empty($_GET['file_mode'])) { 70 $_SESSION['media_file_mode'] = $_GET['file_mode']; 71 } 72 $file_mode = !empty($_SESSION['media_file_mode']) ? $_SESSION['media_file_mode'] : false; 73 66 74 if (!empty($_GET['file_sort']) && in_array($_GET['file_sort'],$sort_combo)) { 67 75 $_SESSION['media_file_sort'] = $_GET['file_sort']; 68 76 } 69 77 $file_sort = !empty($_SESSION['media_file_sort']) ? $_SESSION['media_file_sort'] : null; 78 70 79 $nb_per_page = !empty($_SESSION['nb_per_page']) ? (integer)$_SESSION['nb_per_page'] : $nb_per_page; 71 80 if (!empty($_GET['nb_per_page']) && (integer)$_GET['nb_per_page'] > 0) { … … 81 90 if ($plugin_id != '') { 82 91 $page_url_params['plugin_id'] = $plugin_id; 92 } 93 if ($q) { 94 $page_url_params['q'] = $q; 83 95 } 84 96 … … 100 112 $core->media->setFileSort($file_sort); 101 113 } 102 $core->media->chdir($d); 103 $core->media->getDir(); 114 $query = false; 115 if ($q) { 116 $query = $core->media->searchMedia($q); 117 } 118 if (!$query) { 119 $core->media->chdir($d); 120 $core->media->getDir(); 121 } else { 122 $d = null; 123 $core->media->chdir($d); 124 } 104 125 $core_media_writable = $core->media->writable(); 105 126 $dir =& $core->media->dir; … … 170 191 'name' => $upfile['name'], 171 192 'size' => $upfile['size'], 172 'html' => mediaItemLine($core->media->getFile($new_file_id), 1)193 'html' => mediaItemLine($core->media->getFile($new_file_id),1,$query) 173 194 ); 174 195 } catch (Exception $e) { … … 187 208 $f_private = (isset($_POST['upfilepriv']) ? $_POST['upfilepriv'] : false); 188 209 189 $core->media->uploadFile($upfile['tmp_name'], $upfile['name'], $f_title,$f_private);210 $core->media->uploadFile($upfile['tmp_name'],$upfile['name'],$f_title,$f_private); 190 211 191 212 dcPage::addSuccessNotice(__('Files have been successfully uploaded.')); … … 273 294 ' <input type="submit" name="rmyes" value="'.__('Yes').'" />'. 274 295 form::hidden('d',$d). 296 form::hidden('q',$q). 275 297 $core->adminurl->getHiddenFormFields('admin.media',$page_url_params). 276 298 $core->formNonce(). … … 296 318 ); 297 319 } else { 298 $temp_params = $page_url_params;299 $temp_params['d']='%s';300 $bc_template = $core->adminurl->get('admin.media',$temp_params,'&',true);301 $breadcrumb_media = $core->media->breadCrumb($bc_template,'<span class="page-title">%s</span>');302 if ($breadcrumb_media == '') {320 if ($query || (!$query && $q)) { 321 $count = $query ? count($dir['files']) : 0; 322 $home_params = $page_url_params; 323 $home_params['d']=''; 324 $home_params['q']=''; 303 325 $breadcrumb = dcPage::breadcrumb( 304 326 array( 305 327 html::escapeHTML($core->blog->name) => '', 306 __('Media manager') => '' 328 __('Media manager') => $core->adminurl->get('admin.media',$home_params), 329 __('Search:').' '.$q.' ('.sprintf(__('%s file found','%s files found',$count),$count).')' => '' 307 330 ), 308 331 array('home_link' => !$popup) 309 332 ); 310 333 } else { 311 $home_params = $page_url_params; 312 $home_params['d']=''; 313 314 $breadcrumb = dcPage::breadcrumb( 315 array( 316 html::escapeHTML($core->blog->name) => '', 317 __('Media manager') => $core->adminurl->get('admin.media',$home_params), 318 $breadcrumb_media => '' 319 ), 320 array( 321 'home_link' => !$popup, 322 'hl' => false 323 ) 324 ); 334 $temp_params = $page_url_params; 335 $temp_params['d']='%s'; 336 $bc_template = $core->adminurl->get('admin.media',$temp_params,'&',true); 337 $breadcrumb_media = $core->media->breadCrumb($bc_template,'<span class="page-title">%s</span>'); 338 if ($breadcrumb_media == '') { 339 $breadcrumb = dcPage::breadcrumb( 340 array( 341 html::escapeHTML($core->blog->name) => '', 342 __('Media manager') => '' 343 ), 344 array('home_link' => !$popup) 345 ); 346 } else { 347 $home_params = $page_url_params; 348 $home_params['d']=''; 349 350 $breadcrumb = dcPage::breadcrumb( 351 array( 352 html::escapeHTML($core->blog->name) => '', 353 __('Media manager') => $core->adminurl->get('admin.media',$home_params), 354 $breadcrumb_media => '' 355 ), 356 array( 357 'home_link' => !$popup, 358 'hl' => false 359 ) 360 ); 361 } 325 362 } 326 363 } … … 371 408 372 409 if ($post_id) { 373 echo '<div class="form-note info"><p>'.sprintf(__('Choose a file to attach to entry %s by clicking on %s .'),410 echo '<div class="form-note info"><p>'.sprintf(__('Choose a file to attach to entry %s by clicking on %s'), 374 411 '<a href="'.$core->getPostAdminURL($post_type,$post_id).'">'.html::escapeHTML($post_title).'</a>', 375 '<img src="images/plus.png" alt="'.__('Attach this file to entry').'" />').'</p></div>'; 412 '<img src="images/plus.png" alt="'.__('Attach this file to entry').'" />'); 413 if ($core_media_writable) { 414 echo ' '.__('or').' '.sprintf('<a href="#fileupload">%s</a>',__('upload a new file')); 415 } 416 echo '</p></div>'; 376 417 } 377 418 if ($popup) { 378 echo '<div class="info"><p>'.sprintf(__('Choose a file to insert into entry by clicking on %s.'), 379 '<img src="images/plus.png" alt="'.__('Attach this file to entry').'" />').'</p></div>'; 419 echo '<div class="info"><p>'.sprintf(__('Choose a file to insert into entry by clicking on %s'), 420 '<img src="images/plus.png" alt="'.__('Attach this file to entry').'" />'); 421 if ($core_media_writable) { 422 echo ' '.__('or').' '.sprintf('<a href="#fileupload">%s</a>',__('upload a new file')); 423 } 424 echo '</p></div>'; 380 425 } 381 426 … … 394 439 $fmt_form_media = '<form action="'.$core->adminurl->get("admin.media").'" method="post" id="form-medias">'. 395 440 '<div class="files-group">%s</div>'. 396 '<p class="hidden">'.$core->formNonce() . form::hidden(array('d'),$d).form::hidden(array('plugin_id'),$plugin_id).'</p>'; 441 '<p class="hidden">'.$core->formNonce(). 442 form::hidden(array('d'),$d). 443 form::hidden(array('q'),$q). 444 form::hidden(array('plugin_id'),$plugin_id). 445 '</p>'; 397 446 398 447 if (!$popup) { … … 418 467 419 468 echo 469 '<form action="'.$core->adminurl->get("admin.media").'" method="get" id="search-form">'. 470 '<p><label for="search" class="classic">'.__('Search:').'</label> '. 471 form::field('q',20,255,$q).' '. 472 '<input type="submit" value="'.__('OK').'" />'.' '. 473 '<span class="form-note">'.__('Will search into media filename (including path), title and description').'</span>'. 474 form::hidden(array('popup'),$popup). 475 form::hidden(array('plugin_id'),$plugin_id). 476 form::hidden(array('post_id'),$post_id). 477 '</p>'. 478 '</form>'. 420 479 '<form action="'.$core->adminurl->get("admin.media").'" method="get" id="filters-form">'. 421 '<p class="two-boxes"><label for="file_sort" class="classic">'.__('Sort files:').'</label> '. 480 '<span class="media-file-mode">'. 481 '<a href="'.$core->adminurl->get("admin.media",array_merge($page_url_params,array('file_mode' => 'grid'))).'" title="'.__('Grid display mode').'">'. 482 '<img src="images/grid-'.($file_mode == 'grid' ? 'on' : 'off').'.png" alt="'.__('Grid display mode').'" />'. 483 '</a>'. 484 '<a href="'.$core->adminurl->get("admin.media",array_merge($page_url_params,array('file_mode' => 'list'))).'" title="'.__('List display mode').'">'. 485 '<img src="images/list-'.($file_mode == 'list' ? 'on' : 'off').'.png" alt="'.__('List display mode').'" />'. 486 '</a>'. 487 '</span>'. 488 '<p class="three-boxes"><label for="file_sort" class="classic">'.__('Sort files:').'</label> '. 422 489 form::combo('file_sort',$sort_combo,$file_sort).'</p>'. 423 '<p class="t wo-boxes"><label for="nb_per_page" class="classic">'.__('Number of elements displayed per page:').'</label> '.490 '<p class="three-boxes"><label for="nb_per_page" class="classic">'.__('Number of elements displayed per page:').'</label> '. 424 491 form::field('nb_per_page',5,3,(integer) $nb_per_page).' '. 425 492 '<input type="submit" value="'.__('OK').'" />'. … … 427 494 form::hidden(array('plugin_id'),$plugin_id). 428 495 form::hidden(array('post_id'),$post_id). 496 form::hidden(array('q'),$q). 429 497 '</p>'. 430 498 '</form>'. 431 499 $pager->getLinks(); 432 500 433 $dgroup = ''; 434 $fgroup = ''; 435 for ($i=$pager->index_start, $j=0; $i<=$pager->index_end; $i++,$j++) 436 { 437 if ($items[$i]->d) { 438 $dgroup .= mediaItemLine($items[$i],$j); 439 } else { 440 $fgroup .= mediaItemLine($items[$i],$j); 441 } 442 } 443 444 echo 445 ($dgroup != '' ? '<div class="folders-group">'.$dgroup.'</div>' : ''). 446 sprintf($fmt_form_media,$fgroup,''); 501 if ($file_mode == 'list') { 502 $table = 503 '<div class="table-outer">'. 504 '<table>'. 505 '<caption class="hidden">'.__('Media list').'</caption>'. 506 '<tr>'. 507 '<th colspan="2" class="first">'.__('Name').'</th>'. 508 '<th scope="col">'.__('Date').'</th>'. 509 '<th scope="col">'.__('Size').'</th>'. 510 '</tr>'; 511 512 $dlist = ''; 513 $flist = ''; 514 for ($i=$pager->index_start, $j=0; $i<=$pager->index_end; $i++,$j++) 515 { 516 if ($items[$i]->d) { 517 $dlist .= mediaItemLine($items[$i],$j,$query,true); 518 } else { 519 $flist .= mediaItemLine($items[$i],$j,$query,true); 520 } 521 } 522 $table .= $dlist.$flist; 523 524 $table .= 525 '</table></div>'; 526 echo sprintf($fmt_form_media,$table,''); 527 } else { 528 $dgroup = ''; 529 $fgroup = ''; 530 for ($i=$pager->index_start, $j=0; $i<=$pager->index_end; $i++,$j++) 531 { 532 if ($items[$i]->d) { 533 $dgroup .= mediaItemLine($items[$i],$j,$query); 534 } else { 535 $fgroup .= mediaItemLine($items[$i],$j,$query); 536 } 537 } 538 echo 539 ($dgroup != '' ? '<div class="folders-group">'.$dgroup.'</div>' : ''). 540 sprintf($fmt_form_media,$fgroup,''); 541 } 447 542 448 543 echo $pager->getLinks(); … … 458 553 !(count($items) == 0 || (count($items) == 1 && $items[0]->parent)); 459 554 460 if ( $core_media_writable || $core_media_archivable) {555 if ((!$query) && ($core_media_writable || $core_media_archivable)) { 461 556 echo 462 557 '<div class="vertical-separator">'. … … 464 559 } 465 560 466 if ( $core_media_writable || $core_media_archivable) {561 if ((!$query) && ($core_media_writable || $core_media_archivable)) { 467 562 echo 468 563 '<div class="two-boxes odd">'; … … 500 595 } 501 596 502 if ( $core_media_writable)597 if (!$query && $core_media_writable) 503 598 { 504 599 echo … … 561 656 form::hidden('rmyes',1).form::hidden('d',html::escapeHTML($d)). 562 657 form::hidden(array('plugin_id'),$plugin_id).form::hidden('remove',''). 658 form::hidden(array('q'),$q). 563 659 $core->formNonce(). 564 660 '</div>'. 565 661 '</form>'; 566 662 567 if ( $core_media_writable || $core_media_archivable) {663 if ((!$query) && ($core_media_writable || $core_media_archivable)) { 568 664 echo 569 665 '</div>'; … … 578 674 579 675 /* ----------------------------------------------------- */ 580 function mediaItemLine($f,$i )676 function mediaItemLine($f,$i,$query,$table=false) 581 677 { 582 678 global $core, $page_url, $popup, $post_id, $plugin_id,$page_url_params; 583 679 584 680 $fname = $f->basename; 585 586 $class = 'media-item media-col-'.($i%2); 681 $file = $query ? $f->relname : $f->basename; 682 683 $class = $table ? '' : 'media-item media-col-'.($i%2); 587 684 588 685 if ($f->d) { … … 615 712 $fname = substr($fname, 0, $maxchars-4).'...'.($f->d ? '' : files::getExtension($fname)); 616 713 } 617 $res =618 '<div class="'.$class.'"><p><a class="media-icon media-link" href="'.rawurldecode($link).'">'.619 '<img src="'.$f->media_icon.'" alt="" />'.$fname.'</a></p>';620 621 $lst = '';622 623 if (!$f->d) {624 $lst .=625 '<li>'.$f->media_title.'</li>'.626 '<li>'.627 $f->media_dtstr.' - '.628 files::size($f->size).' - '.629 '<a href="'.$f->file_url.'">'.__('open').'</a>'.630 '</li>';631 }632 714 633 715 $act = ''; 634 635 716 if ($post_id && !$f->d) { 717 // Media attachment button 636 718 $act .= 637 719 '<a class="attach-media" title="'.__('Attach this file to entry').'" href="'. … … 641 723 '</a>'; 642 724 } 643 644 725 if ($popup && !$f->d) { 726 // Media insertion button 645 727 $act .= '<a href="'.$link.'"><img src="images/plus.png" alt="'.__('Insert this file into entry').'" '. 646 728 'title="'.__('Insert this file into entry').'" /></a> '; 647 729 } 648 649 730 if ($f->del) { 731 // Deletion button or checkbox 650 732 if (!$popup && !$f->d) { 651 $act .= form::checkbox(array('medias[]', 'media_'.rawurlencode($f ->basename)),rawurlencode($f->basename));733 $act .= form::checkbox(array('medias[]', 'media_'.rawurlencode($file)),$file); 652 734 } else { 653 735 $act .= '<a class="media-remove" '. 654 'href="'.html::escapeURL($page_url).'&plugin_id='.$plugin_id.'&d='. 655 rawurlencode($GLOBALS['d']).'&remove='.rawurlencode($f->basename).'">'. 736 'href="'.html::escapeURL($page_url). 737 '&plugin_id='.$plugin_id. 738 '&d='.rawurlencode($GLOBALS['d']). 739 '&q='.rawurlencode($GLOBALS['q']). 740 '&remove='.rawurlencode($file).'">'. 656 741 '<img src="images/trash.png" alt="'.__('Delete').'" title="'.__('delete').'" /></a>'; 657 742 } 658 743 } 659 744 660 $lst .= ($act != '' ? '<li class="media-action"> '.$act.'</li>' : ''); 661 662 // Show player if relevant 663 $file_type = explode('/',$f->type); 664 if ($file_type[0] == 'audio') 665 { 666 $lst .= '<li>'.dcMedia::audioPlayer($f->type,$f->file_url,$core->adminurl->get("admin.home",array('pf' => 'player_mp3.swf'))).'</li>'; 667 } 668 669 $res .= ($lst != '' ? '<ul>'.$lst.'</ul>' : ''); 670 671 $res .= '</div>'; 745 if (!$table) { 746 $res = 747 '<div class="'.$class.'"><p><a class="media-icon media-link" href="'.rawurldecode($link).'">'. 748 '<img src="'.$f->media_icon.'" alt="" />'.($query ? $file : $fname).'</a></p>'; 749 750 $lst = ''; 751 if (!$f->d) { 752 $lst .= 753 '<li>'.$f->media_title.'</li>'. 754 '<li>'. 755 $f->media_dtstr.' - '. 756 files::size($f->size).' - '. 757 '<a href="'.$f->file_url.'">'.__('open').'</a>'. 758 '</li>'; 759 } 760 $lst .= ($act != '' ? '<li class="media-action"> '.$act.'</li>' : ''); 761 762 // Show player if relevant 763 $file_type = explode('/',$f->type); 764 if ($file_type[0] == 'audio') 765 { 766 $lst .= '<li>'.dcMedia::audioPlayer($f->type,$f->file_url,$core->adminurl->get("admin.home",array('pf' => 'player_mp3.swf'))).'</li>'; 767 } 768 769 $res .= ($lst != '' ? '<ul>'.$lst.'</ul>' : ''); 770 $res .= '</div>'; 771 } else { 772 $res = '<tr class="'.$class.'">'; 773 $res .= '<td class="media-action">'.$act.'</td>'; 774 $res .= '<td class="maximal" scope="row"><a class="media-flag media-link" href="'.rawurldecode($link).'">'. 775 '<img src="'.$f->media_icon.'" alt="" />'.($query ? $file : $fname).'</a>'. 776 '<br />'.($f->d ? '' : $f->media_title).'</td>'; 777 $res .= '<td class="nowrap count">'.($f->d ? '' : $f->media_dtstr).'</td>'; 778 $res .= '<td class="nowrap count">'.($f->d ? '' : files::size($f->size).' - '.'<a href="'.$f->file_url.'">'.__('open').'</a>').'</td>'; 779 $res .= '</tr>'; 780 } 672 781 673 782 return $res; -
admin/media_item.php
r2889 r3093 498 498 echo '<a href="'.$core->adminurl->get('admin.media.item',array_merge($page_url_params,array("size" => "o","tab"=>"media-details-tab"))).'">'.__('original').'</a>'; 499 499 echo '</p>'; 500 501 if ($thumb_size != 'o' && isset($file->media_thumb[$thumb_size])) { 502 $p = path::info($file->file); 503 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 504 $thumb = sprintf(($alpha ? $core->media->thumb_tp_alpha : $core->media->thumb_tp),$p['dirname'],$p['base'],'%s'); 505 $thumb_file = sprintf($thumb,$thumb_size); 506 $T = getimagesize($thumb_file); 507 $stats = stat($thumb_file); 508 echo 509 '<h3>'.__('Thumbnail details').'</h3>'. 510 '<ul>'. 511 '<li><strong>'.__('Image width:').'</strong> '.$T[0].' px</li>'. 512 '<li><strong>'.__('Image height:').'</strong> '.$T[1].' px</li>'. 513 '<li><strong>'.__('File size:').'</strong> '.files::size($stats[7]).'</li>'. 514 '<li><strong>'.__('File URL:').'</strong> <a href="'.$file->media_thumb[$thumb_size].'">'. 515 $file->media_thumb[$thumb_size].'</a></li>'. 516 '</ul>'; 517 } 500 518 } 501 519 … … 514 532 '<ul>'. 515 533 '<li><strong>'.__('File owner:').'</strong> '.$file->media_user.'</li>'. 516 '<li><strong>'.__('File type:').'</strong> '.$file->type.'</li>'. 534 '<li><strong>'.__('File type:').'</strong> '.$file->type.'</li>'; 535 if ($file->media_image) 536 { 537 $S = getimagesize($file->file); 538 echo 539 '<li><strong>'.__('Image width:').'</strong> '.$S[0].' px</li>'. 540 '<li><strong>'.__('Image height:').'</strong> '.$S[1].' px</li>'; 541 unset($S); 542 } 543 echo 517 544 '<li><strong>'.__('File size:').'</strong> '.files::size($file->size).'</li>'. 518 545 '<li><strong>'.__('File URL:').'</strong> <a href="'.$file->file_url.'">'.$file->file_url.'</a></li>'. -
admin/style/default.css
r2796 r3101 1845 1845 } 1846 1846 /* ------------------------------------------------------------------ media.php */ 1847 span.media-file-mode { 1848 margin-right: 1em; 1849 } 1850 .media-file-mode a { 1851 border-bottom: none; 1852 } 1853 .media-file-mode img { 1854 margin-right: 1em; 1855 } 1847 1856 .media-item { 1848 1857 position: relative; … … 1880 1889 display: block; 1881 1890 } 1891 a.media-flag { 1892 border-bottom: none; 1893 } 1894 .media-flag img { 1895 float: left; 1896 margin-right: .5em; 1897 } 1882 1898 .media-link { 1883 1899 font-size: 1.1em; … … 1927 1943 border-color: #eee; 1928 1944 } 1945 tr.media-folder { 1946 background: transparent; 1947 } 1929 1948 .media-folder-up { 1930 1949 border-color: #fff; -
inc/admin/class.dc.favorites.php
r2725 r3075 315 315 true, 316 316 $v['id'], 317 $v['class'] 317 $v['class'], 318 true 318 319 ); 319 320 } -
inc/admin/class.dc.menu.php
r2566 r3075 22 22 $this->title = $title; 23 23 $this->itemSpace = $itemSpace; 24 $this->pinned = array(); 24 25 $this->items = array(); 25 26 } 26 27 27 public function addItem($title,$url,$img,$active,$show=true,$id=null,$class=null )28 public function addItem($title,$url,$img,$active,$show=true,$id=null,$class=null,$pinned=false) 28 29 { 29 30 if($show) { 30 $this->items[] = $this->itemDef($title,$url,$img,$active,$id,$class); 31 $item = $this->itemDef($title,$url,$img,$active,$id,$class); 32 if ($pinned) { 33 $this->pinned[] = $item; 34 } else { 35 $this->items[$title] = $item; 36 } 31 37 } 32 38 } 33 39 34 public function prependItem($title,$url,$img,$active,$show=true,$id=null,$class=null )40 public function prependItem($title,$url,$img,$active,$show=true,$id=null,$class=null,$pinned=false) 35 41 { 36 42 if ($show) { 37 array_unshift($this->items,$this->itemDef($title,$url,$img,$active,$id,$class)); 43 $item = $this->itemDef($title,$url,$img,$active,$id,$class); 44 if ($pinned) { 45 array_unshift($this->pinned,$item); 46 } else { 47 $this->items[$title] = $item; 48 } 38 49 } 39 50 } … … 41 52 public function draw() 42 53 { 43 if (count($this->items) == 0) {54 if (count($this->items) + count($this->pinned) == 0) { 44 55 return ''; 45 56 } … … 50 61 '<ul>'."\n"; 51 62 52 for ($i=0; $i<count($this->items); $i++) 63 // 1. Display pinned items (unsorted) 64 for ($i=0; $i<count($this->pinned); $i++) 65 { 66 if ($i+1 < count($this->pinned) && $this->itemSpace != '') { 67 $res .= preg_replace('|</li>$|',$this->itemSpace.'</li>',$this->pinned[$i]); 68 $res .= "\n"; 69 } else { 70 $res .= $this->pinned[$i]."\n"; 71 } 72 } 73 74 // 2. Display unpinned itmes (sorted) 75 $i = 0; 76 dcUtils::lexicalKeySort($this->items); 77 foreach ($this->items as $title => $item) 53 78 { 54 79 if ($i+1 < count($this->items) && $this->itemSpace != '') { 55 $res .= preg_replace('|</li>$|',$this->itemSpace.'</li>',$ this->items[$i]);80 $res .= preg_replace('|</li>$|',$this->itemSpace.'</li>',$item); 56 81 $res .= "\n"; 57 82 } else { 58 $res .= $ this->items[$i]."\n";83 $res .= $item."\n"; 59 84 } 85 $i++; 60 86 } 61 87 -
inc/admin/lib.admincombos.php
r3011 r3082 37 37 while ($categories->fetch()) { 38 38 $categories_combo[] = new formSelectOption ( 39 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title).' ('.$categories->nb_post.')',39 html::escapeHTML($categories->cat_title).' ('.$categories->nb_post.')', 40 40 ($use_url ? $categories->cat_url : $categories->cat_id), 41 41 ($categories->level-1 ? 'sub-option'.($categories->level-1) : '') … … 152 152 $editors_combo[$v] = $v; 153 153 } 154 154 155 155 return $editors_combo; 156 156 } -
inc/admin/lib.dc.page.php
r3080 r3086 177 177 } 178 178 179 // Display breadcrumb (if given) before any error message 179 // Display breadcrumb (if given) before any error messages 180 180 echo $breadcrumb; 181 181 182 if ($core->error->flag()) { 183 echo 184 '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</strong></p>'. 182 // Display notices and errors 183 echo self::notices(); 184 } 185 186 public static function notices() 187 { 188 global $core; 189 static $error_displayed = false; 190 $res = ''; 191 192 // return error messages if any 193 if ($core->error->flag() && !$error_displayed) { 194 $res .= '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</strong></p>'. 185 195 $core->error->toHTML(). 186 196 '</div>'; 187 } 188 189 // Display notices 190 echo self::notices(); 191 } 192 193 public static function notices() 194 { 197 $error_displayed = true; 198 } 199 195 200 // return notices if any 196 $res = '';197 201 if (isset($_SESSION['notifications'])) { 198 $notifications = $_SESSION['notifications'];199 202 foreach ($_SESSION['notifications'] as $notification) { 200 203 $res .= self::getNotification($notification); … … 366 369 echo $breadcrumb; 367 370 368 if ($core->error->flag()) { 369 echo 370 '<div class="error" role="alert"><strong>'.__('Errors:').'</strong>'. 371 $core->error->toHTML(). 372 '</div>'; 373 } 371 // Display notices and errors 372 echo self::notices(); 374 373 } 375 374 … … 545 544 } 546 545 547 public static function cssLoad($src, $media='screen')546 public static function cssLoad($src,$media='screen',$v='') 548 547 { 549 548 $escaped_src = html::escapeHTML($src); 550 549 if (!isset(self::$loaded_css[$escaped_src])) { 551 550 self::$loaded_css[$escaped_src] = true; 552 $escaped_src = self::appendVersion($escaped_src );551 $escaped_src = self::appendVersion($escaped_src,$v); 553 552 554 553 return '<link rel="stylesheet" href="'.$escaped_src.'" type="text/css" media="'.$media.'" />'."\n"; … … 556 555 } 557 556 558 public static function jsLoad($src )557 public static function jsLoad($src,$v='') 559 558 { 560 559 $escaped_src = html::escapeHTML($src); 561 560 if (!isset(self::$loaded_js[$escaped_src])) { 562 561 self::$loaded_js[$escaped_src] = true; 563 $escaped_src = self::appendVersion($escaped_src );562 $escaped_src = self::appendVersion($escaped_src,$v); 564 563 return '<script type="text/javascript" src="'.$escaped_src.'"></script>'."\n"; 565 564 } 566 565 } 567 566 568 private static function appendVersion($src) 569 { 570 if (strpos($src,'?')===false) { 571 $src .= '?v='; 572 } else { 573 $src .= '&v='; 574 } 575 567 private static function appendVersion($src,$v='') 568 { 569 $src .= (strpos($src,'?') === false ? '?' : '&').'v='; 576 570 if (defined('DC_DEV') && DC_DEV === true) { 577 571 $src .= md5(uniqid()); 578 572 } else { 579 $src .= DC_VERSION; 580 } 581 573 $src .= ($v === '' ? DC_VERSION : $v); 574 } 582 575 return $src; 583 576 } -
inc/admin/lib.pager.php
r3087 r3089 180 180 } 181 181 182 $html_block .= '<tr>'. 183 '<th colspan="2" class="first">'.__('Title').'</th>'. 184 '<th scope="col">'.__('Date').'</th>'. 185 '<th scope="col">'.__('Category').'</th>'. 186 '<th scope="col">'.__('Author').'</th>'. 187 '<th scope="col"><img src="images/comments.png" alt="" title="'.__('Comments').'" /><span class="hidden">'.__('Comments').'</span></th>'. 188 '<th scope="col"><img src="images/trackbacks.png" alt="" title="'.__('Trackbacks').'" /><span class="hidden">'.__('Trackbacks').'</span></th>'. 189 '<th scope="col">'.__('Status').'</th>'. 190 '</tr>%s</table></div>'; 191 182 $cols = array( 183 'title' => '<th colspan="2" class="first">'.__('Title').'</th>', 184 'date' => '<th scope="col">'.__('Date').'</th>', 185 'category' => '<th scope="col">'.__('Category').'</th>', 186 'author' => '<th scope="col">'.__('Author').'</th>', 187 'comments' => '<th scope="col"><img src="images/comments.png" alt="" title="'.__('Comments'). 188 '" /><span class="hidden">'.__('Comments').'</span></th>', 189 'trackbacks' => '<th scope="col"><img src="images/trackbacks.png" alt="" title="'.__('Trackbacks'). 190 '" /><span class="hidden">'.__('Trackbacks').'</span></th>', 191 'status' => '<th scope="col">'.__('Status').'</th>' 192 ); 193 $cols = new ArrayObject($cols); 194 $this->core->callBehavior('adminPostListHeader',$this->core,$this->rs,$cols); 195 196 $html_block .= '<tr>'.implode(iterator_to_array($cols)).'</tr>%s</table></div>'; 192 197 if ($enclose_block) { 193 198 $html_block = sprintf($enclose_block,$html_block); … … 262 267 ' id="p'.$this->rs->post_id.'">'; 263 268 264 $res .= 265 '<td class="nowrap">'. 266 form::checkbox(array('entries[]'),$this->rs->post_id,$checked,'','',!$this->rs->isEditable()).'</td>'. 267 '<td class="maximal" scope="row"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 268 html::escapeHTML($this->rs->post_title).'</a></td>'. 269 '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 270 '<td class="nowrap">'.$cat_title.'</td>'. 271 '<td class="nowrap">'.html::escapeHTML($this->rs->user_id).'</td>'. 272 '<td class="nowrap count">'.$this->rs->nb_comment.'</td>'. 273 '<td class="nowrap count">'.$this->rs->nb_trackback.'</td>'. 274 '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 275 '</tr>'; 269 $cols = array( 270 'check' => '<td class="nowrap">'. 271 form::checkbox(array('entries[]'),$this->rs->post_id,$checked,'','',!$this->rs->isEditable()). 272 '</td>', 273 'title' => '<td class="maximal" scope="row"><a href="'. 274 $this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 275 html::escapeHTML($this->rs->post_title).'</a></td>', 276 'date' => '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>', 277 'category' => '<td class="nowrap">'.$cat_title.'</td>', 278 'author' => '<td class="nowrap">'.html::escapeHTML($this->rs->user_id).'</td>', 279 'comments' => '<td class="nowrap count">'.$this->rs->nb_comment.'</td>', 280 'trackbacks' => '<td class="nowrap count">'.$this->rs->nb_trackback.'</td>', 281 'status' => '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>' 282 ); 283 $cols = new ArrayObject($cols); 284 $this->core->callBehavior('adminPostListValue',$this->core,$this->rs,$cols); 285 286 $res .= implode(iterator_to_array($cols)); 287 $res .= '</tr>'; 276 288 277 289 return $res; … … 293 305 $html_block = 294 306 '<div class="table-outer clear">'. 295 '<table><caption class="hidden">'.__('Entries list').'</caption><tr>'. 296 '<th scope="col">'.__('Title').'</th>'. 297 '<th scope="col">'.__('Date').'</th>'. 298 '<th scope="col">'.__('Author').'</th>'. 299 '<th scope="col">'.__('Status').'</th>'. 300 '</tr>%s</table></div>'; 301 307 '<table><caption class="hidden">'.__('Entries list').'</caption><tr>'; 308 309 $cols = array( 310 'title' => '<th scope="col">'.__('Title').'</th>', 311 'date' => '<th scope="col">'.__('Date').'</th>', 312 'author' => '<th scope="col">'.__('Author').'</th>', 313 'status' => '<th scope="col">'.__('Status').'</th>' 314 ); 315 316 $cols = new ArrayObject($cols); 317 $this->core->callBehavior('adminPostMiniListHeader',$this->core,$this->rs,$cols); 318 319 $html_block .= '<tr>'.implode(iterator_to_array($cols)).'</tr>%s</table></div>'; 302 320 if ($enclose_block) { 303 321 $html_block = sprintf($enclose_block,$html_block); … … 359 377 ' id="p'.$this->rs->post_id.'">'; 360 378 361 $res .= 362 '<td scope="row" class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'" '. 363 'title="'.html::escapeHTML($this->rs->getURL()).'">'. 364 html::escapeHTML($this->rs->post_title).'</a></td>'. 365 '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 366 '<td class="nowrap">'.html::escapeHTML($this->rs->user_id).'</td>'. 367 '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 368 '</tr>'; 379 $cols = array( 380 'title' => '<td scope="row" class="maximal"><a href="'. 381 $this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'" '. 382 'title="'.html::escapeHTML($this->rs->getURL()).'">'. 383 html::escapeHTML($this->rs->post_title).'</a></td>', 384 'date' => '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>', 385 'author' => '<td class="nowrap">'.html::escapeHTML($this->rs->user_id).'</td>', 386 'status' => '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>' 387 ); 388 389 $cols = new ArrayObject($cols); 390 $this->core->callBehavior('adminPostMiniListValue',$this->core,$this->rs,$cols); 391 392 $res .= implode(iterator_to_array($cols)); 393 $res .= '</tr>'; 369 394 370 395 return $res; … … 422 447 } 423 448 424 $html_block .= '<tr>'. 425 '<th colspan="2" scope="col" abbr="comm" class="first">'.__('Type').'</th>'. 426 '<th scope="col">'.__('Author').'</th>'. 427 '<th scope="col">'.__('Date').'</th>'. 428 '<th scope="col" class="txt-center">'.__('Status').'</th>'; 449 $cols = array( 450 'type' => '<th colspan="2" scope="col" abbr="comm" class="first">'.__('Type').'</th>', 451 'author' => '<th scope="col">'.__('Author').'</th>', 452 'date' => '<th scope="col">'.__('Date').'</th>', 453 'status' => '<th scope="col" class="txt-center">'.__('Status').'</th>' 454 ); 429 455 if ($spam) { 430 $html_block .= 431 '<th scope="col">'.__('IP').'</th>'. 432 '<th scope="col">'.__('Spam filter').'</th>'; 433 } 434 $html_block .= 435 '<th scope="col" abbr="entry">'.__('Entry').'</th>'. 436 '</tr>%s</table></div>'; 456 $cols['ip'] = '<th scope="col">'.__('IP').'</th>'; 457 $cols['spam_filter'] = '<th scope="col">'.__('Spam filter').'</th>'; 458 } 459 $cols['entry'] = '<th scope="col" abbr="entry">'.__('Entry').'</th>'; 460 461 $cols = new ArrayObject($cols); 462 $this->core->callBehavior('adminCommentListHeader',$this->core,$this->rs,$cols); 463 464 $html_block .= '<tr>'.implode(iterator_to_array($cols)).'</tr>%s</table></div>'; 437 465 438 466 if ($enclose_block) { … … 505 533 ' id="c'.$this->rs->comment_id.'">'; 506 534 507 $res .= 508 '<td class="nowrap">'. 509 form::checkbox(array('comments[]'),$this->rs->comment_id,$checked,'','',0).'</td>'. 510 '<td class="nowrap" abbr="'.__('Type and author').'" scope="row">'. 511 '<a href="'.$comment_url.'" title="'.$comment_title.'">'. 512 '<img src="images/edit-mini.png" alt="'.__('Edit').'"/> '. 513 ($this->rs->comment_trackback ? __('trackback') : __('comment')).' '.'</a></td>'. 514 '<td class="nowrap maximal"><a href="'.$author_url.'">'.html::escapeHTML($this->rs->comment_author).'</a></td>'. 515 '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>'. 516 '<td class="nowrap status txt-center">'.$img_status.'</td>'; 535 $cols = array( 536 'check' => '<td class="nowrap">'. 537 form::checkbox(array('comments[]'),$this->rs->comment_id,$checked,'','',0).'</td>', 538 'type' => '<td class="nowrap" abbr="'.__('Type and author').'" scope="row">'. 539 '<a href="'.$comment_url.'" title="'.$comment_title.'">'. 540 '<img src="images/edit-mini.png" alt="'.__('Edit').'"/> '. 541 ($this->rs->comment_trackback ? __('trackback') : __('comment')).' '.'</a></td>', 542 'author' => '<td class="nowrap maximal"><a href="'.$author_url.'">'. 543 html::escapeHTML($this->rs->comment_author).'</a></td>', 544 'date' => '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>', 545 'status' => '<td class="nowrap status txt-center">'.$img_status.'</td>' 546 ); 547 517 548 if ($spam) { 518 549 $filter_name = ''; … … 524 555 } 525 556 } 526 $res .= 527 '<td class="nowrap"><a href="'.$core->adminurl->get("admin.comments",array('ip' => $this->rs->comment_ip)).'">'.$this->rs->comment_ip.'</a></td>'. 528 '<td class="nowrap">'.$filter_name.'</td>'; 529 } 530 $res .= 531 '<td class="nowrap discrete"><a href="'.$post_url.'">'. 532 $post_title.'</a>'. 533 ($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</td>'; 534 557 $cols['ip'] = '<td class="nowrap"><a href="'. 558 $core->adminurl->get("admin.comments",array('ip' => $this->rs->comment_ip)).'">'. 559 $this->rs->comment_ip.'</a></td>'; 560 $cols['spam_filter'] = '<td class="nowrap">'.$filter_name.'</td>'; 561 } 562 $cols['entry'] = '<td class="nowrap discrete"><a href="'.$post_url.'">'.$post_title.'</a>'. 563 ($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</td>'; 564 565 $cols = new ArrayObject($cols); 566 $this->core->callBehavior('adminCommentListValue',$this->core,$this->rs,$cols); 567 568 $res .= implode(iterator_to_array($cols)); 535 569 $res .= '</tr>'; 536 570 … … 565 599 } 566 600 567 $html_block .= '<tr>'. 568 '<th colspan="2" scope="col" class="first">'.__('Username').'</th>'. 569 '<th scope="col">'.__('First Name').'</th>'. 570 '<th scope="col">'.__('Last Name').'</th>'. 571 '<th scope="col">'.__('Display name').'</th>'. 572 '<th scope="col" class="nowrap">'.__('Entries (all types)').'</th>'. 573 '</tr>%s</table></div>'; 574 601 $cols = array( 602 'username' => '<th colspan="2" scope="col" class="first">'.__('Username').'</th>', 603 'first_name' => '<th scope="col">'.__('First Name').'</th>', 604 'last_name' => '<th scope="col">'.__('Last Name').'</th>', 605 'display_name' => '<th scope="col">'.__('Display name').'</th>', 606 'entries' => '<th scope="col" class="nowrap">'.__('Entries (all types)').'</th>' 607 ); 608 609 $cols = new ArrayObject($cols); 610 $this->core->callBehavior('adminUserListHeader',$this->core,$this->rs,$cols); 611 612 $html_block .= '<tr>'.implode(iterator_to_array($cols)).'</tr>%s</table></div>'; 575 613 if ($enclose_block) { 576 614 $html_block = sprintf($enclose_block,$html_block); … … 607 645 $img_status = sprintf($img,__('superadmin'),'superadmin.png'); 608 646 } 609 return 610 '<tr class="line">'. 611 '<td class="nowrap">'.form::hidden(array('nb_post[]'),(integer) $this->rs->nb_post). 612 form::checkbox(array('users[]'),$this->rs->user_id).'</td>'. 613 '<td class="maximal" scope="row"><a href="'.$this->core->adminurl->get('admin.user',array('id' => $this->rs->user_id)).'">'. 614 $this->rs->user_id.'</a> '.$img_status.'</td>'. 615 '<td class="nowrap">'.html::escapeHTML($this->rs->user_firstname).'</td>'. 616 '<td class="nowrap">'.html::escapeHTML($this->rs->user_name).'</td>'. 617 '<td class="nowrap">'.html::escapeHTML($this->rs->user_displayname).'</td>'. 618 '<td class="nowrap count"><a href="'.$this->core->adminurl->get('admin.posts',array('user_id' => $this->rs->user_id)).'">'. 619 $this->rs->nb_post.'</a></td>'. 620 '</tr>'; 647 648 $res = '<tr class="line">'; 649 650 $cols = array( 651 'check' => '<td class="nowrap">'.form::hidden(array('nb_post[]'),(integer) $this->rs->nb_post). 652 form::checkbox(array('users[]'),$this->rs->user_id).'</td>', 653 'username' => '<td class="maximal" scope="row"><a href="'. 654 $this->core->adminurl->get('admin.user',array('id' => $this->rs->user_id)).'">'. 655 $this->rs->user_id.'</a> '.$img_status.'</td>', 656 'first_name' => '<td class="nowrap">'.html::escapeHTML($this->rs->user_firstname).'</td>', 657 'last_name' => '<td class="nowrap">'.html::escapeHTML($this->rs->user_name).'</td>', 658 'display_name' => '<td class="nowrap">'.html::escapeHTML($this->rs->user_displayname).'</td>', 659 'entries' => '<td class="nowrap count"><a href="'. 660 $this->core->adminurl->get('admin.posts',array('user_id' => $this->rs->user_id)).'">'. 661 $this->rs->nb_post.'</a></td>' 662 ); 663 664 $cols = new ArrayObject($cols); 665 $this->core->callBehavior('adminUserListValue',$this->core,$this->rs,$cols); 666 667 $res .= implode(iterator_to_array($cols)); 668 $res .= '</tr>'; 669 670 return $res; 621 671 } 622 672 } -
inc/admin/prepend.php
r3059 r3075 69 69 70 70 $url = $core->adminurl->get($adminurl); 71 $_menu[$section]->prependItem($desc,$url,$icon,preg_match('/'.preg_quote($url).'(\?.*)?$/',$_SERVER['REQUEST_URI']),$perm); 71 $_menu[$section]->prependItem($desc,$url,$icon, 72 preg_match('/'.preg_quote($url).'(\?.*)?$/',$_SERVER['REQUEST_URI']),$perm,null,null,true); 72 73 } 73 74 -
inc/core/class.dc.error.php
r2566 r3074 30 30 /** @var string HTML error item pattern */ 31 31 protected $html_item = "<li>%s</li>\n"; 32 33 /**34 * Object constructor.35 */36 public function __construct()37 {38 $this->code = 0;39 $this->msg = '';40 }41 32 42 33 /** -
inc/core/class.dc.media.php
r2768 r3099 368 368 return strcasecmp($a->basename,$b->basename); 369 369 } 370 371 370 } 372 371 … … 520 519 521 520 /** 521 Search into media db (only). 522 523 @param query <b>string</b> Search query 524 @return boolean true or false if nothing found 525 */ 526 public function searchMedia($query) 527 { 528 if ($query == '') { 529 return false; 530 } 531 532 $strReq = 533 'SELECT media_file, media_id, media_path, media_title, media_meta, media_dt, '. 534 'media_creadt, media_upddt, media_private, user_id '. 535 'FROM '.$this->table.' '. 536 "WHERE media_path = '".$this->path."' ". 537 "AND (media_title LIKE '%".$this->con->escape($query)."%' ". 538 " OR media_file LIKE '%".$this->con->escape($query)."%' ". 539 " OR media_meta LIKE '<Description>%".$this->con->escape($query)."%</Description>')"; 540 541 if (!$this->core->auth->check('media_admin',$this->core->blog->id)) 542 { 543 $strReq .= 'AND (media_private <> 1 '; 544 545 if ($this->core->auth->userID()) { 546 $strReq .= "OR user_id = '".$this->con->escape($this->core->auth->userID())."'"; 547 } 548 $strReq .= ') '; 549 } 550 551 $rs = $this->con->select($strReq); 552 553 $this->dir = array('dirs' => array(),'files' => array()); 554 $f_res = array(); 555 while ($rs->fetch()) 556 { 557 $fr = $this->fileRecord($rs); 558 if ($fr) { 559 $f_res[] = $fr; 560 } 561 } 562 $this->dir['files'] = $f_res; 563 564 try { 565 usort($this->dir['files'],array($this,'sortFileHandler')); 566 } catch (Exception $e) {} 567 568 return (count($f_res) > 0 ? true : false); 569 } 570 571 /** 522 572 Returns media items attached to a blog post. Result is an array containing 523 573 fileItems objects. -
inc/prepend.php
r3097 r3098 140 140 # Constants 141 141 define('DC_ROOT',path::real(dirname(__FILE__).'/..')); 142 define('DC_VERSION','2. 8.2');142 define('DC_VERSION','2.9-dev'); 143 143 define('DC_DIGESTS',dirname(__FILE__).'/digests'); 144 144 define('DC_L10N_ROOT',dirname(__FILE__).'/../locales'); -
locales/fr/main.po
r3047 r3101 1408 1408 1409 1409 #, php-format 1410 msgid "Choose a file to attach to entry %s by clicking on %s ."1411 msgstr "Choisissez un fichier à attacher au billet %s en cliquant sur %s ."1410 msgid "Choose a file to attach to entry %s by clicking on %s" 1411 msgstr "Choisissez un fichier à attacher au billet %s en cliquant sur %s" 1412 1412 1413 1413 msgid "Attach this file to entry" … … 1415 1415 1416 1416 #, php-format 1417 msgid "Choose a file to insert into entry by clicking on %s." 1418 msgstr "Choisissez un fichier à insérer dans le billet en cliquant sur %s." 1417 msgid "Choose a file to insert into entry by clicking on %s" 1418 msgstr "Choisissez un fichier à insérer dans le billet en cliquant sur %s" 1419 1420 msgid "upload a new file" 1421 msgstr "envoyez un nouveau fichier" 1419 1422 1420 1423 msgid "Remove selected medias" … … 1424 1427 msgstr "Aucun fichier." 1425 1428 1429 msgid "Grid display mode" 1430 msgstr "Afficher sous forme de grille" 1431 1432 msgid "List display mode" 1433 msgstr "Afficher sous forme de liste" 1434 1426 1435 msgid "Sort files:" 1427 1436 msgstr "Trier les fichiers :" … … 1484 1493 msgid "Current settings for medias and images are defined in %s" 1485 1494 msgstr "Les réglages actuels pour les médias et les images sont définis dans les %s" 1495 1496 #, php-format 1497 msgid "%s file found" 1498 msgid_plural "%s files found" 1499 msgstr[0] "%s fichier trouvé" 1500 msgstr[1] "%s fichiers trouvés" 1501 1502 msgid "Will search into media filename (including path), title and description" 1503 msgstr "Recherche parmi les noms des fichiers (incluant leur chemin), les titres et descriptions" 1486 1504 1487 1505 msgid "Blog parameters" … … 3672 3690 msgstr "Format :" 3673 3691 3692 msgid "Thumbnail details" 3693 msgstr "Détails de la miniature" 3694 3695 msgid "Image width:" 3696 msgstr "Largeur de l'image :" 3697 3698 msgid "Image height:" 3699 msgstr "Hauteur de l'image :" 3700 3674 3701 #~ msgid "visual" 3675 3702 #~ msgstr "visuel" -
plugins/aboutConfig/index.php
r2824 r3091 133 133 '<thead>'. 134 134 '<tr>'."\n". 135 ' <th class="nowrap"> Setting ID</th>'."\n".135 ' <th class="nowrap">'.__('Setting ID').'</th>'."\n". 136 136 ' <th>'.__('Value').'</th>'."\n". 137 137 ' <th>'.__('Type').'</th>'."\n". -
plugins/dcCKEditor/_define.php
r3056 r3090 16 16 /* Description*/ "dotclear CKEditor integration", 17 17 /* Author */ "dotclear Team", 18 /* Version */ "1. 0.3",18 /* Version */ "1.1.0", 19 19 array( 20 20 'permissions' => 'usage,contentadmin', -
plugins/dcCKEditor/_install.php
r3052 r3090 25 25 $settings->dcckeditor->put('list_buttons', true, 'boolean', 'Add list buttons?', false, true); 26 26 $settings->dcckeditor->put('textcolor_button', false, 'boolean', 'Add text color button?', false, true); 27 $settings->dcckeditor->put('background_textcolor_button', false, 'boolean', 'Add background text color button?', false, true); 27 28 $settings->dcckeditor->put('cancollapse_button', false, 'boolean', 'Add collapse button?', false, true); 28 29 $settings->dcckeditor->put('format_select', true, 'boolean', 'Add format selection?', false, true); -
plugins/dcCKEditor/_post_config.php
r3056 r3090 96 96 CKEDITOR.plugins.addExternal('media',dotclear.dcckeditor_plugin_url+'/js/ckeditor-plugins/media/'); 97 97 CKEDITOR.plugins.addExternal('img',dotclear.dcckeditor_plugin_url+'/js/ckeditor-plugins/img/'); 98 <?php if (!empty($dcckeditor_textcolor_button) || !empty($dcckeditor_background_textcolor_button)):?> 99 // button add "More Colors..." can be added if colordialog plugin is enabled 100 CKEDITOR.config.colorButton_enableMore = true; 101 <?php endif;?> 98 102 99 103 <?php if (!empty($extraPlugins) && count($extraPlugins)>0) { … … 120 124 // format tags 121 125 <?php if (!empty($dcckeditor_format_tags)):?> 122 format_tags: '<?php echo $dcckeditor_format_tags;?>',126 format_tags: '<?php echo $dcckeditor_format_tags;?>', 123 127 <?php else:?> 124 128 format_tags: 'p;h1;h2;h3;h4;h5;h6;pre;address', … … 178 182 'Source' 179 183 <?php if (!empty($dcckeditor_textcolor_button)):?> 180 ,'TextColor' 184 ,'TextColor' 185 <?php endif;?> 186 <?php if (!empty($dcckeditor_background_textcolor_button)):?> 187 ,'BGColor' 181 188 <?php endif;?> 182 189 ] 183 190 }, 184 {185 name: 'special',186 items: [187 'Maximize'188 ]189 },191 { 192 name: 'special', 193 items: [ 194 'Maximize' 195 ] 196 }, 190 197 <?php // add extra buttons comming from dotclear plugins 191 198 if (!empty($extraPlugins) && count($extraPlugins)>0) { -
plugins/dcCKEditor/inc/_config.php
r3052 r3090 30 30 $dcckeditor_textcolor_button = (empty($_POST['dcckeditor_textcolor_button']))?false:true; 31 31 $core->blog->settings->dcckeditor->put('textcolor_button', $dcckeditor_textcolor_button, 'boolean'); 32 33 $dcckeditor_background_textcolor_button = (empty($_POST['dcckeditor_background_textcolor_button']))?false:true; 34 $core->blog->settings->dcckeditor->put('background_textcolor_button', $dcckeditor_background_textcolor_button, 'boolean'); 32 35 33 36 $dcckeditor_cancollapse_button = (empty($_POST['dcckeditor_cancollapse_button']))?false:true; -
plugins/dcCKEditor/index.php
r3052 r3090 20 20 $dcckeditor_list_buttons = $core->blog->settings->dcckeditor->list_buttons; 21 21 $dcckeditor_textcolor_button = $core->blog->settings->dcckeditor->textcolor_button; 22 $dcckeditor_background_textcolor_button = $core->blog->settings->dcckeditor->background_textcolor_button; 22 23 $dcckeditor_cancollapse_button = $core->blog->settings->dcckeditor->cancollapse_button; 23 24 $dcckeditor_format_select = $core->blog->settings->dcckeditor->format_select; -
plugins/dcCKEditor/locales/fr/main.po
r3055 r3090 50 50 msgstr "Ajouter le bouton pour changer la couleur du texte" 51 51 52 #: tpl/index.tpl:37 53 msgid "Add background text color button" 54 msgstr "Ajouter le bouton pour changer la couleur de fond du texte" 55 52 56 #: tpl/index.tpl:41 53 57 msgid "Add collapse button" -
plugins/dcCKEditor/tpl/index.tpl
r3052 r3090 33 33 <?php echo form::checkbox('dcckeditor_textcolor_button', 1, $dcckeditor_textcolor_button); ?> 34 34 <label class="classic" for="dcckeditor_textcolor_button"> <?php echo __('Add text color button');?></label> 35 </p> 36 <p> 37 <?php echo form::checkbox('dcckeditor_background_textcolor_button', 1, $dcckeditor_background_textcolor_button); ?> 38 <label class="classic" for="dcckeditor_background_textcolor_button"> <?php echo __('Add background text color button');?></label> 35 39 </p> 36 40 <p> -
plugins/maintenance/index.php
r2849 r3073 158 158 html::escapeHTML($task->name())=> '' 159 159 ) 160 ) ;160 ).dcPage::notices(); 161 161 162 162 // content … … 193 193 __('Maintenance') => '' 194 194 ) 195 ) ;195 ).dcPage::notices(); 196 196 197 197 // Simple task (with only a button to start it) -
plugins/pages/class.listpage.php
r2566 r3089 32 32 $html_block = 33 33 '<div class="table-outer">'. 34 '<table class="maximal dragable"><thead><tr>'. 35 '<th colspan="3" scope="col" class="first">'.__('Title').'</th>'. 36 '<th scope="col">'.__('Date').'</th>'. 37 '<th scope="col">'.__('Author').'</th>'. 38 '<th scope="col"><img src="images/comments.png" alt="" title="'.__('Comments').'" /><span class="hidden">'.__('Comments').'</span></th>'. 39 '<th scope="col"><img src="images/trackbacks.png" alt="" title="'.__('Trackbacks').'" /><span class="hidden">'.__('Trackbacks').'</span></th>'. 40 '<th scope="col">'.__('Status').'</th>'. 41 '</tr></thead><tbody id="pageslist">%s</tbody></table></div>'; 34 '<table class="maximal dragable"><thead><tr>'; 35 36 $cols = array( 37 'title' => '<th colspan="3" scope="col" class="first">'.__('Title').'</th>', 38 'date' => '<th scope="col">'.__('Date').'</th>', 39 'author' => '<th scope="col">'.__('Author').'</th>', 40 'comments' => '<th scope="col"><img src="images/comments.png" alt="" title="'.__('Comments'). 41 '" /><span class="hidden">'.__('Comments').'</span></th>', 42 'trackbacks' => '<th scope="col"><img src="images/trackbacks.png" alt="" title="'.__('Trackbacks'). 43 '" /><span class="hidden">'.__('Trackbacks').'</span></th>', 44 'status' => '<th scope="col">'.__('Status').'</th>' 45 ); 46 47 $cols = new ArrayObject($cols); 48 $this->core->callBehavior('adminPagesListHeader',$this->core,$this->rs,$cols); 49 50 $html_block .= '<tr>'.implode(iterator_to_array($cols)). 51 '</tr></thead><tbody id="pageslist">%s</tbody></table></div>'; 42 52 43 53 if ($enclose_block) { … … 102 112 ' id="p'.$this->rs->post_id.'">'; 103 113 104 $res .= 105 '<td class="nowrap handle minimal">'.form::field(array('order['.$this->rs->post_id.']'),2,3,$count+1,'position','',false,'title="'.sprintf(__('position of %s'),html::escapeHTML($this->rs->post_title)).'"').'</td>'. 106 '<td class="nowrap">'. 107 form::checkbox(array('entries[]'),$this->rs->post_id,$checked,'','',!$this->rs->isEditable(),'title="'.__('Select this page').'"').'</td>'. 108 '<td class="maximal" scope="row"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 109 html::escapeHTML($this->rs->post_title).'</a></td>'. 110 '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 111 '<td class="nowrap">'.$this->rs->user_id.'</td>'. 112 '<td class="nowrap count">'.$this->rs->nb_comment.'</td>'. 113 '<td class="nowrap count">'.$this->rs->nb_trackback.'</td>'. 114 '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 115 '</tr>'; 114 $cols = array( 115 'position' => '<td class="nowrap handle minimal">'. 116 form::field(array('order['.$this->rs->post_id.']'),2,3,$count+1,'position','',false,'title="'.sprintf(__('position of %s'),html::escapeHTML($this->rs->post_title)).'"').'</td>', 117 'check' => '<td class="nowrap">'. 118 form::checkbox(array('entries[]'),$this->rs->post_id,$checked,'','',!$this->rs->isEditable(),'title="'.__('Select this page').'"').'</td>', 119 'title' => '<td class="maximal" scope="row"><a href="'. 120 $this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 121 html::escapeHTML($this->rs->post_title).'</a></td>', 122 'date' => '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>', 123 'author' => '<td class="nowrap">'.$this->rs->user_id.'</td>', 124 'comments' => '<td class="nowrap count">'.$this->rs->nb_comment.'</td>', 125 'trackbacks' => '<td class="nowrap count">'.$this->rs->nb_trackback.'</td>', 126 'status' => '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>' 127 ); 128 129 $cols = new ArrayObject($cols); 130 $this->core->callBehavior('adminPagesListValue',$this->core,$this->rs,$cols); 131 132 $res .= implode(iterator_to_array($cols)); 133 $res .= '</tr>'; 116 134 117 135 return $res; -
plugins/userPref/index.php
r2824 r3091 132 132 '<thead>'. 133 133 '<tr>'."\n". 134 ' <th class="nowrap"> Setting ID</th>'."\n".134 ' <th class="nowrap">'.__('Setting ID').'</th>'."\n". 135 135 ' <th>'.__('Value').'</th>'."\n". 136 136 ' <th>'.__('Type').'</th>'."\n".
Note: See TracChangeset
for help on using the changeset viewer.
