Dotclear


Ignore:
Timestamp:
08/19/13 09:55:29 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Parents:
1466:e67efe636ce1 (diff), 1467:917fc08f3a59 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge 2.5 commits into default branch (should be verified)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/index.php

    r1422 r1468  
    5959if (!$core->auth->user_prefs->dashboard->prefExists('quickentry')) { 
    6060     if (!$core->auth->user_prefs->dashboard->prefExists('quickentry',true)) { 
    61           $core->auth->user_prefs->dashboard->put('quickentry',true,'boolean','',null,true); 
    62      } 
    63      $core->auth->user_prefs->dashboard->put('quickentry',true,'boolean'); 
     61          $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean','',null,true); 
     62     } 
     63     $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean'); 
    6464} 
    6565 
     
    309309     if ($core->auth->check('usage,contentadmin',$core->blog->id)) 
    310310     { 
    311           $categories_combo = array('&nbsp;' => ''); 
     311          # Getting categories 
     312          $categories_combo = array(__('(No cat)') => ''); 
    312313          try { 
    313314               $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    314                while ($categories->fetch()) { 
    315                     $categories_combo[] = new formSelectOption( 
    316                          str_repeat('&nbsp;&nbsp;',$categories->level-1). 
    317                          ($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
    318                          $categories->cat_id 
    319                     ); 
     315               if (!$categories->isEmpty()) { 
     316                    while ($categories->fetch()) { 
     317                         $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     318                              str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
     319                              $categories->cat_id 
     320                         ); 
     321                    } 
    320322               } 
    321323          } catch (Exception $e) { } 
     
    333335          form::textarea('post_content',50,7). 
    334336          '</p>'. 
    335           '<p><label for="cat_id" class="classic">'.__('Category:').'</label> '. 
    336           form::combo('cat_id',$categories_combo).'</p>'. 
     337          '<p><label for="cat_id" class="classic">'.__('Category:').' '. 
     338          form::combo('cat_id',$categories_combo).'</label></p>'. 
     339          ($core->auth->check('categories', $core->blog->id) 
     340               ? '<div>'. 
     341               '<p id="new_cat">'.__('Add a new category').'</p>'. 
     342               '<p><label for="new_cat_title">'.__('Title:').' '. 
     343               form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
     344               '<p><label for="new_cat_parent">'.__('Parent:').' '. 
     345               form::combo('new_cat_parent',$categories_combo,'','maximal'). 
     346               '</label></p>'. 
     347               '</div>' 
     348               : ''). 
    337349          '<p><input type="submit" value="'.__('Save').'" name="save" /> '. 
    338350          ($core->auth->check('publish',$core->blog->id) 
  • admin/index.php

    r1421 r1468  
    121121$__dashboard_items = new ArrayObject(array(new ArrayObject,new ArrayObject)); 
    122122 
    123 # Documentation links 
    124123$dashboardItem = 0; 
    125 if ($core->auth->user_prefs->dashboard->doclinks) { 
    126      if (!empty($__resources['doc'])) 
    127      { 
    128           $doc_links = '<h3>'.__('Documentation and support').'</h3><ul>'; 
    129       
    130           foreach ($__resources['doc'] as $k => $v) { 
    131                $doc_links .= '<li><a href="'.$v.'" title="'.$k.' '.__('(external link)').'">'.$k.'</a></li>'; 
    132           } 
    133       
    134           $doc_links .= '</ul>'; 
    135           $__dashboard_items[$dashboardItem][] = $doc_links; 
    136           $dashboardItem++; 
    137      } 
    138 } 
    139124 
    140125if ($core->auth->user_prefs->dashboard->dcnews) { 
     
    180165} 
    181166 
     167# Documentation links 
     168if ($core->auth->user_prefs->dashboard->doclinks) { 
     169     if (!empty($__resources['doc'])) 
     170     { 
     171          $doc_links = '<h3>'.__('Documentation and support').'</h3><ul>'; 
     172      
     173          foreach ($__resources['doc'] as $k => $v) { 
     174               $doc_links .= '<li><a href="'.$v.'" title="'.$k.' '.__('(external link)').'">'.$k.'</a></li>'; 
     175          } 
     176      
     177          $doc_links .= '</ul>'; 
     178          $__dashboard_items[$dashboardItem][] = $doc_links; 
     179          $dashboardItem++; 
     180     } 
     181} 
     182 
    182183$core->callBehavior('adminDashboardItems', $core, $__dashboard_items); 
    183184 
     
    193194     dcPage::jsLoad('js/_index.js'). 
    194195     # --BEHAVIOR-- adminDashboardHeaders 
    195      $core->callBehavior('adminDashboardHeaders') 
     196     $core->callBehavior('adminDashboardHeaders'), 
     197     dcPage::breadcrumb( 
     198          array( 
     199          '<span class="page-title">'.__('Dashboard').' : '.html::escapeHTML($core->blog->name).'</span>' => '' 
     200          ), 
     201          false) 
    196202); 
    197203 
    198 echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Dashboard').'</span></h2>'; 
     204# Dotclear updates notifications 
     205if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) 
     206{ 
     207     $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 
     208     $new_v = $updater->check(DC_VERSION); 
     209     $version_info = $new_v ? $updater->getInfoURL() : ''; 
     210 
     211     if ($updater->getNotify() && $new_v) { 
     212          $message = 
     213          '<div><p>'.sprintf(__('Dotclear %s is available!'),$new_v).'</p> '. 
     214          '<ul><li><strong><a href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a></strong>'. 
     215          '</li><li><a href="update.php?hide_msg=1">'.__('Remind me later').'</a>'. 
     216          ($version_info ? ' </li><li><a href="'.$version_info.'">'.__('information about this version').'</a>' : ''). 
     217          '</li></ul></div>'; 
     218          dcPage::message($message,false,true); 
     219     } 
     220} 
    199221 
    200222if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->blog_count > 1) { 
     
    246268$dashboardItems = ''; 
    247269 
    248 # Dotclear updates notifications 
    249 if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) 
    250 { 
    251      $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 
    252      $new_v = $updater->check(DC_VERSION); 
    253      $version_info = $new_v ? $updater->getInfoURL() : ''; 
    254       
    255      if ($updater->getNotify() && $new_v) { 
    256           $dashboardItems .= 
    257           '<div id="upg-notify" class="static-msg"><p>'.sprintf(__('Dotclear %s is available!'),$new_v).'</p> '. 
    258           '<ul><li><strong><a href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a></strong>'. 
    259           '</li><li><a href="update.php?hide_msg=1">'.__('Remind me later').'</a>'. 
    260           ($version_info ? ' </li><li><a href="'.$version_info.'">'.__('information about this version').'</a>' : ''). 
    261           '</li></ul></div>'; 
    262      } 
    263 } 
    264  
    265270# Errors modules notifications 
    266271if ($core->auth->isSuperAdmin()) 
     
    283288     if ($i->count() > 0) 
    284289     { 
    285           $dashboardItems .= '<div>'; 
     290          $dashboardItems .= '<div class="db-item">'; 
    286291          foreach ($i as $v) { 
    287292               $dashboardItems .= $v; 
     
    317322               } 
    318323          } catch (Exception $e) { } 
    319            
     324      
    320325          echo 
    321326          '<div id="quick">'. 
     
    323328          '<form id="quick-entry" action="post.php" method="post">'. 
    324329          '<fieldset><legend>'.__('New entry').'</legend>'. 
    325           '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:'). 
     330          '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label>'. 
    326331          form::field('post_title',20,255,'','maximal'). 
    327           '</label></p>'. 
     332          '</p>'. 
    328333          '<p class="area"><label class="required" '. 
    329334          'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map