Skip to content

Commit

Permalink
Merge pull request #85 from bitcero/helium
Browse files Browse the repository at this point in the history
Fixing small errors
  • Loading branch information
bitcero authored Aug 26, 2016
2 parents 966e904 + 1cdbe8d commit 2cb7126
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions rmcommon/class/fields/button.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion rmcommon/class/fields/groups.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion rmcommon/class/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

}
Expand Down
3 changes: 2 additions & 1 deletion rmcommon/class/internalblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
2 changes: 1 addition & 1 deletion rmcommon/events/rmcommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion rmcommon/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
'title' => __('Icons','rmcommon'),
'link' => "icons.php",
'icon' => "svg-rmcommon-vector text-blue",
'location' => "updates"
'location' => "icons"
);

$adminmenu[] = array(
Expand Down
2 changes: 2 additions & 0 deletions rmcommon/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion rmcommon/xoops_version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 2cb7126

Please sign in to comment.