function __construct($a = "database.db")
 {
     require_once 'workflows.php';
     $w = new Workflows();
     $this->cache = $w->cache();
     $this->data = $w->data();
     $this->bundle = $w->bundle();
     $this->path = $w->path();
     $this->home = $w->home();
     if (file_exists($this->data . '/' . $a)) {
         $a = $this->data . '/' . $a;
     } elseif (file_exists($this->cache . '/' . $a)) {
         $a = $this->cache . '/' . $a;
     } elseif (file_exists($this->path . '/' . $a)) {
         $a = $this->path . '/' . $a;
     } elseif (file_exists($a)) {
         // do nothing.
     } else {
         $a = $this->data . '/' . $a;
     }
     $this->open($a);
 }
Exemple #2
0
    } else {
        $w->result(null, '', 'Exception occurred: ' . $query, 'Use the Send an email to the author option below to send generated spot_mini_debug.tgz', './images/warning.png', 'no', null, '');
    }
}
exec("mkdir -p ~/Downloads/spot_mini_debug");
$output = "DEBUG: ";
//
// check for library update in progress
if (file_exists($w->data() . "/update_library_in_progress")) {
    $w->result('', '', "Library update in progress", "", 'fileicon:' . $w->data() . '/update_library_in_progress', 'no', null, '');
    $output = $output . "Library update in progress: " . "the file" . $w->data() . "/update_library_in_progress is present\n";
}
if (!file_exists($w->data() . "/settings.json")) {
    $output = $output . "The file " . $w->data() . "/settings.json is not present\n";
} else {
    copy($w->data() . "/settings.json", $w->home() . "/Downloads/spot_mini_debug/settings.json");
}
copyDirectory($w->cache(), $w->home() . "/Downloads/spot_mini_debug/cache");
if (!file_exists($w->data() . "/fetch_artworks.db")) {
    $output = $output . "The file " . $w->data() . "/fetch_artworks.db is not present\n";
} else {
    copy($w->data() . "/fetch_artworks.db", $w->home() . "/Downloads/spot_mini_debug/fetch_artworks.db");
}
if (!file_exists($w->data() . "/library.db")) {
    $output = $output . "The file " . $w->data() . "/library.db is not present\n";
} else {
    copy($w->data() . "/library.db", $w->home() . "/Downloads/spot_mini_debug/library.db");
}
if (!file_exists($w->data() . "/library_new.db")) {
    $output = $output . "The file " . $w->data() . "/library_new.db is not present\n";
} else {
Exemple #3
0
    } else {
        $w->result(null, '', 'Exception occurred: ' . $query, 'Use the Send an email to the author option below to send generated spot_mini_debug.tgz', './images/warning.png', 'no', null, '');
    }
}
exec("mkdir -p ~/Downloads/spot_mini_debug");
$output = "DEBUG: ";
//
// check for library update in progress
if (file_exists($w->data() . "/update_library_in_progress")) {
    $w->result('', '', "Library update in progress", "", 'fileicon:' . $w->data() . '/update_library_in_progress', 'no', null, '');
    $output = $output . "Library update in progress: " . "the file" . $w->data() . "/update_library_in_progress is present\n";
}
if (!file_exists($w->data() . "/settings.json")) {
    $output = $output . "The file " . $w->data() . "/settings.json is not present\n";
} else {
    copy($w->data() . "/settings.json", $w->home() . "/Downloads/spot_mini_debug/settings.json");
}
copy_directory($w->cache(), $w->home() . "/Downloads/spot_mini_debug/cache");
if (!file_exists($w->data() . "/fetch_artworks.db")) {
    $output = $output . "The file " . $w->data() . "/fetch_artworks.db is not present\n";
} else {
    copy($w->data() . "/fetch_artworks.db", $w->home() . "/Downloads/spot_mini_debug/fetch_artworks.db");
}
if (!file_exists($w->data() . "/library.db")) {
    $output = $output . "The file " . $w->data() . "/library.db is not present\n";
} else {
    copy($w->data() . "/library.db", $w->home() . "/Downloads/spot_mini_debug/library.db");
}
if (!file_exists($w->data() . "/library_new.db")) {
    $output = $output . "The file " . $w->data() . "/library_new.db is not present\n";
} else {