Dotclear


Ignore:
Timestamp:
06/19/14 16:56:47 (11 years ago)
Author:
Dsls
Branch:
default
Message:

One step further towards php hardcoded links annihilation in admin sources, more to come...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/post.php

    r2719 r2720  
    8080 
    8181if (count($formaters_combo)==0 || !$core->auth->getOption('editor') || $core->auth->getOption('editor')=='') { 
    82      dcPage::addNotice("message",  
    83                            sprintf(__('Choose an active editor in %s.'),  
    84                                           '<a href="preferences.php#user-options">'.__('your preferences').'</a>' 
     82     dcPage::addNotice("message", 
     83                           sprintf(__('Choose an active editor in %s.'), 
     84                                          '<a href="'.$core->adminurl->get("admin.user.preferences").'#user-options">'.__('your preferences').'</a>' 
    8585                                          ) 
    8686                           ); 
     
    250250          $core->callBehavior('adminBeforePostDelete',$post_id); 
    251251          $core->blog->delPost($post_id); 
    252           http::redirect('posts.php'); 
     252          http::redirect($core->adminurl->get("admin.posts")); 
    253253     } catch (Exception $e) { 
    254254          $core->error->add($e->getMessage()); 
     
    382382 
    383383$admin_post_behavior = ''; 
    384 if (($core->auth->getOption('editor')==$post_editor)  
     384if (($core->auth->getOption('editor')==$post_editor) 
    385385    && in_array($post_format, $core->getFormaters($core->auth->getOption('editor')))) { 
    386386    $admin_post_behavior = $core->callBehavior('adminPostEditor'); 
     
    401401          array( 
    402402               html::escapeHTML($core->blog->name) => '', 
    403                __('Entries') => 'posts.php', 
     403               __('Entries') => $core->adminurl->get("admin.posts"), 
    404404               ($post_id ? $page_title_edit : $page_title) => '' 
    405405          )) 
     
    464464        $post_format_field = form::combo('post_format',$formaters_combo,"$post_editor:$post_format",'maximal'); 
    465465     } else { 
    466           $post_format_field = sprintf(__('Choose an active editor in %s.'),  
    467           '<a href="preferences.php#user-options">'.__('your preferences').'</a>' 
     466          $post_format_field = sprintf(__('Choose an active editor in %s.'), 
     467          '<a href="'.$core->adminurl->get("admin.user.preferences").'#user-options">'.__('your preferences').'</a>' 
    468468          ); 
    469469          $post_format_field .= form::hidden('post_format','xhtml'); 
     
    616616     } else { 
    617617          echo 
    618           '<a id="post-cancel" href="index.php" class="button" accesskey="c">'.__('Cancel').' (c)</a>'; 
     618          '<a id="post-cancel" href="'.$core->adminurl->get("admin.home").'" class="button" accesskey="c">'.__('Cancel').' (c)</a>'; 
    619619     } 
    620620 
     
    699699     '<h3>'.__('Add a comment').'</h3>'. 
    700700 
    701      '<form action="comment.php" method="post" id="comment-form">'. 
     701     '<form action="'.$core->adminurl->get("admin.comment").'" method="post" id="comment-form">'. 
    702702     '<div class="constrained">'. 
    703703     '<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:').'</label>'. 
     
    751751     # tracbacks actions 
    752752     if ($has_action) { 
    753           echo '<form action="post.php" id="form-trackbacks" method="post">'; 
     753          echo '<form action="'.$core->adminurl->get("admin.post").'" id="form-trackbacks" method="post">'; 
    754754     } 
    755755 
     
    785785          echo 
    786786          '<h3>'.__('Ping blogs').'</h3>'. 
    787           '<form action="post.php?id='.$post_id.'" id="trackback-form" method="post">'. 
     787          '<form action="'.$core->adminurl->get("admin.post",array('id' => $post_id)).'" id="trackback-form" method="post">'. 
    788788          '<p><label for="tb_urls" class="area">'.__('URLs to ping:').'</label>'. 
    789789          form::textarea('tb_urls', 60, 5, $tb_urls). 
     
    798798          (empty($_GET['tb_auto']) ? 
    799799               '&nbsp;&nbsp;<a class="button" href="'. 
    800                'post.php?id='.$post_id.'&amp;tb_auto=1&amp;tb=1'. 
     800               $core->adminurl->get("admin.post",array('id'=> $post_id,'tb_auto' => 1,'tb' => 1)). 
    801801               '">'.__('Auto discover ping URLs').'</a>' 
    802802          : ''). 
     
    868868     while($rs->fetch()) 
    869869     { 
    870           $comment_url = 'comment.php?id='.$rs->comment_id; 
     870          $comment_url = $core->adminurl->get("admin.comment",array('id' => $rs->comment_id)); 
    871871 
    872872          $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 
     
    894894          '<td class="maximal">'.html::escapeHTML($rs->comment_author).'</td>'. 
    895895          '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$rs->comment_dt).'</td>'. 
    896           '<td class="nowrap"><a href="comments.php?ip='.$rs->comment_ip.'">'.$rs->comment_ip.'</a></td>'. 
     896          '<td class="nowrap"><a href="'.$core->adminurl->get("admin.comments",array('ip' => $rs->comment_ip)).'">'.$rs->comment_ip.'</a></td>'. 
    897897          '<td class="nowrap status">'.$img_status.'</td>'. 
    898898          '<td class="nowrap status"><a href="'.$comment_url.'">'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map