Dotclear


Ignore:
Timestamp:
04/15/14 08:57:14 (11 years ago)
Author:
Dsls
Branch:
default
Message:

1st attempt for admin url handler. See #1645, see #1959

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/post.php

    r2694 r2708  
    4141$can_delete = false; 
    4242 
    43 $post_headlink = '<link rel="%s" title="%s" href="post.php?id=%s" />'; 
    44 $post_link = '<a href="post.php?id=%s" title="%s">%s</a>'; 
     43$post_headlink = '<link rel="%s" title="%s" href="'.$core->adminurl->get('admin.post',array('id' => "%s"),'&').'" />'; 
     44$post_link = '<a href="'.$core->adminurl->get('admin.post',array('id' => "%s"),'&').'" title="%s">%s</a>'; 
    4545 
    4646$next_link = $prev_link = $next_headlink = $prev_headlink = null; 
     
    7575 
    7676if (count($formaters_combo)==0 || !$core->auth->getOption('editor') || $core->auth->getOption('editor')=='') { 
    77      dcPage::addNotice("message",  
    78                            sprintf(__('Choose an active editor in %s.'),  
     77     dcPage::addNotice("message", 
     78                           sprintf(__('Choose an active editor in %s.'), 
    7979                                          '<a href="preferences.php#user-options">'.__('your preferences').'</a>' 
    8080                                          ) 
     
    157157} 
    158158 
    159 $comments_actions_page = new dcCommentsActionsPage($core,'post.php',array('id' => $post_id, '_ANCHOR'=>$anchor,'section' => $anchor)); 
     159$comments_actions_page = new dcCommentsActionsPage($core,$core->adminurl->get('admin.post'),array('id' => $post_id, '_ANCHOR'=>$anchor,'section' => $anchor)); 
    160160 
    161161if ($comments_actions_page->process()) { 
     
    184184          if (!$core->error->flag()) { 
    185185               dcPage::addSuccessNotice(__('All pings sent.')); 
    186                http::redirect('post.php?id='.$post_id.'&tb=1'); 
     186               http::redirect($core->adminurl->get( 
     187                    'admin.post', 
     188                    array('id' => $post_id, 'tb'=> '1') 
     189               )); 
    187190          } 
    188191     } 
     
    310313               $core->callBehavior('adminAfterPostUpdate',$cur,$post_id); 
    311314               dcPage::addSuccessNotice (sprintf(__('The post "%s" has been successfully updated'),html::escapeHTML($cur->post_title))); 
    312                http::redirect('post.php?id='.$post_id); 
     315               http::redirect($core->adminurl->get( 
     316                    'admin.post', 
     317                    array('id' => $post_id) 
     318               )); 
    313319          } 
    314320          catch (Exception $e) 
     
    332338 
    333339               dcPage::addSuccessNotice(__('Entry has been successfully created.')); 
    334                http::redirect('post.php?id='.$return_id); 
     340               http::redirect($core->adminurl->get( 
     341                    'admin.post', 
     342                    array('id' => $return_id) 
     343               )); 
    335344          } 
    336345          catch (Exception $e) 
     
    460469          $post_format_field = form::combo('post_format',$formaters_combo,$post_format,'maximal'); 
    461470     } else { 
    462           $post_format_field = sprintf(__('Choose an active editor in %s.'),  
     471          $post_format_field = sprintf(__('Choose an active editor in %s.'), 
    463472          '<a href="preferences.php#user-options">'.__('your preferences').'</a>' 
    464473          ); 
     
    486495                         '<p>'.$post_format_field.'</p>'. 
    487496                         '<p class="format_control control_no_xhtml">'. 
    488                          '<a id="convert-xhtml" class="button'.($post_id && $post_format != 'wiki' ? ' hide' : '').'" href="post.php?id='.$post_id.'&amp;xconv=1">'. 
     497                         '<a id="convert-xhtml" class="button'.($post_id && $post_format != 'wiki' ? ' hide' : '').'" href="'. 
     498                         $core->adminurl->get('admin.post',array('id'=> $post_id,'xconv'=> '1')). 
     499                         '">'. 
    489500                         __('Convert to XHTML').'</a></p></div>')), 
    490501          'metas-box' => array( 
     
    583594 
    584595     echo '<div class="multi-part" title="'.($post_id ? __('Edit entry') : __('New entry')).'" id="edit-entry">'; 
    585      echo '<form action="post.php" method="post" id="entry-form">'; 
     596     echo '<form action="'.$core->adminurl->get('admin.post').'" method="post" id="entry-form">'; 
    586597     echo '<div id="entry-wrapper">'; 
    587598     echo '<div id="entry-content"><div class="constrained">'; 
     
    661672 
    662673     if ($has_action) { 
    663           echo '<form action="post.php" id="form-comments" method="post">'; 
     674          echo '<form action="'.$core->adminurl->get('admin.post').'" id="form-comments" method="post">'; 
    664675     } 
    665676 
Note: See TracChangeset for help on using the changeset viewer.

Sites map