Dotclear


Ignore:
Timestamp:
12/16/14 21:59:13 (11 years ago)
Author:
Dsls
Branch:
2.7
Message:

Tuned redirections and admin urls management, should work with media & attachments now
Added adminurl->redirect to avoid confusion in "when to use & and when not to"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/post.php

    r2849 r2852  
    4141$can_delete = false; 
    4242 
    43 $post_headlink = '<link rel="%s" title="%s" href="'.$core->adminurl->get('admin.post',array('id' => "%s"),false,'&').'" />'; 
    44 $post_link = '<a href="'.$core->adminurl->get('admin.post',array('id' => "%s"),false,'&').'" title="%s">%s</a>'; 
    45  
     43$post_headlink = '<link rel="%s" title="%s" href="'.$core->adminurl->get('admin.post',array('id' => "%s")).'" />'; 
     44$post_headlink = str_replace('%25s','%s',$post_headlink); 
     45$post_link = '<a href="'.$core->adminurl->get('admin.post',array('id' => "%s")).'" title="%s">%s</a>'; 
     46$post_link = str_replace('%25s','%s',$post_link); 
    4647$next_link = $prev_link = $next_headlink = $prev_headlink = null; 
    4748 
     
    178179          if (!$core->error->flag()) { 
    179180               dcPage::addSuccessNotice(__('All pings sent.')); 
    180                http::redirect($core->adminurl->get( 
     181               $core->adminurl->redirect( 
    181182                    'admin.post', 
    182183                    array('id' => $post_id, 'tb'=> '1') 
    183                )); 
     184               ); 
    184185          } 
    185186     } 
     
    243244          $core->callBehavior('adminBeforePostDelete',$post_id); 
    244245          $core->blog->delPost($post_id); 
    245           http::redirect($core->adminurl->get("admin.posts")); 
     246          $core->adminurl->redirect("admin.posts"); 
    246247     } catch (Exception $e) { 
    247248          $core->error->add($e->getMessage()); 
     
    304305               $core->callBehavior('adminAfterPostUpdate',$cur,$post_id); 
    305306               dcPage::addSuccessNotice (sprintf(__('The post "%s" has been successfully updated'),html::escapeHTML($cur->post_title))); 
    306                http::redirect($core->adminurl->get( 
     307               $core->adminurl->redirect( 
    307308                    'admin.post', 
    308309                    array('id' => $post_id) 
    309                )); 
     310               ); 
    310311          } catch (Exception $e) { 
    311312               $core->error->add($e->getMessage()); 
     
    324325 
    325326               dcPage::addSuccessNotice(__('Entry has been successfully created.')); 
    326                http::redirect($core->adminurl->get( 
     327               $core->adminurl->redirect( 
    327328                    'admin.post', 
    328329                    array('id' => $return_id) 
    329                )); 
     330               ); 
    330331          } catch (Exception $e) { 
    331332               $core->error->add($e->getMessage()); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map