diff --git a/rmcommon/class/fields/button.class.php b/rmcommon/class/fields/button.class.php index a377f24e..ae1dec1a 100644 --- a/rmcommon/class/fields/button.class.php +++ b/rmcommon/class/fields/button.class.php @@ -21,7 +21,7 @@ class RMFormButton extends RMFormElement * @param string $value Texto del Bot?n (Ej. Enviar, Cancelar) * @param string $type Tipo de bot?n (Ej. submit, button). Por defecto el valor es 'submit' */ - function __construct($caption, $value, $type = 'submit'){ + function __construct($caption, $value='', $type = 'submit'){ if (is_array($caption)) { parent::__construct($caption); @@ -106,7 +106,7 @@ public function __construct($caption=' ',$separator=' '){ * @param bool $ok * @return bool */ - public function addButton($name, $value, $type = 'button', $extra='', $ok=false){ + public function addButton($name, $value = '', $type = 'button', $extra='', $ok=false){ if(is_a($name, 'RMFormButton')){ $this->buttons[] = $name; diff --git a/rmcommon/class/fields/groups.class.php b/rmcommon/class/fields/groups.class.php index 5f0b0e85..693f2a64 100644 --- a/rmcommon/class/fields/groups.class.php +++ b/rmcommon/class/fields/groups.class.php @@ -29,7 +29,7 @@ class RMFormGroups extends RMFormElement * @param string $caption Texto de la etiqueta * @param string $name Nombre del campo */ - function __construct($caption, $name, $multi=0, $type=0, $cols=2, $selected=array()){ + function __construct($caption, $name='', $multi=0, $type=0, $cols=2, $selected=array()){ if (is_array($caption)) { parent::__construct($caption); diff --git a/rmcommon/class/functions.php b/rmcommon/class/functions.php index ee920801..53528a3e 100644 --- a/rmcommon/class/functions.php +++ b/rmcommon/class/functions.php @@ -557,7 +557,7 @@ static public function error_404($message, $module = '', $params = null) global $xoopsOption; unset($xoopsOption['template_main']); - require RMCPATH . '/404.php'; + require RMCPATH . '/templates/404.php'; exit(); } diff --git a/rmcommon/class/internalblock.php b/rmcommon/class/internalblock.php index 0bb783a5..5e0a68d5 100644 --- a/rmcommon/class/internalblock.php +++ b/rmcommon/class/internalblock.php @@ -204,13 +204,14 @@ public function checkRights($gid=0, $level=0){ */ public function getContent($format = 'S') { + global $common; $c_type = $this->getVar('content_type'); switch ( $format ) { case 'S': if ( $c_type == 'HTML' ) { - return str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'N')); + return str_replace('{X_SITEURL}', XOOPS_URL.'/', $common->customCode()->doCode($this->getVar('content', 'N'))); } elseif ( $c_type == 'PHP' ) { ob_start(); echo eval($this->getVar('content', 'N')); diff --git a/rmcommon/events/rmcommon.php b/rmcommon/events/rmcommon.php index f17e4215..5f5bf28a 100644 --- a/rmcommon/events/rmcommon.php +++ b/rmcommon/events/rmcommon.php @@ -48,7 +48,7 @@ static function eventRmcommonXoopsCommonEnd(){ * This event has added in order to add custom codes in a "semantic" way, but * the codes can be added from any pertinent place */ - RMEvents::get()->run_event('rmcommon.load.codes'); + RMEvents::get()->trigger('rmcommon.load.codes'); if(substr($p['path'], -11)=='backend.php' && $config->rss_enable){ include_once RMCPATH.'/rss.php'; diff --git a/rmcommon/menu.php b/rmcommon/menu.php index 2115d26e..61f48f3e 100644 --- a/rmcommon/menu.php +++ b/rmcommon/menu.php @@ -130,7 +130,7 @@ 'title' => __('Icons','rmcommon'), 'link' => "icons.php", 'icon' => "svg-rmcommon-vector text-blue", - 'location' => "updates" + 'location' => "icons" ); $adminmenu[] = array( diff --git a/rmcommon/users.php b/rmcommon/users.php index 64faf821..c5f962ed 100644 --- a/rmcommon/users.php +++ b/rmcommon/users.php @@ -258,6 +258,8 @@ function user_form($edit = false){ $user = $uh->get($uid); if ($user->isNew()) redirectMsg('users.php?'.$query, __('The specified user does not exists!','rmcommon'), 1); + } else { + $user = new XoopsUser(); } RMFunctions::create_toolbar(); diff --git a/rmcommon/xoops_version.php b/rmcommon/xoops_version.php index a3639474..cab03cb3 100644 --- a/rmcommon/xoops_version.php +++ b/rmcommon/xoops_version.php @@ -34,7 +34,7 @@ function __($text, $d = ''){ * Information for Common Utilities */ $modversion['rmnative'] = 1; -$modversion['rmversion'] = array('major'=>2,'minor'=>3,'revision'=>40,'stage'=>0,'name'=>'Common Utilities'); +$modversion['rmversion'] = array('major'=>2,'minor'=>3,'revision'=>41,'stage'=>0,'name'=>'Common Utilities'); $modversion['rewrite'] = 1; $modversion['url'] = "http://rmcommon.com"; $modversion['author'] = "Eduardo Cortés";