Changeset 2858:6f06ad9c208a for inc
- Timestamp:
- 12/17/14 12:54:19 (11 years ago)
- Branch:
- 2.7
- Location:
- inc/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.dc.adminurl.php
r2852 r2858 73 73 * @param boolean $urlencode set to true if url may not be encoded 74 74 * @param string $separator separator to use between QS parameters 75 * @param boolean $parametric set to true if url will be used as (s)printf() format. 75 76 * @return string the forged url 76 77 */ 77 public function get($name,$params=array(),$separator='&' )78 public function get($name,$params=array(),$separator='&',$parametric=false) 78 79 { 79 80 if (!isset($this->urls[$name])) { … … 86 87 $u .= '?'.http_build_query($p,'',$separator); 87 88 } 88 return $u; 89 // Dirty hack to get back %s instead of %25s in URLs used with (s)printf(), as http_build_query urlencode() its result. 90 return $parametric ? str_replace('%25s','%s',$u) : $u; 89 91 } 90 91 92 92 93 /** … … 106 107 http::redirect($this->get($name,$params,'&').$suffix); 107 108 } 108 109 109 110 110 /** … … 145 145 } 146 146 147 148 149 147 /** 150 148 * retrieves a URL (decoded — useful for echoing) given its name, and optional parameters 151 149 * 152 * should be used carefully, parameters are no more escaped150 * @deprecated should be used carefully, parameters are no more escaped 153 151 * 154 152 * @param string $name URL Name -
inc/admin/lib.pager.php
r2852 r2858 214 214 { 215 215 if ($this->core->auth->check('categories',$this->core->blog->id)) { 216 $cat_link = '<a href="'.$this->core->adminurl->get('admin.category',array('id' => '%s')).'">%s</a>'; 217 $cat_link = str_replace('%25s','%s',$cat_link); 216 $cat_link = '<a href="'.$this->core->adminurl->get('admin.category',array('id' => '%s'),'&',true).'">%s</a>'; 218 217 } else { 219 218 $cat_link = '%2$s';
Note: See TracChangeset
for help on using the changeset viewer.