Dotclear

Changeset 2720:bc400ebfc2e9 for admin


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...

Location:
admin
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • admin/auth.php

    r2566 r2720  
    1616if (isset($_SESSION['sess_user_id'])) 
    1717{ 
    18      http::redirect('index.php'); 
     18     http::redirect($core->adminurl->get('admin.home')); 
    1919} 
    2020 
     
    185185          } 
    186186 
    187           http::redirect('index.php'); 
     187          http::redirect($core->adminurl->get('admin.home')); 
    188188     } 
    189189     catch (Exception $e) 
     
    243243          } 
    244244 
    245           http::redirect('index.php'); 
     245          http::redirect($core->adminurl->get('admin.home')); 
    246246     } 
    247247     else 
     
    326326<body id="dotclear-admin" class="auth"> 
    327327 
    328 <form action="auth.php" method="post" id="login-screen"> 
     328<form action="<?php echo $core->adminurl->get('admin.auth'); ?>" method="post" id="login-screen"> 
    329329<h1><?php echo html::escapeHTML(DC_VENDOR_NAME); ?></h1> 
    330330 
     
    339339if ($akey) 
    340340{ 
    341      echo '<p><a href="auth.php">'.__('Back to login screen').'</a></p>'; 
     341     echo '<p><a href="'.$core->adminurl->get('admin.auth').'">'.__('Back to login screen').'</a></p>'; 
    342342} 
    343343elseif ($recover) 
     
    356356 
    357357     '<div id="issue">'. 
    358      '<p><a href="auth.php">'.__('Back to login screen').'</a></p>'. 
     358     '<p><a href="'.$core->adminurl->get('admin.auth').'">'.__('Back to login screen').'</a></p>'. 
    359359     '</div>'; 
    360360} 
     
    426426          if ($safe_mode) { 
    427427               echo 
    428                '<p><a href="auth.php" id="normal_mode_link">'.__('Get back to normal authentication').'</a></p>'; 
     428               '<p><a href="'.$core->adminurl->get('admin.auth').'" id="normal_mode_link">'.__('Get back to normal authentication').'</a></p>'; 
    429429          } else { 
    430430               echo '<p id="more"><strong>'.__('Connection issue?').'</strong></p>'; 
    431431               if ($core->auth->allowPassChange()) { 
    432                     echo '<p><a href="auth.php?recover=1">'.__('I forgot my password').'</a></p>'; 
     432                    echo '<p><a href="'.$core->adminurl->get('admin.auth',array('recover' => 1)).'">'.__('I forgot my password').'</a></p>'; 
    433433               } 
    434                echo '<p><a href="auth.php?safe_mode=1" id="safe_mode_link">'.__('I want to log in in safe mode').'</a></p>'; 
     434               echo '<p><a href="'.$core->adminurl->get('admin.auth',array('safe_mode' => 1)).'" id="safe_mode_link">'.__('I want to log in in safe mode').'</a></p>'; 
    435435          } 
    436436 
  • admin/blog.php

    r2596 r2720  
    5252          $core->callBehavior('adminAfterBlogCreate',$cur,$blog_id,$blog_settings); 
    5353          dcPage::addSuccessNotice(sprintf(__('Blog "%s" successfully created'), html::escapeHTML($cur->blog_name))); 
    54           http::redirect('blog.php?id='.$cur->blog_id); 
     54          http::redirect($core->adminurl->get("admin.blog", array('id' => $cur->blog_id))); 
    5555     } 
    5656     catch (Exception $e) 
     
    7171               array( 
    7272                    __('System') => '', 
    73                     __('Blogs') => 'blogs.php', 
     73                    __('Blogs') => $core->adminurl->get("admin.blogs"), 
    7474                    __('New blog') => '' 
    7575               )) 
     
    7777 
    7878     echo 
    79      '<form action="blog.php" method="post" id="blog-form">'. 
     79     '<form action="'.$core->adminurl->get("admin.blog").'" method="post" id="blog-form">'. 
    8080 
    8181     '<div>'.$core->formNonce().'</div>'. 
  • admin/blog_del.php

    r2566 r2720  
    4444               dcPage::addSuccessNotice(sprintf(__('Blog "%s" successfully deleted'), html::escapeHTML($blog_name))); 
    4545 
    46                http::redirect('blogs.php'); 
     46               http::redirect($core->adminurl->get("admin.blogs")); 
    4747          } catch (Exception $e) { 
    4848               $core->error->add($e->getMessage()); 
     
    5555          array( 
    5656               __('System') => '', 
    57                __('Blogs') => 'blogs.php', 
     57               __('Blogs') => $core->adminurl->get("admin.blogs"), 
    5858               __('Delete a blog') => '' 
    5959          )) 
     
    6969 
    7070     echo 
    71      '<form action="blog_del.php" method="post">'. 
     71     '<form action="'.$core->adminurl->get("admin.blog.del").'" method="post">'. 
    7272     '<div>'.$core->formNonce().'</div>'. 
    7373     '<p><label for="pwd">'.__('Your password:').'</label> '. 
  • admin/blog_pref.php

    r2702 r2720  
    2626     $blog_url = $core->blog->url; 
    2727 
    28      $action = 'blog_pref.php'; 
    29      $redir = 'blog_pref.php'; 
     28     $action = $core->adminurl->get("admin.blog.pref"); 
     29     $redir = $core->adminurl->get("admin.blog.pref"); 
    3030} 
    3131else 
     
    5555     } 
    5656 
    57      $action = 'blog.php'; 
    58      $redir = 'blog.php?id=%s'; 
     57     $action = $core->adminurl->get("admin.blog"); 
     58     $redir = $core->adminurl->get("admin.blog",array('id' => "%s")); 
    5959} 
    6060 
     
    281281          array( 
    282282               __('System') => '', 
    283                __('Blogs') => 'blogs.php', 
     283               __('Blogs') => $core->adminurl->get("admin.blogs"), 
    284284               __('Blog settings').' : '.html::escapeHTML($blog_name) => '' 
    285285          )); 
     
    615615     { 
    616616          echo 
    617           '<form action="blog_del.php" method="post">'. 
     617          '<form action="'.$core->adminurl->get("admin.blog.del").'" method="post">'. 
    618618          '<p><input type="submit" class="delete" value="'.__('Delete this blog').'" />'. 
    619619          form::hidden(array('blog_id'),$blog_id). 
     
    647647     { 
    648648          if ($core->auth->isSuperAdmin()) { 
    649                $user_url_p = '<a href="user.php?id=%1$s">%1$s</a>'; 
     649               $user_url_p = '<a href="'.$core->adminurl->get("admin.user",array('id' => '%1$s')).'">%1$s</a>'; 
    650650          } else { 
    651651               $user_url_p = '%1$s'; 
     
    719719                         '<form action="users_actions.php" method="post">'. 
    720720                         '<p class="change-user-perm"><input type="submit" class="reset" value="'.__('Change permissions').'" />'. 
    721                          form::hidden(array('redir'),'blog_pref.php?id='.$k). 
     721                         form::hidden(array('redir'),$core->adminurl->get("admin.blog.pref",array('id' => $k))). 
    722722                         form::hidden(array('action'),'perms'). 
    723723                         form::hidden(array('users[]'),$k). 
  • admin/blogs.php

    r2566 r2720  
    9999{ 
    100100     if ($core->auth->isSuperAdmin()) { 
    101           echo '<p class="top-add"><a class="button add" href="blog.php">'.__('Create a new blog').'</a></p>'; 
     101          echo '<p class="top-add"><a class="button add" href="'.$core->adminurl->get("admin.blog").'">'.__('Create a new blog').'</a></p>'; 
    102102     } 
    103103 
    104104     echo 
    105      '<form action="blogs.php" method="get" id="filters-form">'. 
     105     '<form action="'.$core->adminurl->get("admin.blogs").'" method="get" id="filters-form">'. 
    106106     '<h3 class="hidden">'.__('Filter blogs list').'</h3>'. 
    107107 
     
    183183     if ($GLOBALS['core']->auth->isSuperAdmin()) { 
    184184          $edit_link = 
    185           '<a href="blog.php?id='.$blog_id.'"  title="'.sprintf(__('Edit blog settings for %s'),$blog_id).'">'. 
     185          '<a href="'.$core->adminurl->get("admin.blog",array('id' => $blog_id)).'"  title="'.sprintf(__('Edit blog settings for %s'),$blog_id).'">'. 
    186186          '<img src="images/edit-mini.png" alt="'.__('Edit blog settings').'" /> '.$blog_id.'</a> '; 
    187187     } else { 
     
    198198     '<tr class="line">'. 
    199199     '<td class="nowrap">'.$edit_link.'</td>'. 
    200      '<td class="maximal"><a href="index.php?switchblog='.$rs->blog_id.'" '. 
     200     '<td class="maximal"><a href="'.$core->adminurl->get("admin.home",array('switchblog' => $rs->blog_id)).'" '. 
    201201     'title="'.sprintf(__('Switch to blog %s'),$rs->blog_id).'">'. 
    202202     html::escapeHTML($rs->blog_name).'</a></td>'. 
  • admin/categories.php

    r2710 r2720  
    2424     if ($c->isEmpty()) { 
    2525          dcPage::addErrorNotice(__('This category does not exist.')); 
    26           http::redirect('categories.php'); 
     26          http::redirect($core->adminurl->get("admin.categories")); 
    2727     } 
    2828     $name = $c->cat_title; 
     
    3333          $core->blog->delCategory($cat_id); 
    3434          dcPage::addSuccessNotice(sprintf(__('The category "%s" has been successfully deleted.'),html::escapeHTML($name))); 
    35           http::redirect('categories.php'); 
     35          http::redirect($core->adminurl->get("admin.categories")); 
    3636     } catch (Exception $e) { 
    3737          $core->error->add($e->getMessage()); 
     
    6262          dcPage::addSuccessNotice(sprintf(__('The entries have been successfully moved to category "%s"'), 
    6363               html::escapeHTML($name))); 
    64           http::redirect('categories.php'); 
     64          http::redirect($core->adminurl->get("admin.categories")); 
    6565     } catch (Exception $e) { 
    6666          $core->error->add($e->getMessage()); 
     
    7979 
    8080     dcPage::addSuccessNotice(__('Categories have been successfully reordered.')); 
    81      http::redirect('categories.php'); 
     81     http::redirect($core->adminurl->get("admin.categories")); 
    8282} 
    8383 
     
    8989          $core->blog->resetCategoriesOrder(); 
    9090          dcPage::addSuccessNotice(__('Categories order has been successfully reset.')); 
    91           http::redirect('categories.php'); 
     91          http::redirect($core->adminurl->get("admin.categories")); 
    9292     } 
    9393     catch (Exception $e) 
     
    135135 
    136136echo 
    137 '<p class="top-add"><a class="button add" href="category.php">'.__('New category').'</a></p>'; 
     137'<p class="top-add"><a class="button add" href="'.$core->adminurl->get("admin.category").'">'.__('New category').'</a></p>'; 
    138138 
    139139echo 
     
    146146{ 
    147147     echo 
    148      '<form action="categories.php" method="post" id="form-categories">'. 
     148     '<form action="'.$core->adminurl->get("admin.categories").'" method="post" id="form-categories">'. 
    149149     '<div id="categories">'; 
    150150 
     
    165165 
    166166          echo 
    167           '<p class="cat-title"><label class="classic" for="cat_'.$rs->cat_id.'"><a href="category.php?id='.$rs->cat_id.'">'.html::escapeHTML($rs->cat_title).'</a></label> </p>'. 
    168           '<p class="cat-nb-posts">(<a href="posts.php?cat_id='.$rs->cat_id.'">'. 
     167          '<p class="cat-title"><label class="classic" for="cat_'.$rs->cat_id.'"><a href="'. 
     168          $core->adminurl->get("admin.category",array('id' => $rs->cat_id)).'">'.html::escapeHTML($rs->cat_title). 
     169          '</a></label> </p>'. 
     170          '<p class="cat-nb-posts">(<a href="'.$core->adminurl->get("admin.posts",array('cat_id' => $rs->cat_id)).'">'. 
    169171          sprintf(($rs->nb_post > 1 ? __('%d entries') : __('%d entry') ),$rs->nb_post).'</a>'. 
    170172          ', '.__('total:').' '.$rs->nb_total.')</p>'. 
  • admin/category.php

    r2614 r2720  
    8585               $core->blog->setCategoryParent($cat_id,$new_parent); 
    8686               dcPage::addSuccessNotice(__('The category has been successfully moved')); 
    87                http::redirect('categories.php'); 
     87               http::redirect($core->adminurl->get("admin.categories")); 
    8888          } catch (Exception $e) { 
    8989               $core->error->add($e->getMessage()); 
     
    9898          $core->blog->setCategoryPosition($cat_id,(integer) $_POST['cat_sibling'],$_POST['cat_move']); 
    9999          dcPage::addSuccessNotice(__('The category has been successfully moved')); 
    100           http::redirect('categories.php'); 
     100          http::redirect($core->adminurl->get("admin.categories")); 
    101101     } catch (Exception $e) { 
    102102          $core->error->add($e->getMessage()); 
     
    136136               dcPage::addSuccessNotice(__('The category has been successfully updated.')); 
    137137 
    138                http::redirect('category.php?id='.$_POST['id']); 
     138               http::redirect($core->adminurl->get("admin.category",array('id' => $_POST['id']))); 
    139139          } 
    140140          # Create category 
     
    151151               dcPage::addSuccessNotice(sprintf(__('The category "%s" has been successfully created.'), 
    152152                    html::escapeHTML($cur->cat_title))); 
    153                http::redirect('categories.php'); 
     153               http::redirect($core->adminurl->get("admin.categories")); 
    154154          } 
    155155     } 
     
    165165$elements = array( 
    166166     html::escapeHTML($core->blog->name) => '', 
    167      __('Categories') => 'categories.php' 
     167     __('Categories') => $core->adminurl->get("admin.categories") 
    168168     ); 
    169169if ($cat_id) { 
    170170     while($parents->fetch()) { 
    171           $elements[html::escapeHTML($parents->cat_title)] = 'category.php?id='.$parents->cat_id; 
     171          $elements[html::escapeHTML($parents->cat_title)] = $core->adminurl->get("admin.category",array('id'=> $parents->cat_id)); 
    172172     } 
    173173} 
     
    186186 
    187187echo 
    188 '<form action="category.php" method="post" id="category-form">'. 
     188'<form action="'.$core->adminurl->get("admin.category").'" method="post" id="category-form">'. 
    189189'<h3>'.__('Category information').'</h3>'. 
    190190'<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:').'</label> '. 
     
    232232     '<div class="col">'. 
    233233 
    234      '<form action="category.php" method="post" class="fieldset">'. 
     234     '<form action="'.$core->adminurl->get("admin.category").'" method="post" class="fieldset">'. 
    235235     '<h4>'.__('Category parent').'</h4>'. 
    236236     '<p><label for="cat_parent" class="classic">'.__('Parent:').'</label> '. 
     
    244244          echo 
    245245          '<div class="col">'. 
    246           '<form action="category.php" method="post" class="fieldset">'. 
     246          '<form action="'.$core->adminurl->get("admin.category").'" method="post" class="fieldset">'. 
    247247          '<h4>'.__('Category sibling').'</h4>'. 
    248248          '<p><label class="classic" for="cat_sibling">'.__('Move current category').'</label> '. 
  • admin/comment.php

    r2666 r2720  
    133133 
    134134               dcPage::addSuccessNotice(__('Comment has been successfully updated.')); 
    135                http::redirect('comment.php?id='.$comment_id); 
     135               http::redirect($core->adminurl->get("admin.comment",array('id' => $comment_id))); 
    136136          } 
    137137          catch (Exception $e) 
     
    205205 
    206206     echo 
    207      '<form action="comment.php" method="post" id="comment-form">'. 
     207     '<form action="'.$core->adminurl->get("admin.comment").'" method="post" id="comment-form">'. 
    208208     '<div class="fieldset">'. 
    209209     '<h3>'.__('Information collected').'</h3>'. 
    210210     '<p>'.__('IP address:').' '. 
    211      '<a href="comments.php?ip='.$comment_ip.'">'.$comment_ip.'</a></p>'. 
     211     '<a href="'.$core->adminurl->get("admin.comments",array('ip' => $comment_ip)).'">'.$comment_ip.'</a></p>'. 
    212212 
    213213     '<p>'.__('Date:').' '. 
  • admin/comments.php

    r2566 r2720  
    2020          $core->blog->delJunkComments(); 
    2121          $_SESSION['comments_del_spam'] = true; 
    22           http::redirect('comments.php'); 
     22          http::redirect($core->adminurl->get("admin.comments")); 
    2323     } catch (Exception $e) { 
    2424          $core->error->add($e->getMessage()); 
     
    136136} 
    137137 
    138 $comments_actions_page = new dcCommentsActionsPage($core,'comments.php'); 
     138$comments_actions_page = new dcCommentsActionsPage($core,$core->adminurl->get("admin.comments")); 
    139139 
    140140if ($comments_actions_page->process()) { 
     
    191191 
    192192          echo 
    193                '<form action="comments.php" method="post" class="fieldset">'; 
     193               '<form action="'.$core->adminurl->get("admin.comments").'" method="post" class="fieldset">'; 
    194194 
    195195          if (!$with_spam || ($status != -2)) { 
    196196               if ($spam_count == 1) { 
    197197                    echo '<p>'.sprintf(__('You have one spam comment.'),'<strong>'.$spam_count.'</strong>').' '. 
    198                     '<a href="comments.php?status=-2">'.__('Show it.').'</a>.</p>'; 
     198                    '<a href="'.$core->adminurl->get("admin.comments",array('status' => -2)).'">'.__('Show it.').'</a>.</p>'; 
    199199               } elseif ($spam_count > 1) { 
    200200                    echo '<p>'.sprintf(__('You have %s spam comments.'),'<strong>'.$spam_count.'</strong>').' '. 
    201                     '<a href="comments.php?status=-2">'.__('Show them.').'</a>.</p>'; 
     201                    '<a href="'.$core->adminurl->get("admin.comments",array('status' => -2)).'">'.__('Show them.').'</a>.</p>'; 
    202202               } 
    203203          } 
     
    215215 
    216216     echo 
    217      '<form action="comments.php" method="get" id="filters-form">'. 
     217     '<form action="'.$core->adminurl->get("admin.comments").'" method="get" id="filters-form">'. 
    218218     '<h3 class="hidden">'.__('Filter comments and trackbacks list').'</h3>'. 
    219219     '<div class="table">'. 
     
    252252     # Show comments 
    253253     $comment_list->display($page,$nb_per_page, 
    254      '<form action="comments.php" method="post" id="form-comments">'. 
     254     '<form action="'.$core->adminurl->get("admin.comments").'" method="post" id="form-comments">'. 
    255255 
    256256     '%s'. 
  • admin/comments_actions.php

    r2566 r2720  
    2424     $args['redir'] = $_REQUEST['redir']; 
    2525} else { 
    26      $uri = 'comments.php'; 
     26     $uri = $core->adminurl->get("admin.comments"); 
    2727     $args=array(); 
    2828} 
  • admin/help.php

    r2566 r2720  
    7676     $breadcrumb = dcPage::breadcrumb( 
    7777          array( 
    78                __('Global help') => 'help.php', 
     78               __('Global help') => $core->adminurl->get("admin.help"), 
    7979               $content_array['title'] => '' 
    8080          )); 
  • admin/index.php

    r2708 r2720  
    2121     try { 
    2222          $core->setUserDefaultBlog($core->auth->userID(),$core->blog->id); 
    23           http::redirect('index.php'); 
     23          http::redirect($core->adminurl->get("admin.home")); 
    2424     } catch (Exception $e) { 
    2525          $core->error->add($e->getMessage()); 
     
    3636          setcookie('dc_admin',false,-600,'','',DC_ADMIN_SSL); 
    3737     } 
    38      http::redirect('auth.php'); 
     38     http::redirect($core->adminurl->get("admin.auth")); 
    3939     exit; 
    4040} 
     
    193193          echo 
    194194          '<div class="dc-update"><h3>'.sprintf(__('Dotclear %s is available!'),$new_v).'</h3> '. 
    195           '<p><a class="button submit" href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a> '. 
    196           '<a class="button" href="update.php?hide_msg=1">'.__('Remind me later').'</a>'. 
     195          '<p><a class="button submit" href="'.$core->adminurl->get("admin.update").'">'.sprintf(__('Upgrade now'),$new_v).'</a> '. 
     196          '<a class="button" href="'.$core->adminurl->get("admin.update", array('hide_msg' => 1)).'">'.__('Remind me later').'</a>'. 
    197197          ($version_info ? ' </p>'. 
    198198          '<p class="updt-info"><a href="'.$version_info.'">'.__('Information about this version').'</a>' : '').'</p>'. 
     
    203203if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->getBlogCount() > 1) { 
    204204     echo 
    205      '<p><a href="index.php?default_blog=1" class="button">'.__('Make this blog my default blog').'</a></p>'; 
     205     '<p><a href="'.$core->adminurl->get("admin.home",array('default_blog' => 1)).'" class="button">'.__('Make this blog my default blog').'</a></p>'; 
    206206} 
    207207 
  • admin/langs.php

    r2594 r2720  
    5050 
    5151          dcPage::addSuccessNotice(__('Language has been successfully deleted.')); 
    52           http::redirect('langs.php'); 
     52          http::redirect($core->adminurl->get("admin.langs")); 
    5353     } 
    5454     catch (Exception $e) 
     
    9393               dcPage::addSuccessNotice(__('Language has been successfully installed.')); 
    9494          } 
    95           http::redirect('langs.php'); 
     95          http::redirect($core->adminurl->get("admin.langs")); 
    9696     } 
    9797     catch (Exception $e) 
     
    129129               dcPage::addSuccessNotice(__('Language has been successfully installed.')); 
    130130          } 
    131           http::redirect('langs.php'); 
     131          http::redirect($core->adminurl->get("admin.langs")); 
    132132     } 
    133133     catch (Exception $e) 
     
    161161'<p>'.sprintf(__('You can change your user language in your <a href="%1$s">preferences</a> or '. 
    162162'change your blog\'s main language in your <a href="%2$s">blog settings</a>.'), 
    163 'preferences.php','blog_pref.php').'</p>'; 
     163$core->adminurl->get("admin.user.preferences"),$core->adminurl->get("admin.blog.pref")).'</p>'; 
    164164 
    165165echo 
     
    203203          { 
    204204               echo 
    205                '<form action="langs.php" method="post">'. 
     205               '<form action="'.$core->adminurl->get("admin.langs").'" method="post">'. 
    206206               '<div>'. 
    207207               $core->formNonce(). 
     
    234234 
    235235     echo 
    236      '<form method="post" action="langs.php" enctype="multipart/form-data" class="fieldset">'. 
     236     '<form method="post" action="'.$core->adminurl->get("admin.langs").'" enctype="multipart/form-data" class="fieldset">'. 
    237237     '<h4>'.__('Available languages').'</h4>'. 
    238238     '<p>'.sprintf(__('You can download and install a additional language directly from Dotclear.net. '. 
     
    252252     # 'Upload language pack' form 
    253253     echo 
    254      '<form method="post" action="langs.php" enctype="multipart/form-data" class="fieldset">'. 
     254     '<form method="post" action="'.$core->adminurl->get("admin.langs").'" enctype="multipart/form-data" class="fieldset">'. 
    255255     '<h4>'.__('Upload a zip file').'</h4>'. 
    256256     '<p>'.__('You can install languages by uploading zip files.').'</p>'. 
  • admin/media.php

    r2678 r2720  
    7474$popup = (integer) !empty($_GET['popup']); 
    7575 
    76 $page_url = 'media.php?popup='.$popup.'&post_id='.$post_id; 
     76$page_url = $core->adminurl->get("admin.media",array('popup' => $popup,'post_id' => $post_id)); 
    7777if (($temp = $core->callBehavior('adminMediaURL',$page_url))!='') { 
    7878     $page_url = $temp; 
     
    377377$items = array_values(array_merge($dir['dirs'],$dir['files'])); 
    378378 
    379 $fmt_form_media = '<form action="media.php" method="post" id="form-medias">'. 
     379$fmt_form_media = '<form action="'.$core->adminurl->get("admin.media").'" method="post" id="form-medias">'. 
    380380     '<div class="files-group">%s</div>'. 
    381381     '<p class="hidden">'.$core->formNonce() . form::hidden(array('d'),$d).'</p>'; 
     
    403403 
    404404     echo 
    405      '<form action="media.php" method="get" id="filters-form">'. 
     405     '<form action="'.$core->adminurl->get("admin.media").'" method="get" id="filters-form">'. 
    406406     '<p class="two-boxes"><label for="file_sort" class="classic">'.__('Sort files:').'</label> '. 
    407407     form::combo('file_sort',$sort_combo,$file_sort).'</p>'. 
     
    522522          echo 
    523523          '<p class="one-file form-help info">'.__('To send several files at the same time, you can activate the enhanced uploader in'). 
    524           ' <a href="preferences.php?tab=user-options">'.__('My preferences').'</a></p>'; 
     524          ' <a href="'.$core->adminurl->get("admin.user.preferences",array('tab' => 'user-options')).'">'.__('My preferences').'</a></p>'; 
    525525     } 
    526526 
     
    555555if (!$popup) { 
    556556     echo '<div class="info"><p>'.sprintf(__('Current settings for medias and images are defined in %s'), 
    557      '<a href="blog_pref.php#medias-settings">'.__('Blog parameters').'</a>').'</p></div>'; 
     557     '<a href="'.$core->adminurl->get("admin.blog.pref").'#medias-settings">'.__('Blog parameters').'</a>').'</p></div>'; 
    558558} 
    559559 
     
    578578          } 
    579579     } else { 
    580           $link = 'media_item.php?id='.$f->media_id.'&amp;popup='.$popup.'&amp;post_id='.$post_id; 
     580          $link = $core->adminurl->get("admin.media.item", array('id' => $f->media_id,'popup' => $popup,'post_id' => $post_id)); 
    581581        if (($temp = $core->callBehavior('adminMediaURL',$link))!='') { 
    582582            $link = $temp; 
     
    608608     if ($post_id && !$f->d) { 
    609609          $act .= 
    610           '<a class="attach-media" title="'.__('Attach this file to entry').'" href="post_media.php?media_id='.$f->media_id. 
    611           '&amp;post_id='.$post_id.'&amp;attach=1">'. 
     610          '<a class="attach-media" title="'.__('Attach this file to entry').'" href="'. 
     611          $core->adminurl->get("admin.post.media", array('media_id' => $f->media_id, 'post_id' => $post_id,'attach' => 1)). 
     612          '">'. 
    612613          '<img src="images/plus.png" alt="'.__('Attach this file to entry').'"/>'. 
    613614          '</a>'; 
     
    633634 
    634635     if ($f->type == 'audio/mpeg3') { 
    635           $lst .= '<li>'.dcMedia::mp3player($f->file_url,'index.php?pf=player_mp3.swf').'</li>'; 
     636          $lst .= '<li>'.dcMedia::mp3player($f->file_url,$core->adminurl->get("admin.home",array('pf' => 'player_mp3.swf'))).'</li>'; 
    636637     } 
    637638 
  • admin/media_item.php

    r2614 r2720  
    2929$file = null; 
    3030$popup = (integer) !empty($_GET['popup']); 
    31 $page_url = 'media_item.php?popup='.$popup.'&post_id='.$post_id; 
    32 $media_page_url = 'media.php?popup='.$popup.'&post_id='.$post_id; 
     31$page_url = $core->adminurl->get("admin.media.item",array('popup' => $popup,'post_id' => $post_id)); 
     32$media_page_url = $core->adminurl->get("admin.media",array('popup' => $popup,'post_id' => $post_id)); 
    3333 
    3434$id = !empty($_REQUEST['id']) ? (integer) $_REQUEST['id'] : ''; 
     
    469469if ($file->type == 'audio/mpeg3') 
    470470{ 
    471      echo dcMedia::mp3player($file->file_url,'index.php?pf=player_mp3.swf'); 
     471     echo dcMedia::mp3player($file->file_url,$core->adminurl->get("admin.home",array('pf' => 'player_mp3.swf')); 
    472472} 
    473473 
    474474if ($file->type == 'video/x-flv' || $file->type == 'video/mp4' || $file->type == 'video/x-m4v') 
    475475{ 
    476      echo dcMedia::flvplayer($file->file_url,'index.php?pf=player_flv.swf'); 
     476     echo dcMedia::flvplayer($file->file_url,$core->adminurl->get("admin.home",array('pf' => 'player_flv.swf')); 
    477477} 
    478478 
  • 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.'">'. 
  • admin/post_media.php

    r2566 r2720  
    7272 
    7373          echo 
    74           '<form action="post_media.php" method="post">'. 
     74          '<form action="'.$core->adminurl->get("admin.post.media").'" method="post">'. 
    7575          '<p>'.__('Are you sure you want to remove this attachment?').'</p>'. 
    7676          '<p><input type="submit" class="reset" value="'.__('Cancel').'" /> '. 
  • admin/posts.php

    r2566 r2720  
    112112# Actions combo box 
    113113 
    114 $posts_actions_page = new dcPostsActionsPage($core,'posts.php'); 
     114$posts_actions_page = new dcPostsActionsPage($core,$core->adminurl->get("admin.posts")); 
    115115 
    116116if ($posts_actions_page->process()) { 
     
    258258{ 
    259259     echo 
    260      '<p class="top-add"><a class="button add" href="post.php">'.__('New entry').'</a></p>'. 
    261      '<form action="posts.php" method="get" id="filters-form">'. 
     260     '<p class="top-add"><a class="button add" href="'.$core->adminurl->get("admin.post").'">'.__('New entry').'</a></p>'. 
     261     '<form action="'.$core->adminurl->get("admin.posts").'" method="get" id="filters-form">'. 
    262262     '<h3 class="out-of-screen-if-js">'.$form_filter_title.'</h3>'. 
    263263 
     
    302302     # Show posts 
    303303     $post_list->display($page,$nb_per_page, 
    304      '<form action="posts.php" method="post" id="form-entries">'. 
     304     '<form action="'.$core->adminurl->get("admin.posts").'" method="post" id="form-entries">'. 
    305305 
    306306     '%s'. 
  • admin/posts_actions.php

    r2566 r2720  
    2626     $args['redir'] = $_REQUEST['redir']; 
    2727} else { 
    28      $uri = 'posts.php'; 
     28     $uri = $core->adminurl->get("admin.posts"); 
    2929     $args=array(); 
    3030} 
  • admin/preferences.php

    r2694 r2720  
    141141          dcPage::addSuccessNotice(__('Personal information has been successfully updated.')); 
    142142 
    143           http::redirect('preferences.php'); 
     143          http::redirect($core->adminurl->get("admin.user.preferences")); 
    144144     } 
    145145     catch (Exception $e) 
     
    195195 
    196196          dcPage::addSuccessNotice(__('Personal options has been successfully updated.')); 
    197           http::redirect('preferences.php#user-options'); 
     197          http::redirect($core->adminurl->get("admin.user.preferences").'#user-options'); 
    198198     } 
    199199     catch (Exception $e) 
     
    221221 
    222222          dcPage::addSuccessNotice(__('Dashboard options has been successfully updated.')); 
    223           http::redirect('preferences.php#user-favorites'); 
     223          http::redirect($core->adminurl->get("admin.user.preferences").'#user-favorites'); 
    224224     } 
    225225     catch (Exception $e) 
     
    247247          if (!$core->error->flag()) { 
    248248               dcPage::addSuccessNotice(__('Favorites have been successfully added.')); 
    249                http::redirect('preferences.php#user-favorites'); 
     249               http::redirect($core->adminurl->get("admin.user.preferences").'#user-favorites'); 
    250250          } 
    251251     } catch (Exception $e) { 
     
    274274          if (!$core->error->flag()) { 
    275275               dcPage::addSuccessNotice(__('Favorites have been successfully removed.')); 
    276                http::redirect('preferences.php#user-favorites'); 
     276               http::redirect($core->adminurl->get("admin.user.preferences").'#user-favorites'); 
    277277          } 
    278278     } catch (Exception $e) { 
     
    301301     if (!$core->error->flag()) { 
    302302          dcPage::addSuccessNotice(__('Favorites have been successfully updated.')); 
    303           http::redirect('preferences.php#user-favorites'); 
     303          http::redirect($core->adminurl->get("admin.user.preferences").'#user-favorites'); 
    304304     } 
    305305} 
     
    312312     if (!$core->error->flag()) { 
    313313          dcPage::addSuccessNotice(__('Default favorites have been successfully updated.')); 
    314           http::redirect('preferences.php#user-favorites'); 
     314          http::redirect($core->adminurl->get("admin.user.preferences").'#user-favorites'); 
    315315     } 
    316316} 
     
    377377echo 
    378378'<h3>'.__('My profile').'</h3>'. 
    379 '<form action="preferences.php" method="post" id="user-form">'. 
     379'<form action="'.$core->adminurl->get("admin.user.preferences").'" method="post" id="user-form">'. 
    380380 
    381381'<p><label for="user_name">'.__('Last Name:').'</label>'. 
     
    437437 
    438438echo 
    439 '<form action="preferences.php#user-options" method="post" id="opts-forms">'. 
     439'<form action="'.$core->adminurl->get("admin.user.preferences").'#user-options" method="post" id="opts-forms">'. 
    440440'<h3>'.__('My options').'</h3>'; 
    441441 
     
    510510echo '<h3>'.__('My dashboard').'</h3>'; 
    511511 
    512 echo '<form action="preferences.php" method="post" id="favs-form" class="two-boxes odd">'; 
     512echo '<form action="'.$core->adminurl->get("admin.user.preferences").'" method="post" id="favs-form" class="two-boxes odd">'; 
    513513 
    514514echo '<div id="my-favs" class="fieldset"><h4>'.__('My favorites').'</h4>'; 
     
    602602 
    603603echo 
    604 '<form action="preferences.php" method="post" id="db-forms" class="two-boxes even">'. 
     604'<form action="'.$core->adminurl->get("admin.user.preferences").'" method="post" id="db-forms" class="two-boxes even">'. 
    605605 
    606606'<div class="fieldset">'. 
  • admin/search.php

    r2566 r2720  
    7070 
    7171if ($qtype == 'p') { 
    72      $posts_actions_page = new dcPostsActionsPage($core,'search.php',array('q'=>$q,'qtype'=>$qtype)); 
     72     $posts_actions_page = new dcPostsActionsPage($core,$core->adminurl->get("admin.search"),array('q'=>$q,'qtype'=>$qtype)); 
    7373 
    7474     if ($posts_actions_page->process()) { 
     
    7676     } 
    7777} else { 
    78      $comments_actions_page = new dcCommentsActionsPage($core,'search.php',array('q'=>$q,'qtype'=>$qtype)); 
     78     $comments_actions_page = new dcCommentsActionsPage($core,$core->adminurl->get("admin.search"),array('q'=>$q,'qtype'=>$qtype)); 
    7979 
    8080     if ($comments_actions_page->process()) { 
     
    9292 
    9393echo 
    94 '<form action="search.php" method="get">'. 
     94'<form action="'.$core->adminurl->get("admin.search").'" method="get">'. 
    9595'<div class="fieldset"><h3>'.__('Search options').'</h3>'. 
    9696'<p><label for="q">'.__('Query:').' </label>'.form::field('q',30,255,html::escapeHTML($q)).'</p>'. 
     
    116116 
    117117          $post_list->display($page,$nb_per_page, 
    118           '<form action="search.php" method="post" id="form-entries">'. 
     118          '<form action="'.$core->adminurl->get("admin.search").'" method="post" id="form-entries">'. 
    119119 
    120120          '%s'. 
     
    144144 
    145145          $comment_list->display($page,$nb_per_page, 
    146           '<form action="search.php" method="post" id="form-comments">'. 
     146          '<form action="'.$core->adminurl->get("admin.search").'" method="post" id="form-comments">'. 
    147147 
    148148          '%s'. 
  • admin/user.php

    r2566 r2720  
    131131 
    132132               dcPage::addSuccessNotice(__('User has been successfully updated.')); 
    133                http::redirect('user.php?id='.$new_id); 
     133               http::redirect($core->adminurl->get("admin.user",array('id' => $new_id))); 
    134134          } 
    135135          # Add user 
     
    150150               dcPage::addSuccessNotice(__('User has been successfully created.')); 
    151151               if (!empty($_POST['saveplus'])) { 
    152                     http::redirect('user.php'); 
     152                    http::redirect($core->adminurl->get("admin.user")); 
    153153               } else { 
    154                     http::redirect('user.php?id='.$new_id); 
     154                    http::redirect($core->adminurl->get("admin.user",array('id' => $new_id))); 
    155155               } 
    156156          } 
     
    187187          array( 
    188188               __('System') => '', 
    189                __('Users') => 'users.php', 
     189               __('Users') => $core->adminurl->get("admin.users"), 
    190190               $page_title => '' 
    191191          )) 
     
    201201 
    202202echo 
    203 '<form action="user.php" method="post" id="user-form">'. 
     203'<form action="'.$core->adminurl->get("admin.user").'" method="post" id="user-form">'. 
    204204'<div class="two-cols">'. 
    205205 
     
    324324     { 
    325325          echo 
    326           '<form action="users_actions.php" method="post">'. 
     326          '<form action="'.$core->adminurl->get("admin.user.actions").'" method="post">'. 
    327327          '<p><input type="submit" value="'.__('Add new permissions').'" />'. 
    328           form::hidden(array('redir'),'user.php?id='.$user_id). 
     328          form::hidden(array('redir'),$core->adminurl->get("admin.user",array('id' => $user_id))). 
    329329          form::hidden(array('action'),'blogs'). 
    330330          form::hidden(array('users[]'),$user_id). 
     
    347347                    { 
    348348                         echo 
    349                          '<form action="users_actions.php" method="post" class="perm-block">'. 
    350                          '<p class="blog-perm">'.__('Blog:').' <a href="blog.php?id='.html::escapeHTML($k).'">'. 
     349                         '<form action="'.$core->adminurl->get("admin.user.actions").'" method="post" class="perm-block">'. 
     350                         '<p class="blog-perm">'.__('Blog:').' <a href="'. 
     351                         $core->adminurl->get("admin.blog",array('id' => html::escapeHTML($k)))'">'. 
    351352                         html::escapeHTML($v['name']).'</a> ('.html::escapeHTML($k).')</p>'; 
    352353 
     
    360361                         '</ul>'. 
    361362                         '<p class="add-perm"><input type="submit" class="reset" value="'.__('Change permissions').'" />'. 
    362                          form::hidden(array('redir'),'user.php?id='.$user_id). 
     363                         form::hidden(array('redir'),$core->adminurl->get("admin.user",array('id' => $user_id))). 
    363364                         form::hidden(array('action'),'perms'). 
    364365                         form::hidden(array('users[]'),$user_id). 
  • admin/users.php

    r2566 r2720  
    123123 
    124124     echo 
    125      '<p class="top-add"><strong><a class="button add" href="user.php">'.__('New user').'</a></strong></p>'. 
    126      '<form action="users.php" method="get" id="filters-form">'. 
     125     '<p class="top-add"><strong><a class="button add" href="'.$core->adminurl->get("admin.user").'">'.__('New user').'</a></strong></p>'. 
     126     '<form action="'.$core->adminurl->get("admin.users").'" method="get" id="filters-form">'. 
    127127     '<h3 class="out-of-screen-if-js">'.$form_filter_title.'</h3>'. 
    128128 
     
    151151     # Show users 
    152152     $user_list->display($page,$nb_per_page, 
    153      '<form action="users_actions.php" method="post" id="form-users">'. 
     153     '<form action="'.$core->adminurl->get("admin.user.actions").'" method="post" id="form-users">'. 
    154154 
    155155     '%s'. 
  • admin/users_actions.php

    r2566 r2720  
    4949     else 
    5050     { 
    51           $redir = 
    52           'users.php?q='.$_POST['q']. 
    53           '&sortby='.$_POST['sortby']. 
    54           '&order='.$_POST['order']. 
    55           '&page='.$_POST['page']. 
    56           '&nb='.$_POST['nb']; 
     51          $redir = $core->adminurl->get("admin.users", array( 
     52               'q'      => $_POST['q'], 
     53               'sortby' => $_POST['sortby'], 
     54               'order'  => $_POST['order'], 
     55               'page'   => $_POST['page'], 
     56               'nb'     => $_POST['nb'] 
     57          )); 
    5758     } 
    5859 
     
    137138          array( 
    138139               __('System') => '', 
    139                __('Users') => 'users.php', 
     140               __('Users') => $core->adminurl->get("admin.users"), 
    140141               __('Permissions') => '' 
    141142          )); 
     
    144145          array( 
    145146               __('System') => '', 
    146                __('Users') => 'users.php', 
     147               __('Users') => $core->adminurl->get("admin.users"), 
    147148               __('Actions') => '' 
    148149          )); 
     
    195196 
    196197     foreach ($users as $u) { 
    197           $user_list[] = '<a href="user.php?id='.$u.'">'.$u.'</a>'; 
     198          $user_list[] = '<a href="'.$core->adminurl->get("admin.user",array('id' => $u)).'">'.$u.'</a>'; 
    198199     } 
    199200 
     
    211212     { 
    212213          echo 
    213           '<form action="users_actions.php" method="post" id="form-blogs">'. 
     214          '<form action="'.$core->adminurl->get("admin.user.actions").'" method="post" id="form-blogs">'. 
    214215          '<div class="table-outer clear">'. 
    215216          '<table><tr>'. 
     
    256257 
    257258     foreach ($users as $u) { 
    258           $user_list[] = '<a href="user.php?id='.$u.'">'.$u.'</a>'; 
     259          $user_list[] = '<a href="'.$core->adminurl->get("admin.user",array('id' => $u)).'">'.$u.'</a>'; 
    259260     } 
    260261 
     
    264265          implode(', ',$user_list) 
    265266     ).'</p>'. 
    266      '<form id="permissions-form" action="users_actions.php" method="post">'; 
     267     '<form id="permissions-form" action="'.$core->adminurl->get("admin.user.actions").'" method="post">'; 
    267268 
    268269     foreach ($blogs as $b) 
    269270     { 
    270           echo '<h3>'.('Blog:').' <a href="blog.php?id='.html::escapeHTML($b).'">'.html::escapeHTML($b).'</a>'. 
     271          echo '<h3>'.('Blog:').' <a href="'.$core->adminurl->get("admin.blog",array('id' => html::escapeHTML($b))).'">'.html::escapeHTML($b).'</a>'. 
    271272          form::hidden(array('blogs[]'),$b).'</h3>'; 
    272273          $unknown_perms = $user_perm; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map