Skip to content
Snippets Groups Projects
Commit c55b4fd7 authored by Stein Magne Bjorklund's avatar Stein Magne Bjorklund
Browse files

Importer class use Configuration class

- Reformatting
- Error 500 exits. Will never return.
parent 7f104b24
No related branches found
No related tags found
1 merge request!18Resolve "Remove all use of GLOBALS"
......@@ -28,10 +28,12 @@ final class Importer
{
set_time_limit(0);
error_reporting(E_ERROR);
if (is_file(FILE)) {
echo "There is an existing " . FILE . " file on this installation. Please remove it before importing a new one";
exit(0);
}
if (!isset($_GET['import']) && !isset($_POST['importtext'])) {
$this->showInterface();
exit(0);
......@@ -52,11 +54,11 @@ final class Importer
$parser->parse(RDF, $_POST['importtext']);
} else {
HTTPStatus::send500();
exit(0);
}
$triples = $parser->getTriples();
$appArr = $this->search($triples, null, RDF . 'type', LS . 'Application');
if (!(sizeof($appArr) > 0)) {
echo "I can't find an application from the URL given";
exit(0);
......@@ -186,8 +188,7 @@ final class Importer
private function createNamespaces($ns)
{
require_once LOADSPEAKR_ROOT . '/namespaces.php';
global $conf;
$conf = $this->configuration->getConfigValue('conf', '');
$namespaces = "";
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment