mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 04:38:27 +01:00
Default Author fix for userpicker() with admin-ui
This commit is contained in:
parent
3cff407d62
commit
3dbcf5e802
@ -211,7 +211,7 @@ class page_chapters_ui extends e_admin_ui
|
||||
}
|
||||
|
||||
|
||||
public function beforeCreate($new_data)
|
||||
public function beforeCreate($new_data, $old_data)
|
||||
{
|
||||
if(empty($new_data['chapter_sef']))
|
||||
{
|
||||
@ -725,7 +725,7 @@ class page_admin_ui extends e_admin_ui
|
||||
return $newdata;
|
||||
}
|
||||
|
||||
function beforeUpdate($newdata,$olddata)
|
||||
function beforeUpdate($newdata,$olddata, $id)
|
||||
{
|
||||
if(isset($newdata['menu_name']))
|
||||
{
|
||||
|
@ -4855,9 +4855,9 @@ class e_form
|
||||
if(!isset($parms['__options'])) $parms['__options'] = array();
|
||||
if(!is_array($parms['__options'])) parse_str($parms['__options'], $parms['__options']);
|
||||
|
||||
if((empty($value) && !empty($parms['currentInit']) && !isset($parms['default']) ) || !empty($parms['current']) || (vartrue($parms['default']) == 'USERID')) // include current user by default.
|
||||
if((empty($value) || !empty($parms['currentInit']) && empty($parms['default']) ) || !empty($parms['current']) || (vartrue($parms['default']) == 'USERID')) // include current user by default.
|
||||
{
|
||||
$value = USERID;
|
||||
$value = array('user_id'=>USERID, 'user_name'=>USERNAME);
|
||||
if(vartrue($parms['current']))
|
||||
{
|
||||
$parms['__options']['readonly'] = true;
|
||||
@ -4865,6 +4865,10 @@ class e_form
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// if(!is_array($value))
|
||||
// {
|
||||
// $value = $value ? e107::getSystemUser($value, true)->getUserData() : array();// e107::user($value);
|
||||
|
@ -65,7 +65,7 @@ else
|
||||
$color = "cccccc";
|
||||
}
|
||||
|
||||
|
||||
ob_clean(); // Precaution - clearout utf-8 BOM or any other garbage in e107_config.php
|
||||
$sim->render($code,$color);
|
||||
|
||||
exit;
|
||||
|
Loading…
x
Reference in New Issue
Block a user