mirror of
https://github.com/e107inc/e107.git
synced 2025-01-16 20:28:28 +01:00
Fixed #545
This commit is contained in:
parent
39e3e6ae97
commit
379d90b1b0
@ -34,19 +34,19 @@ class core_user_rewrite_url extends eUrlConfig
|
||||
'rules' => array(
|
||||
// simple matches first - PERFORMANCE
|
||||
'' => array('myprofile/view', 'defaultVars' => array('id' => 0)),
|
||||
'Settings' => array('myprofile/edit', 'defaultVars' => array('id' => 0), 'legacy' => '{e_BASE}usersettings.php'),
|
||||
'List' => array('profile/list', 'allowVars' => array('page'), 'legacyQuery' => '{page}'),
|
||||
'Login' => array('login/index', 'legacy' => '{e_BASE}login.php'),
|
||||
'Register' => array('register/index', 'legacy' => '{e_BASE}signup.php'),
|
||||
'settings' => array('myprofile/edit', 'defaultVars' => array('id' => 0), 'legacy' => '{e_BASE}usersettings.php'),
|
||||
'list' => array('profile/list', 'allowVars' => array('page'), 'legacyQuery' => '{page}'),
|
||||
'login' => array('login/index', 'legacy' => '{e_BASE}login.php'),
|
||||
'register' => array('register/index', 'legacy' => '{e_BASE}signup.php'),
|
||||
|
||||
// Regex involved next
|
||||
//'<id:[\d]+>' => array('profile/view', 'legacyQuery' => 'id.{id}'),
|
||||
'Edit/<id:[\d]+>' => array('profile/edit', 'legacy' => '{e_BASE}usersettings.php', 'legacyQuery' => '{id}'),
|
||||
'edit/<id:[\d]+>' => array('profile/edit', 'legacy' => '{e_BASE}usersettings.php', 'legacyQuery' => '{id}'),
|
||||
|
||||
// Named requests - important to be in the end in this order!
|
||||
'Edit/<name:[\w\pL.\-\s]+>' => array('profile/edit', 'legacy' => '{e_BASE}usersettings.php', 'legacyQuery' => '{id}', 'parseCallback' => 'idByName'),
|
||||
'edit/<name:[\w\pL.\-\s]+>' => array('profile/edit', 'legacy' => '{e_BASE}usersettings.php', 'legacyQuery' => '{id}', 'parseCallback' => 'idByName'),
|
||||
// Last one - close to catch all!
|
||||
'<name:[\w\pL.\-\s]+>' => array('profile/view', 'legacyQuery' => 'id.{id}', 'parseCallback' => 'idByName'),
|
||||
'<name:[\w\pL.\-\s\|]+>' => array('profile/view', 'legacyQuery' => 'id.{id}', 'parseCallback' => 'idByName'),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ Admin log events:
|
||||
USET_01 - admin changed user data
|
||||
*/
|
||||
|
||||
if(preg_match('/^\/(.*?)\/(usersettings\.php|user\/edit)(\?|\/)(\d+)$/i', $_SERVER['REQUEST_URI'], $_usersettings_matches))
|
||||
if(preg_match('/^\/(.*?)\/(usersettings\.php|\/edit)(\?|\/)(\d+)$/i', $_SERVER['REQUEST_URI'], $_usersettings_matches))
|
||||
{
|
||||
$eplug_admin = TRUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user