Bug fixes

This commit is contained in:
Diego Najar 2018-02-26 00:18:21 +01:00
parent 8ad9922bf3
commit 722d7b3288
3 changed files with 9 additions and 6 deletions

2
.gitignore vendored
View File

@ -1,8 +1,10 @@
.DS_Store .DS_Store
bl-content/* bl-content/*
bl-plugins/timemachine bl-plugins/timemachine
bl-plugins/timemachine-x
bl-plugins/remote-content bl-plugins/remote-content
bl-plugins/simple-stats bl-plugins/simple-stats
bl-plugins/discovery bl-plugins/discovery
bl-kernel/bludit.pro.php bl-kernel/bludit.pro.php
bl-themes/docs bl-themes/docs
bl-themes/docsx

View File

@ -19,8 +19,8 @@ class dbSyslog extends dbJSON
// Returns TRUE if the ID of execution exists, FALSE otherwise // Returns TRUE if the ID of execution exists, FALSE otherwise
public function exists($idExecution) public function exists($idExecution)
{ {
foreach($this->db as $field) { foreach ($this->db as $field) {
if( $field['idExecution']==$idExecution ) { if ($field['idExecution']==$idExecution) {
return true; return true;
} }
} }
@ -29,8 +29,8 @@ class dbSyslog extends dbJSON
public function get($idExecution) public function get($idExecution)
{ {
foreach($this->db as $field) { foreach ($this->db as $field) {
if( $field['idExecution']==$idExecution ) { if ($field['idExecution']==$idExecution) {
return $field; return $field;
} }
} }
@ -45,12 +45,13 @@ class dbSyslog extends dbJSON
$data['date'] = Date::current(DB_DATE_FORMAT); $data['date'] = Date::current(DB_DATE_FORMAT);
$data['dictionaryKey'] = $args['dictionaryKey']; $data['dictionaryKey'] = $args['dictionaryKey'];
$data['notes'] = Sanitize::html($args['notes']); $data['notes'] = Sanitize::html($args['notes']);
// Unique ID for each execution, defined in boot/init.php
$data['idExecution'] = $GLOBALS['ID_EXECUTION']; $data['idExecution'] = $GLOBALS['ID_EXECUTION'];
$data['method'] = $_SERVER['REQUEST_METHOD']; $data['method'] = $_SERVER['REQUEST_METHOD'];
// Username // Username
$data['username'] = Session::get('username'); $data['username'] = Session::get('username');
if( Text::isEmpty($data['username']) ) { if (Text::isEmpty($data['username'])) {
return false; return false;
} }

View File

@ -122,4 +122,4 @@ class pluginBackup extends Plugin {
return Filesystem::copyRecursive($tmp, PATH_CONTENT); return Filesystem::copyRecursive($tmp, PATH_CONTENT);
} }
} }