Changeset 1773:1f2fd319f35e
- Timestamp:
- 09/10/13 11:09:34 (11 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/preferences.php
r1764 r1773 67 67 if (($d = @dir($iconsets_root)) !== false) { 68 68 while (($entry = $d->read()) !== false) { 69 if ($entry != '.' && $entry != '..' && is_dir($iconsets_root.'/'.$entry)) {69 if ($entry != '.' && $entry != '..' && substr($entry, 0, 1) != '.' && is_dir($iconsets_root.'/'.$entry)) { 70 70 $iconsets_combo[$entry] = $entry; 71 71 } … … 553 553 554 554 $count = 0; 555 $user_fav = array(); 555 556 foreach ($ws->dumpPrefs() as $k => $v) { 556 557 // User favorites only … … 566 567 form::checkbox(array('remove[]','fuk-'.$k),$k).__($fav['title']).'</label>'. 567 568 '</li>'; 569 $user_fav[] = $fav['name']; 568 570 } 569 571 } … … 596 598 } 597 599 598 /* 599 echo '<div id="default-favs"><h3>'.__('Default favorites').'</h3>'; 600 echo '<p>'.__('Those favorites are displayed when My Favorites list is empty.').'</p>'; 601 $count = 0; 600 $default_fav = array(); 602 601 foreach ($ws->dumpPrefs() as $k => $v) { 603 602 // Global favorites only … … 605 604 $fav = unserialize($v['value']); 606 605 if (($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)) { 607 if ($count == 0) echo '<ul class="fav-list">'; 608 $count++; 609 echo '<li id="fd-'.$k.'">'. 610 '<img src="'.dc_admin_icon_url($fav['small-icon']).'" alt="" /> '.__($fav['title']).'</li>'; 611 } 612 } 613 } 614 if ($count > 0) echo '</ul>'; 615 echo '</div>'; 616 */ 606 $default_fav[] = $fav['name']; 607 } 608 } 609 } 617 610 618 611 echo '</div>'; # /box my-fav 619 612 620 613 echo '<div class="fieldset" id="available-favs">'; 621 # Available favorites ------------------------------------- Ici, si possible afficher plutôt les Autres favoris disponibles614 # Available favorites 622 615 echo '<h5>'.__('Available favorites').'</h5>'; 623 616 $count = 0; … … 633 626 foreach ($array as $k => $fav) { 634 627 if (($fav[5] == '*') || $core->auth->check($fav[5],$core->blog->id)) { 635 if ($count == 0) echo '<ul class="fav-list">'; 636 $count++; 637 echo '<li id="fa-'.$fav[0].'">'.'<label for="fak-'.$fav[0].'">'. 638 '<img src="'.dc_admin_icon_url($fav[3]).'" alt="" /> '. 639 '<span class="zoom"><img src="'.dc_admin_icon_url($fav[4]).'" alt="" /></span>'. 640 form::checkbox(array('append[]','fak-'.$fav[0]),$k). 641 __($fav[1]).'</label>'.'</li>'; 642 } 643 } 628 if (!in_array($fav[0], $user_fav)) { 629 if ($count == 0) echo '<ul class="fav-list">'; 630 $count++; 631 echo '<li id="fa-'.$fav[0].'">'.'<label for="fak-'.$fav[0].'">'. 632 '<img src="'.dc_admin_icon_url($fav[3]).'" alt="" /> '. 633 '<span class="zoom"><img src="'.dc_admin_icon_url($fav[4]).'" alt="" /></span>'. 634 form::checkbox(array('append[]','fak-'.$fav[0]),$k). 635 __($fav[1]).'</label>'. 636 (in_array($fav[0], $default_fav) ? ' <span class="default-fav">'.__('(default favorite)').'</span>' : ''). 637 '</li>'; 638 } 639 } 640 } 644 641 if ($count > 0) echo '</ul>'; 645 642 echo
Note: See TracChangeset
for help on using the changeset viewer.