Changeset 772:2465bf307591 for inc/public
- Timestamp:
- 11/28/11 10:26:03 (14 years ago)
- Branch:
- default
- Location:
- inc/public
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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.