Dotclear


Ignore:
Timestamp:
09/04/13 14:28:18 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Children:
1719:b8c48f380463, 1720:f23f530dfb4a
Parents:
1717:9df047961e9c (diff), 1710:f6287a0366e3 (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 branch into default

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/index.php

    r1708 r1718  
    6363     $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean'); 
    6464} 
     65 
     66// Handle folded/unfolded sections in admin from user preferences 
     67$ws = $core->auth->user_prefs->addWorkspace('toggles'); 
     68if (!$core->auth->user_prefs->toggles->prefExists('unfolded_sections')) { 
     69     $core->auth->user_prefs->toggles->put('unfolded_sections','','string','Folded sections in admin',null,true); 
     70} 
     71 
    6572 
    6673# Dashboard icons 
     
    121128$__dashboard_items = new ArrayObject(array(new ArrayObject,new ArrayObject)); 
    122129 
    123 # Documentation links 
    124130$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 } 
    139131 
    140132if ($core->auth->user_prefs->dashboard->dcnews) { 
     
    180172} 
    181173 
     174# Documentation links 
     175if ($core->auth->user_prefs->dashboard->doclinks) { 
     176     if (!empty($__resources['doc'])) 
     177     { 
     178          $doc_links = '<h3>'.__('Documentation and support').'</h3><ul>'; 
     179      
     180          foreach ($__resources['doc'] as $k => $v) { 
     181               $doc_links .= '<li><a href="'.$v.'" title="'.$k.' '.__('(external link)').'">'.$k.'</a></li>'; 
     182          } 
     183      
     184          $doc_links .= '</ul>'; 
     185          $__dashboard_items[$dashboardItem][] = $doc_links; 
     186          $dashboardItem++; 
     187     } 
     188} 
     189 
    182190$core->callBehavior('adminDashboardItems', $core, $__dashboard_items); 
    183191 
     
    193201     dcPage::jsLoad('js/_index.js'). 
    194202     # --BEHAVIOR-- adminDashboardHeaders 
    195      $core->callBehavior('adminDashboardHeaders') 
     203     $core->callBehavior('adminDashboardHeaders'), 
     204     dcPage::breadcrumb( 
     205          array( 
     206          '<span class="page-title">'.__('Dashboard').' : '.html::escapeHTML($core->blog->name).'</span>' => '' 
     207          ), 
     208          false) 
    196209); 
    197210 
    198 echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Dashboard').'</span></h2>'; 
     211# Dotclear updates notifications 
     212if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) 
     213{ 
     214     $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 
     215     $new_v = $updater->check(DC_VERSION); 
     216     $version_info = $new_v ? $updater->getInfoURL() : ''; 
     217 
     218     if ($updater->getNotify() && $new_v) { 
     219          echo 
     220          '<div class="dc-update"><h3>'.sprintf(__('Dotclear %s is available!'),$new_v).'</h3> '. 
     221          '<p><a class="button submit" href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a> '. 
     222          '<a href="update.php?hide_msg=1">'.__('Remind me later').'</a>'. 
     223          ($version_info ? ' </p>'. 
     224          '<p><a href="'.$version_info.'" class="info">'.__('information about this version').'</a>' : '').'</p>'. 
     225          '</div>'; 
     226     } 
     227} 
    199228 
    200229if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->blog_count > 1) { 
     
    204233 
    205234if ($core->blog->status == 0) { 
    206      echo '<p class="static-msg">'.__('This blog is offline').'</p>'; 
     235     echo '<p class="static-msg">'.__('This blog is offline').'.</p>'; 
    207236} elseif ($core->blog->status == -1) { 
    208      echo '<p class="static-msg">'.__('This blog is removed').'</p>'; 
     237     echo '<p class="static-msg">'.__('This blog is removed').'.</p>'; 
    209238} 
    210239 
     
    313342     if ($i->count() > 0) 
    314343     { 
    315           $dashboardItems .= '<div>'; 
     344          $dashboardItems .= '<div class="db-item">'; 
    316345          foreach ($i as $v) { 
    317346               $dashboardItems .= $v; 
     
    347376               } 
    348377          } catch (Exception $e) { } 
    349            
     378      
    350379          echo 
    351380          '<div id="quick">'. 
    352381          '<h3>'.__('Quick entry').'</h3>'. 
    353           '<form id="quick-entry" action="post.php" method="post">'. 
    354           '<fieldset><legend>'.__('New entry').'</legend>'. 
    355           '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:'). 
     382          '<form id="quick-entry" action="post.php" method="post" class="fieldset">'. 
     383          '<h4>'.__('New entry').'</h4>'. 
     384          '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label>'. 
    356385          form::field('post_title',20,255,'','maximal'). 
    357           '</label></p>'. 
     386          '</p>'. 
    358387          '<p class="area"><label class="required" '. 
    359388          'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 
    360389          form::textarea('post_content',50,7). 
    361390          '</p>'. 
    362           '<p><label for="cat_id" class="classic">'.__('Category:').' '. 
    363           form::combo('cat_id',$categories_combo).'</label></p>'. 
     391          '<p><label for="cat_id" class="classic">'.__('Category:').'</label> '. 
     392          form::combo('cat_id',$categories_combo).'</p>'. 
    364393          ($core->auth->check('categories', $core->blog->id) 
    365394               ? '<div>'. 
    366                '<p id="new_cat">'.__('Add a new category').'</p>'. 
     395               '<p id="new_cat" class="q-cat">'.__('Add a new category').'</p>'. 
     396               '<p class="q-cat"><label for="new_cat_title">'.__('Title:').'</label> '. 
     397               form::field('new_cat_title',30,255,'','').'</p>'. 
     398               '<p class="q-cat"><label for="new_cat_parent">'.__('Parent:').'</label> '. 
     399               form::combo('new_cat_parent',$categories_combo,'',''). 
     400               '</p>'. 
    367401               '<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'. 
    368                '<p><label for="new_cat_title">'.__('Title:').' '. 
    369                form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
    370                '<p><label for="new_cat_parent">'.__('Parent:').' '. 
    371                form::combo('new_cat_parent',$categories_combo,'','maximal'). 
    372                '</label></p>'. 
    373402               '</div>' 
    374403               : ''). 
     
    384413          form::hidden('post_notes',''). 
    385414          '</p>'. 
    386           '</fieldset>'. 
    387415          '</form>'. 
    388416          '</div>'; 
  • admin/index.php

    r1699 r1718  
    257257 
    258258# Check cache directory 
    259 if (!is_dir(DC_TPL_CACHE)) { 
    260      $err[] = '<p>'.sprintf(__('Cache directory %s does not exist.'),DC_TPL_CACHE).'</p>'; 
    261 } else if (!is_writable(DC_TPL_CACHE)) { 
    262      $err[] = '<p>'.sprintf(__('Cache directory %s is not writable.'),DC_TPL_CACHE).'</p>'; 
     259if ( $core->auth->isSuperAdmin() ) { 
     260     if (!is_dir(DC_TPL_CACHE) || !is_writable(DC_TPL_CACHE)) { 
     261          $err[] = '<p>'.__("The cache directory does not exist or is not writable. You must create this directory with sufficient rights and affect this location to \"DC_TPL_CACHE\" in inc/config.php file.").'</p>'; 
     262     } 
     263} else { 
     264     if (!is_dir(DC_TPL_CACHE) || !is_writable(DC_TPL_CACHE)) { 
     265          $err[] = '<p>'.__("The cache directory does not exist or is not writable. You should contact your administrator.").'</p>'; 
     266     } 
    263267} 
    264268 
    265269# Check public directory 
    266 if (!is_dir($core->blog->public_path)) { 
    267      $err[] = '<p>'.sprintf(__('Directory %s does not exist.'),$core->blog->public_path).'</p>'; 
    268 } else if (!is_writable($core->blog->public_path)) { 
    269      $err[] = '<p>'.sprintf(__('Directory %s is not writable.'),$core->blog->public_path).'</p>'; 
     270if ( $core->auth->isSuperAdmin() ) { 
     271     if (!is_dir($core->blog->public_path) || !is_writable($core->blog->public_path)) { 
     272          $err[] = '<p>'.__("There is no writable directory /public/ at the location set in about:config \"public_path\". You must create this directory with sufficient rights (or change this setting).").'</p>'; 
     273     } 
     274} else { 
     275     if (!is_dir($core->blog->public_path) || !is_writable($core->blog->public_path)) { 
     276          $err[] = '<p>'.__("There is no writable root directory for the media manager. You should contact your administrator.").'</p>'; 
     277     } 
    270278} 
    271279 
Note: See TracChangeset for help on using the changeset viewer.

Sites map