Changeset 2720:bc400ebfc2e9 for admin
- Timestamp:
- 06/19/14 16:56:47 (11 years ago)
- Branch:
- default
- Location:
- admin
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/auth.php
r2566 r2720 16 16 if (isset($_SESSION['sess_user_id'])) 17 17 { 18 http::redirect( 'index.php');18 http::redirect($core->adminurl->get('admin.home')); 19 19 } 20 20 … … 185 185 } 186 186 187 http::redirect( 'index.php');187 http::redirect($core->adminurl->get('admin.home')); 188 188 } 189 189 catch (Exception $e) … … 243 243 } 244 244 245 http::redirect( 'index.php');245 http::redirect($core->adminurl->get('admin.home')); 246 246 } 247 247 else … … 326 326 <body id="dotclear-admin" class="auth"> 327 327 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"> 329 329 <h1><?php echo html::escapeHTML(DC_VENDOR_NAME); ?></h1> 330 330 … … 339 339 if ($akey) 340 340 { 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>'; 342 342 } 343 343 elseif ($recover) … … 356 356 357 357 '<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>'. 359 359 '</div>'; 360 360 } … … 426 426 if ($safe_mode) { 427 427 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>'; 429 429 } else { 430 430 echo '<p id="more"><strong>'.__('Connection issue?').'</strong></p>'; 431 431 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>'; 433 433 } 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>'; 435 435 } 436 436 -
admin/blog.php
r2596 r2720 52 52 $core->callBehavior('adminAfterBlogCreate',$cur,$blog_id,$blog_settings); 53 53 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))); 55 55 } 56 56 catch (Exception $e) … … 71 71 array( 72 72 __('System') => '', 73 __('Blogs') => 'blogs.php',73 __('Blogs') => $core->adminurl->get("admin.blogs"), 74 74 __('New blog') => '' 75 75 )) … … 77 77 78 78 echo 79 '<form action=" blog.php" method="post" id="blog-form">'.79 '<form action="'.$core->adminurl->get("admin.blog").'" method="post" id="blog-form">'. 80 80 81 81 '<div>'.$core->formNonce().'</div>'. -
admin/blog_del.php
r2566 r2720 44 44 dcPage::addSuccessNotice(sprintf(__('Blog "%s" successfully deleted'), html::escapeHTML($blog_name))); 45 45 46 http::redirect( 'blogs.php');46 http::redirect($core->adminurl->get("admin.blogs")); 47 47 } catch (Exception $e) { 48 48 $core->error->add($e->getMessage()); … … 55 55 array( 56 56 __('System') => '', 57 __('Blogs') => 'blogs.php',57 __('Blogs') => $core->adminurl->get("admin.blogs"), 58 58 __('Delete a blog') => '' 59 59 )) … … 69 69 70 70 echo 71 '<form action=" blog_del.php" method="post">'.71 '<form action="'.$core->adminurl->get("admin.blog.del").'" method="post">'. 72 72 '<div>'.$core->formNonce().'</div>'. 73 73 '<p><label for="pwd">'.__('Your password:').'</label> '. -
admin/blog_pref.php
r2702 r2720 26 26 $blog_url = $core->blog->url; 27 27 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"); 30 30 } 31 31 else … … 55 55 } 56 56 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")); 59 59 } 60 60 … … 281 281 array( 282 282 __('System') => '', 283 __('Blogs') => 'blogs.php',283 __('Blogs') => $core->adminurl->get("admin.blogs"), 284 284 __('Blog settings').' : '.html::escapeHTML($blog_name) => '' 285 285 )); … … 615 615 { 616 616 echo 617 '<form action=" blog_del.php" method="post">'.617 '<form action="'.$core->adminurl->get("admin.blog.del").'" method="post">'. 618 618 '<p><input type="submit" class="delete" value="'.__('Delete this blog').'" />'. 619 619 form::hidden(array('blog_id'),$blog_id). … … 647 647 { 648 648 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>'; 650 650 } else { 651 651 $user_url_p = '%1$s'; … … 719 719 '<form action="users_actions.php" method="post">'. 720 720 '<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))). 722 722 form::hidden(array('action'),'perms'). 723 723 form::hidden(array('users[]'),$k). -
admin/blogs.php
r2566 r2720 99 99 { 100 100 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>'; 102 102 } 103 103 104 104 echo 105 '<form action=" blogs.php" method="get" id="filters-form">'.105 '<form action="'.$core->adminurl->get("admin.blogs").'" method="get" id="filters-form">'. 106 106 '<h3 class="hidden">'.__('Filter blogs list').'</h3>'. 107 107 … … 183 183 if ($GLOBALS['core']->auth->isSuperAdmin()) { 184 184 $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).'">'. 186 186 '<img src="images/edit-mini.png" alt="'.__('Edit blog settings').'" /> '.$blog_id.'</a> '; 187 187 } else { … … 198 198 '<tr class="line">'. 199 199 '<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)).'" '. 201 201 'title="'.sprintf(__('Switch to blog %s'),$rs->blog_id).'">'. 202 202 html::escapeHTML($rs->blog_name).'</a></td>'. -
admin/categories.php
r2710 r2720 24 24 if ($c->isEmpty()) { 25 25 dcPage::addErrorNotice(__('This category does not exist.')); 26 http::redirect( 'categories.php');26 http::redirect($core->adminurl->get("admin.categories")); 27 27 } 28 28 $name = $c->cat_title; … … 33 33 $core->blog->delCategory($cat_id); 34 34 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")); 36 36 } catch (Exception $e) { 37 37 $core->error->add($e->getMessage()); … … 62 62 dcPage::addSuccessNotice(sprintf(__('The entries have been successfully moved to category "%s"'), 63 63 html::escapeHTML($name))); 64 http::redirect( 'categories.php');64 http::redirect($core->adminurl->get("admin.categories")); 65 65 } catch (Exception $e) { 66 66 $core->error->add($e->getMessage()); … … 79 79 80 80 dcPage::addSuccessNotice(__('Categories have been successfully reordered.')); 81 http::redirect( 'categories.php');81 http::redirect($core->adminurl->get("admin.categories")); 82 82 } 83 83 … … 89 89 $core->blog->resetCategoriesOrder(); 90 90 dcPage::addSuccessNotice(__('Categories order has been successfully reset.')); 91 http::redirect( 'categories.php');91 http::redirect($core->adminurl->get("admin.categories")); 92 92 } 93 93 catch (Exception $e) … … 135 135 136 136 echo 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>'; 138 138 139 139 echo … … 146 146 { 147 147 echo 148 '<form action=" categories.php" method="post" id="form-categories">'.148 '<form action="'.$core->adminurl->get("admin.categories").'" method="post" id="form-categories">'. 149 149 '<div id="categories">'; 150 150 … … 165 165 166 166 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)).'">'. 169 171 sprintf(($rs->nb_post > 1 ? __('%d entries') : __('%d entry') ),$rs->nb_post).'</a>'. 170 172 ', '.__('total:').' '.$rs->nb_total.')</p>'. -
admin/category.php
r2614 r2720 85 85 $core->blog->setCategoryParent($cat_id,$new_parent); 86 86 dcPage::addSuccessNotice(__('The category has been successfully moved')); 87 http::redirect( 'categories.php');87 http::redirect($core->adminurl->get("admin.categories")); 88 88 } catch (Exception $e) { 89 89 $core->error->add($e->getMessage()); … … 98 98 $core->blog->setCategoryPosition($cat_id,(integer) $_POST['cat_sibling'],$_POST['cat_move']); 99 99 dcPage::addSuccessNotice(__('The category has been successfully moved')); 100 http::redirect( 'categories.php');100 http::redirect($core->adminurl->get("admin.categories")); 101 101 } catch (Exception $e) { 102 102 $core->error->add($e->getMessage()); … … 136 136 dcPage::addSuccessNotice(__('The category has been successfully updated.')); 137 137 138 http::redirect( 'category.php?id='.$_POST['id']);138 http::redirect($core->adminurl->get("admin.category",array('id' => $_POST['id']))); 139 139 } 140 140 # Create category … … 151 151 dcPage::addSuccessNotice(sprintf(__('The category "%s" has been successfully created.'), 152 152 html::escapeHTML($cur->cat_title))); 153 http::redirect( 'categories.php');153 http::redirect($core->adminurl->get("admin.categories")); 154 154 } 155 155 } … … 165 165 $elements = array( 166 166 html::escapeHTML($core->blog->name) => '', 167 __('Categories') => 'categories.php'167 __('Categories') => $core->adminurl->get("admin.categories") 168 168 ); 169 169 if ($cat_id) { 170 170 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)); 172 172 } 173 173 } … … 186 186 187 187 echo 188 '<form action=" category.php" method="post" id="category-form">'.188 '<form action="'.$core->adminurl->get("admin.category").'" method="post" id="category-form">'. 189 189 '<h3>'.__('Category information').'</h3>'. 190 190 '<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:').'</label> '. … … 232 232 '<div class="col">'. 233 233 234 '<form action=" category.php" method="post" class="fieldset">'.234 '<form action="'.$core->adminurl->get("admin.category").'" method="post" class="fieldset">'. 235 235 '<h4>'.__('Category parent').'</h4>'. 236 236 '<p><label for="cat_parent" class="classic">'.__('Parent:').'</label> '. … … 244 244 echo 245 245 '<div class="col">'. 246 '<form action=" category.php" method="post" class="fieldset">'.246 '<form action="'.$core->adminurl->get("admin.category").'" method="post" class="fieldset">'. 247 247 '<h4>'.__('Category sibling').'</h4>'. 248 248 '<p><label class="classic" for="cat_sibling">'.__('Move current category').'</label> '. -
admin/comment.php
r2666 r2720 133 133 134 134 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))); 136 136 } 137 137 catch (Exception $e) … … 205 205 206 206 echo 207 '<form action=" comment.php" method="post" id="comment-form">'.207 '<form action="'.$core->adminurl->get("admin.comment").'" method="post" id="comment-form">'. 208 208 '<div class="fieldset">'. 209 209 '<h3>'.__('Information collected').'</h3>'. 210 210 '<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>'. 212 212 213 213 '<p>'.__('Date:').' '. -
admin/comments.php
r2566 r2720 20 20 $core->blog->delJunkComments(); 21 21 $_SESSION['comments_del_spam'] = true; 22 http::redirect( 'comments.php');22 http::redirect($core->adminurl->get("admin.comments")); 23 23 } catch (Exception $e) { 24 24 $core->error->add($e->getMessage()); … … 136 136 } 137 137 138 $comments_actions_page = new dcCommentsActionsPage($core, 'comments.php');138 $comments_actions_page = new dcCommentsActionsPage($core,$core->adminurl->get("admin.comments")); 139 139 140 140 if ($comments_actions_page->process()) { … … 191 191 192 192 echo 193 '<form action=" comments.php" method="post" class="fieldset">';193 '<form action="'.$core->adminurl->get("admin.comments").'" method="post" class="fieldset">'; 194 194 195 195 if (!$with_spam || ($status != -2)) { 196 196 if ($spam_count == 1) { 197 197 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>'; 199 199 } elseif ($spam_count > 1) { 200 200 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>'; 202 202 } 203 203 } … … 215 215 216 216 echo 217 '<form action=" comments.php" method="get" id="filters-form">'.217 '<form action="'.$core->adminurl->get("admin.comments").'" method="get" id="filters-form">'. 218 218 '<h3 class="hidden">'.__('Filter comments and trackbacks list').'</h3>'. 219 219 '<div class="table">'. … … 252 252 # Show comments 253 253 $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">'. 255 255 256 256 '%s'. -
admin/comments_actions.php
r2566 r2720 24 24 $args['redir'] = $_REQUEST['redir']; 25 25 } else { 26 $uri = 'comments.php';26 $uri = $core->adminurl->get("admin.comments"); 27 27 $args=array(); 28 28 } -
admin/help.php
r2566 r2720 76 76 $breadcrumb = dcPage::breadcrumb( 77 77 array( 78 __('Global help') => 'help.php',78 __('Global help') => $core->adminurl->get("admin.help"), 79 79 $content_array['title'] => '' 80 80 )); -
admin/index.php
r2708 r2720 21 21 try { 22 22 $core->setUserDefaultBlog($core->auth->userID(),$core->blog->id); 23 http::redirect( 'index.php');23 http::redirect($core->adminurl->get("admin.home")); 24 24 } catch (Exception $e) { 25 25 $core->error->add($e->getMessage()); … … 36 36 setcookie('dc_admin',false,-600,'','',DC_ADMIN_SSL); 37 37 } 38 http::redirect( 'auth.php');38 http::redirect($core->adminurl->get("admin.auth")); 39 39 exit; 40 40 } … … 193 193 echo 194 194 '<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>'. 197 197 ($version_info ? ' </p>'. 198 198 '<p class="updt-info"><a href="'.$version_info.'">'.__('Information about this version').'</a>' : '').'</p>'. … … 203 203 if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->getBlogCount() > 1) { 204 204 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>'; 206 206 } 207 207 -
admin/langs.php
r2594 r2720 50 50 51 51 dcPage::addSuccessNotice(__('Language has been successfully deleted.')); 52 http::redirect( 'langs.php');52 http::redirect($core->adminurl->get("admin.langs")); 53 53 } 54 54 catch (Exception $e) … … 93 93 dcPage::addSuccessNotice(__('Language has been successfully installed.')); 94 94 } 95 http::redirect( 'langs.php');95 http::redirect($core->adminurl->get("admin.langs")); 96 96 } 97 97 catch (Exception $e) … … 129 129 dcPage::addSuccessNotice(__('Language has been successfully installed.')); 130 130 } 131 http::redirect( 'langs.php');131 http::redirect($core->adminurl->get("admin.langs")); 132 132 } 133 133 catch (Exception $e) … … 161 161 '<p>'.sprintf(__('You can change your user language in your <a href="%1$s">preferences</a> or '. 162 162 '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>'; 164 164 165 165 echo … … 203 203 { 204 204 echo 205 '<form action=" langs.php" method="post">'.205 '<form action="'.$core->adminurl->get("admin.langs").'" method="post">'. 206 206 '<div>'. 207 207 $core->formNonce(). … … 234 234 235 235 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">'. 237 237 '<h4>'.__('Available languages').'</h4>'. 238 238 '<p>'.sprintf(__('You can download and install a additional language directly from Dotclear.net. '. … … 252 252 # 'Upload language pack' form 253 253 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">'. 255 255 '<h4>'.__('Upload a zip file').'</h4>'. 256 256 '<p>'.__('You can install languages by uploading zip files.').'</p>'. -
admin/media.php
r2678 r2720 74 74 $popup = (integer) !empty($_GET['popup']); 75 75 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)); 77 77 if (($temp = $core->callBehavior('adminMediaURL',$page_url))!='') { 78 78 $page_url = $temp; … … 377 377 $items = array_values(array_merge($dir['dirs'],$dir['files'])); 378 378 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">'. 380 380 '<div class="files-group">%s</div>'. 381 381 '<p class="hidden">'.$core->formNonce() . form::hidden(array('d'),$d).'</p>'; … … 403 403 404 404 echo 405 '<form action=" media.php" method="get" id="filters-form">'.405 '<form action="'.$core->adminurl->get("admin.media").'" method="get" id="filters-form">'. 406 406 '<p class="two-boxes"><label for="file_sort" class="classic">'.__('Sort files:').'</label> '. 407 407 form::combo('file_sort',$sort_combo,$file_sort).'</p>'. … … 522 522 echo 523 523 '<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>'; 525 525 } 526 526 … … 555 555 if (!$popup) { 556 556 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>'; 558 558 } 559 559 … … 578 578 } 579 579 } else { 580 $link = 'media_item.php?id='.$f->media_id.'&popup='.$popup.'&post_id='.$post_id;580 $link = $core->adminurl->get("admin.media.item", array('id' => $f->media_id,'popup' => $popup,'post_id' => $post_id)); 581 581 if (($temp = $core->callBehavior('adminMediaURL',$link))!='') { 582 582 $link = $temp; … … 608 608 if ($post_id && !$f->d) { 609 609 $act .= 610 '<a class="attach-media" title="'.__('Attach this file to entry').'" href="post_media.php?media_id='.$f->media_id. 611 '&post_id='.$post_id.'&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 '">'. 612 613 '<img src="images/plus.png" alt="'.__('Attach this file to entry').'"/>'. 613 614 '</a>'; … … 633 634 634 635 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>'; 636 637 } 637 638 -
admin/media_item.php
r2614 r2720 29 29 $file = null; 30 30 $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)); 33 33 34 34 $id = !empty($_REQUEST['id']) ? (integer) $_REQUEST['id'] : ''; … … 469 469 if ($file->type == 'audio/mpeg3') 470 470 { 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')); 472 472 } 473 473 474 474 if ($file->type == 'video/x-flv' || $file->type == 'video/mp4' || $file->type == 'video/x-m4v') 475 475 { 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')); 477 477 } 478 478 -
admin/post.php
r2719 r2720 80 80 81 81 if (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>' 85 85 ) 86 86 ); … … 250 250 $core->callBehavior('adminBeforePostDelete',$post_id); 251 251 $core->blog->delPost($post_id); 252 http::redirect( 'posts.php');252 http::redirect($core->adminurl->get("admin.posts")); 253 253 } catch (Exception $e) { 254 254 $core->error->add($e->getMessage()); … … 382 382 383 383 $admin_post_behavior = ''; 384 if (($core->auth->getOption('editor')==$post_editor) 384 if (($core->auth->getOption('editor')==$post_editor) 385 385 && in_array($post_format, $core->getFormaters($core->auth->getOption('editor')))) { 386 386 $admin_post_behavior = $core->callBehavior('adminPostEditor'); … … 401 401 array( 402 402 html::escapeHTML($core->blog->name) => '', 403 __('Entries') => 'posts.php',403 __('Entries') => $core->adminurl->get("admin.posts"), 404 404 ($post_id ? $page_title_edit : $page_title) => '' 405 405 )) … … 464 464 $post_format_field = form::combo('post_format',$formaters_combo,"$post_editor:$post_format",'maximal'); 465 465 } 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>' 468 468 ); 469 469 $post_format_field .= form::hidden('post_format','xhtml'); … … 616 616 } else { 617 617 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>'; 619 619 } 620 620 … … 699 699 '<h3>'.__('Add a comment').'</h3>'. 700 700 701 '<form action=" comment.php" method="post" id="comment-form">'.701 '<form action="'.$core->adminurl->get("admin.comment").'" method="post" id="comment-form">'. 702 702 '<div class="constrained">'. 703 703 '<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:').'</label>'. … … 751 751 # tracbacks actions 752 752 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">'; 754 754 } 755 755 … … 785 785 echo 786 786 '<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">'. 788 788 '<p><label for="tb_urls" class="area">'.__('URLs to ping:').'</label>'. 789 789 form::textarea('tb_urls', 60, 5, $tb_urls). … … 798 798 (empty($_GET['tb_auto']) ? 799 799 ' <a class="button" href="'. 800 'post.php?id='.$post_id.'&tb_auto=1&tb=1'.800 $core->adminurl->get("admin.post",array('id'=> $post_id,'tb_auto' => 1,'tb' => 1)). 801 801 '">'.__('Auto discover ping URLs').'</a>' 802 802 : ''). … … 868 868 while($rs->fetch()) 869 869 { 870 $comment_url = 'comment.php?id='.$rs->comment_id;870 $comment_url = $core->adminurl->get("admin.comment",array('id' => $rs->comment_id)); 871 871 872 872 $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; … … 894 894 '<td class="maximal">'.html::escapeHTML($rs->comment_author).'</td>'. 895 895 '<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>'. 897 897 '<td class="nowrap status">'.$img_status.'</td>'. 898 898 '<td class="nowrap status"><a href="'.$comment_url.'">'. -
admin/post_media.php
r2566 r2720 72 72 73 73 echo 74 '<form action=" post_media.php" method="post">'.74 '<form action="'.$core->adminurl->get("admin.post.media").'" method="post">'. 75 75 '<p>'.__('Are you sure you want to remove this attachment?').'</p>'. 76 76 '<p><input type="submit" class="reset" value="'.__('Cancel').'" /> '. -
admin/posts.php
r2566 r2720 112 112 # Actions combo box 113 113 114 $posts_actions_page = new dcPostsActionsPage($core, 'posts.php');114 $posts_actions_page = new dcPostsActionsPage($core,$core->adminurl->get("admin.posts")); 115 115 116 116 if ($posts_actions_page->process()) { … … 258 258 { 259 259 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">'. 262 262 '<h3 class="out-of-screen-if-js">'.$form_filter_title.'</h3>'. 263 263 … … 302 302 # Show posts 303 303 $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">'. 305 305 306 306 '%s'. -
admin/posts_actions.php
r2566 r2720 26 26 $args['redir'] = $_REQUEST['redir']; 27 27 } else { 28 $uri = 'posts.php';28 $uri = $core->adminurl->get("admin.posts"); 29 29 $args=array(); 30 30 } -
admin/preferences.php
r2694 r2720 141 141 dcPage::addSuccessNotice(__('Personal information has been successfully updated.')); 142 142 143 http::redirect( 'preferences.php');143 http::redirect($core->adminurl->get("admin.user.preferences")); 144 144 } 145 145 catch (Exception $e) … … 195 195 196 196 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'); 198 198 } 199 199 catch (Exception $e) … … 221 221 222 222 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'); 224 224 } 225 225 catch (Exception $e) … … 247 247 if (!$core->error->flag()) { 248 248 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'); 250 250 } 251 251 } catch (Exception $e) { … … 274 274 if (!$core->error->flag()) { 275 275 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'); 277 277 } 278 278 } catch (Exception $e) { … … 301 301 if (!$core->error->flag()) { 302 302 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'); 304 304 } 305 305 } … … 312 312 if (!$core->error->flag()) { 313 313 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'); 315 315 } 316 316 } … … 377 377 echo 378 378 '<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">'. 380 380 381 381 '<p><label for="user_name">'.__('Last Name:').'</label>'. … … 437 437 438 438 echo 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">'. 440 440 '<h3>'.__('My options').'</h3>'; 441 441 … … 510 510 echo '<h3>'.__('My dashboard').'</h3>'; 511 511 512 echo '<form action=" preferences.php" method="post" id="favs-form" class="two-boxes odd">';512 echo '<form action="'.$core->adminurl->get("admin.user.preferences").'" method="post" id="favs-form" class="two-boxes odd">'; 513 513 514 514 echo '<div id="my-favs" class="fieldset"><h4>'.__('My favorites').'</h4>'; … … 602 602 603 603 echo 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">'. 605 605 606 606 '<div class="fieldset">'. -
admin/search.php
r2566 r2720 70 70 71 71 if ($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)); 73 73 74 74 if ($posts_actions_page->process()) { … … 76 76 } 77 77 } 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)); 79 79 80 80 if ($comments_actions_page->process()) { … … 92 92 93 93 echo 94 '<form action=" search.php" method="get">'.94 '<form action="'.$core->adminurl->get("admin.search").'" method="get">'. 95 95 '<div class="fieldset"><h3>'.__('Search options').'</h3>'. 96 96 '<p><label for="q">'.__('Query:').' </label>'.form::field('q',30,255,html::escapeHTML($q)).'</p>'. … … 116 116 117 117 $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">'. 119 119 120 120 '%s'. … … 144 144 145 145 $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">'. 147 147 148 148 '%s'. -
admin/user.php
r2566 r2720 131 131 132 132 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))); 134 134 } 135 135 # Add user … … 150 150 dcPage::addSuccessNotice(__('User has been successfully created.')); 151 151 if (!empty($_POST['saveplus'])) { 152 http::redirect( 'user.php');152 http::redirect($core->adminurl->get("admin.user")); 153 153 } else { 154 http::redirect( 'user.php?id='.$new_id);154 http::redirect($core->adminurl->get("admin.user",array('id' => $new_id))); 155 155 } 156 156 } … … 187 187 array( 188 188 __('System') => '', 189 __('Users') => 'users.php',189 __('Users') => $core->adminurl->get("admin.users"), 190 190 $page_title => '' 191 191 )) … … 201 201 202 202 echo 203 '<form action=" user.php" method="post" id="user-form">'.203 '<form action="'.$core->adminurl->get("admin.user").'" method="post" id="user-form">'. 204 204 '<div class="two-cols">'. 205 205 … … 324 324 { 325 325 echo 326 '<form action=" users_actions.php" method="post">'.326 '<form action="'.$core->adminurl->get("admin.user.actions").'" method="post">'. 327 327 '<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))). 329 329 form::hidden(array('action'),'blogs'). 330 330 form::hidden(array('users[]'),$user_id). … … 347 347 { 348 348 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)))'">'. 351 352 html::escapeHTML($v['name']).'</a> ('.html::escapeHTML($k).')</p>'; 352 353 … … 360 361 '</ul>'. 361 362 '<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))). 363 364 form::hidden(array('action'),'perms'). 364 365 form::hidden(array('users[]'),$user_id). -
admin/users.php
r2566 r2720 123 123 124 124 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">'. 127 127 '<h3 class="out-of-screen-if-js">'.$form_filter_title.'</h3>'. 128 128 … … 151 151 # Show users 152 152 $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">'. 154 154 155 155 '%s'. -
admin/users_actions.php
r2566 r2720 49 49 else 50 50 { 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 )); 57 58 } 58 59 … … 137 138 array( 138 139 __('System') => '', 139 __('Users') => 'users.php',140 __('Users') => $core->adminurl->get("admin.users"), 140 141 __('Permissions') => '' 141 142 )); … … 144 145 array( 145 146 __('System') => '', 146 __('Users') => 'users.php',147 __('Users') => $core->adminurl->get("admin.users"), 147 148 __('Actions') => '' 148 149 )); … … 195 196 196 197 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>'; 198 199 } 199 200 … … 211 212 { 212 213 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">'. 214 215 '<div class="table-outer clear">'. 215 216 '<table><tr>'. … … 256 257 257 258 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>'; 259 260 } 260 261 … … 264 265 implode(', ',$user_list) 265 266 ).'</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">'; 267 268 268 269 foreach ($blogs as $b) 269 270 { 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>'. 271 272 form::hidden(array('blogs[]'),$b).'</h3>'; 272 273 $unknown_perms = $user_perm;
Note: See TracChangeset
for help on using the changeset viewer.