Changeset 772:2465bf307591
- Timestamp:
- 11/28/11 10:26:03 (14 years ago)
- Branch:
- default
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/post.php
r747 r772 387 387 if ($post_id) { 388 388 $preview_url = 389 $core->blog->url.$core->url->getBase('preview').'/'. 390 $core->auth->userID().'/'. 389 $core->url->getURLFor('preview',$core->auth->userID().'/'. 391 390 http::browserUID(DC_MASTER_KEY.$core->auth->userID().$core->auth->getInfo('user_pwd')). 392 '/'.$post->post_url ;391 '/'.$post->post_url); 393 392 echo '<a id="post-preview" href="'.$preview_url.'" class="button">'.__('Preview').'</a> '; 394 393 } -
inc/core/class.dc.rs.extensions.php
r270 r772 188 188 public static function getCategoryURL($rs) 189 189 { 190 return $rs->core->blog->url.$rs->core->url->getBase('category').'/'. 191 html::sanitizeURL($rs->cat_url); 190 return $rs->core->url->getURLFor('category',html::sanitizeURL($rs->cat_url)); 192 191 } 193 192 … … 395 394 public static function getTrackbackLink($rs) 396 395 { 397 return $rs->core-> blog->url.$rs->core->url->getBase('trackback').'/'.$rs->post_id;396 return $rs->core->url->getURLFor('trackback',$rs->post_id); 398 397 } 399 398 … … 778 777 $url = date('Y/m',strtotime($rs->dt)); 779 778 780 return $core-> blog->url.$core->url->getBase('archive').'/'.$url;779 return $core->url->getURLFor('archive',$url); 781 780 } 782 781 -
inc/core/class.dc.xmlrpc.php
r696 r772 694 694 'description' => $rs->cat_title, 695 695 'categoryName' => $rs->cat_url, 696 'htmlUrl' => $this->core-> blog->url.$this->core->url->getBase('category').'/'.$rs->cat_url,697 'rssUrl' => $this->core-> blog->url.$this->core->url->getBase('feed').'/category/'.$rs->cat_url.'/rss2'696 'htmlUrl' => $this->core->url->getURLFor('category',$rs->cat_url), 697 'rssUrl' => $this->core->url->getURLFor('feed','category/'.$rs->cat_url.'/rss2') 698 698 ); 699 699 … … 1072 1072 1073 1073 $res = array(); 1074 $url = $this->core-> blog->url.$this->core->url->getBase('tag').'/%s';1075 $f_url = $this->core-> blog->url.$this->core->url->getBase('tag_feed').'/%s';1074 $url = $this->core->url->getURLFor('tag','%s'); 1075 $f_url = $this->core->url->getURLFor('tag_feed','%s'); 1076 1076 while ($tags->fetch()) 1077 1077 { -
inc/public/class.dc.template.php
r570 r772 742 742 { 743 743 $f = $this->getFilters($attr); 744 return '<?php echo '.sprintf($f,'$core-> blog->url.$core->url->getBase("archive")').'; ?>';744 return '<?php echo '.sprintf($f,'$core->url->getURLFor("archive")').'; ?>'; 745 745 } 746 746 … … 796 796 797 797 $f = $this->getFilters($attr); 798 return '<?php echo '.sprintf($f,'$core-> blog->url.$core->url->getBase("feed")."/'.$type.'"').'; ?>';798 return '<?php echo '.sprintf($f,'$core->url->getURLFor("feed","'.$type.'")').'; ?>'; 799 799 } 800 800 … … 881 881 { 882 882 $f = $this->getFilters($attr); 883 return '<?php echo '.sprintf($f,'$core-> blog->url.$core->url->getBase(\'rsd\')').'; ?>';883 return '<?php echo '.sprintf($f,'$core->url->getURLFor(\'rsd\')').'; ?>'; 884 884 } 885 885 … … 1045 1045 1046 1046 $f = $this->getFilters($attr); 1047 return '<?php echo '.sprintf($f,'$core-> blog->url.$core->url->getBase("feed")."/category/".'.1048 '$_ctx->categories->cat_url."/'.$type.'" ').'; ?>';1047 return '<?php echo '.sprintf($f,'$core->url->getURLFor("feed","category/".'. 1048 '$_ctx->categories->cat_url."/'.$type.'")').'; ?>'; 1049 1049 } 1050 1050 … … 1055 1055 { 1056 1056 $f = $this->getFilters($attr); 1057 return '<?php echo '.sprintf($f,'$core-> blog->url.$core->url->getBase("category")."/".$_ctx->categories->cat_url').'; ?>';1057 return '<?php echo '.sprintf($f,'$core->url->getURLFor("category",$_ctx->categories->cat_url)').'; ?>'; 1058 1058 } 1059 1059 … … 1934 1934 { 1935 1935 $f = $this->getFilters($attr); 1936 return '<?php echo '.sprintf($f,'$core-> blog->url.$core->url->getBase("lang").$_ctx->langs->post_lang').'; ?>';1936 return '<?php echo '.sprintf($f,'$core->url->getURLFor("lang",$_ctx->langs->post_lang)').'; ?>'; 1937 1937 } 1938 1938 -
inc/public/lib.tpl.context.php
r687 r772 99 99 } 100 100 101 101 102 # Static methods 102 103 public static function global_filter($str, -
inc/public/lib.urlhandlers.php
r306 r772 15 15 { 16 16 public $args; 17 18 public function getURLFor($type,$value='') { 19 $core =& $GLOBALS['core']; 20 $url = $core->callBehavior("publicGetURLFor",$type,$value); 21 if ($url !== '') { 22 $url = $core->blog->url.$this->getBase($type); 23 if ($value !== '') { 24 $url .= '/'.$value; 25 } 26 } 27 return $url; 28 } 29 30 public function register($type,$url,$representation,$handler) 31 { 32 $core =& $GLOBALS['core']; 33 $t = new ArrayObject(array($type,$url,$representation,$handler)); 34 $core->callBehavior("publicRegisterURL",$t); 35 parent::register($t[0],$t[1],$t[2],$t[3]); 36 } 17 37 18 38 public static function p404()
Note: See TracChangeset
for help on using the changeset viewer.