Dotclear

Changeset 2921:f73344947866


Ignore:
Timestamp:
01/18/15 08:04:21 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.7
Message:

Cope with $n%s in parametric URLs, fixes #2057

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/blog_pref.php

    r2858 r2921  
    685685     { 
    686686          if ($core->auth->isSuperAdmin()) { 
    687                $user_url_p = '<a href="'.$core->adminurl->get("admin.user",array('id' => '%1$s')).'">%1$s</a>'; 
     687               $user_url_p = '<a href="'.$core->adminurl->get("admin.user",array('id' => '%1$s'),'&amp;',true).'">%1$s</a>'; 
    688688          } else { 
    689689               $user_url_p = '%1$s'; 
  • inc/admin/lib.dc.adminurl.php

    r2873 r2921  
    8787               $u .= '?'.http_build_query($p,'',$separator); 
    8888          } 
    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          if ($parametric) { 
     90               // Dirty hack to get back %[n$]s instead of %25[{0..9}%24]s in URLs used with (s)printf(), as http_build_query urlencode() its result. 
     91               $u = preg_replace('/\%25(([0-9])+?\%24)*?s/','%$2s',$u); 
     92          } 
     93          return $u; 
    9194     } 
    9295 
Note: See TracChangeset for help on using the changeset viewer.

Sites map