Changeset 2849:97e1b334e54b for inc/admin
- Timestamp:
- 12/16/14 11:46:03 (11 years ago)
- Branch:
- default
- Children:
- 2850:aacd042b1035, 2877:ae86da118440
- Location:
- inc/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.dc.adminurl.php
r2822 r2849 71 71 * @param string $name URL Name 72 72 * @param array $params query string parameters, given as an associative array 73 * @param boolean $urlencode set to true if url may not be encoded 73 74 * @param string $separator separator to use between QS parameters 74 75 * @return string the forged url 75 76 */ 76 public function get($name,$params=array(),$ separator='&')77 public function get($name,$params=array(),$urlencode=true,$separator='&') 77 78 { 78 79 if (!isset($this->urls[$name])) { 79 80 throw new exception ('Unknown URL handler for '.$name); 81 } 82 // compatibility check for old behavior 83 if (!is_bool($urlencode)) { 84 $separator=$urlencode; 85 $urlencode = true; 80 86 } 81 87 $url = $this->urls[$name]; … … 85 91 $u .= '?'.http_build_query($p,'',$separator); 86 92 } 87 return $u ;93 return $urlencode?$u:urldecode($u); 88 94 } 89 95 90 96 /** 91 97 * retrieves a URL (decoded — useful for echoing) given its name, and optional parameters 98 * 99 * @deprecated should use get(...,true,...) instead 92 100 * 93 101 * @param string $name URL Name … … 98 106 public function decode($name,$params=array(),$separator='&') 99 107 { 100 return urldecode($this->get($name,$params, $separator));108 return urldecode($this->get($name,$params,false,$separator)); 101 109 } 102 110 -
inc/admin/lib.dc.page.php
r2817 r2849 925 925 '<script type="text/javascript" src="js/meta-editor.js"></script>'; 926 926 } 927 928 public static function getPF($file) { 929 return $GLOBALS['core']->adminurl->get('load.plugin.file',array('pf' => $file),false); 930 } 927 931 } -
inc/admin/lib.moduleslist.php
r2817 r2849 621 621 '<img alt="%1$s" title="%1$s" src="%2$s" />', 622 622 html::escapeHTML($id), file_exists($module['root'].'/icon.png') ? 623 $this->core->adminurl->decode('load.plugin.file',array('pf' => $id.'/icon.png')) : 'images/module.png'623 dcPage::getPF($id.'/icon.png') : 'images/module.png' 624 624 ).'</td>'; 625 625 } -
inc/admin/lib.pager.php
r2817 r2849 214 214 { 215 215 if ($this->core->auth->check('categories',$this->core->blog->id)) { 216 $cat_link = '<a href="'.$this->core->adminurl-> decode('admin.category',array('id' => '%s')).'">%s</a>';216 $cat_link = '<a href="'.$this->core->adminurl->get('admin.category',array('id' => '%s'),false).'">%s</a>'; 217 217 } else { 218 218 $cat_link = '%2$s';
Note: See TracChangeset
for help on using the changeset viewer.