Skip to content

Commit

Permalink
command registry fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pBlueG committed Apr 27, 2014
1 parent 809ec8a commit d82472b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions classes/commandhandler.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,15 @@ public function _registerCommand($sCommand, $sCode, $privilege, $description = N
$iPermission = $aPrivileges[$privilege];
} else
$iPermission = $privilege;
$finalCode = str_replace(array("\r", "\n", "\t"), "", $sCode);
$this->m_aCommands[] = array(
'command' => $sCommand,
'code' => $sCode,
'code' => $finalCode,
'description' => $description,
'privilege' => $iPermission
);
if($save_to_db) {
$sCode = str_replace(array("\r", "\n", "\t"), '', $sCode);
if($save_to_db)
Database::getInstance()->_insert($this->m_sTable, end($this->m_aCommands));
}
return true;
}
return false;
Expand Down

0 comments on commit d82472b

Please sign in to comment.