Commit e658bbf8 authored by Marc Egger's avatar Marc Egger
Browse files

Refs #11035 change path to CWD when API is called.

parent c0afbe31
Pipeline #3719 failed with stages
in 2 minutes and 41 seconds
......@@ -10,10 +10,11 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\QuickFormQuery;
use IMATHUZH\Qfq\Core\Store\Store;
Path::setCwdToApp(Path::API_TO_APP);
/**
* delete: success
......
......@@ -11,7 +11,9 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Form\Dirty;
use IMATHUZH\Qfq\Core\Helper\Path;
Path::setCwdToApp(Path::API_TO_APP);
/**
* Return JSON encoded answer
......
......@@ -12,8 +12,11 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\Report\Download;
Path::setCwdToApp(Path::API_TO_APP);
set_error_handler("\\IMATHUZH\\Qfq\\Core\\Exception\\ErrorHandler::exception_error_handler");
......
......@@ -10,8 +10,10 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\QuickFormQuery;
Path::setCwdToApp(Path::API_TO_APP);
/**
* Return JSON encoded answer
......
......@@ -11,7 +11,9 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\File;
use IMATHUZH\Qfq\Core\Helper\Path;
Path::setCwdToApp(Path::API_TO_APP);
/**
* Process File Upload - immediately when the the user selects a file.
......
......@@ -10,9 +10,11 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\Store\Store;
use IMATHUZH\Qfq\Core\QuickFormQuery;
Path::setCwdToApp(Path::API_TO_APP);
/**
......
......@@ -11,8 +11,11 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\Report\Html2Pdf;
Path::setCwdToApp(Path::API_TO_APP);
/**
* Main
*/
......
......@@ -10,10 +10,13 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\QuickFormQuery;
use IMATHUZH\Qfq\Core\Helper\OnString;
Path::setCwdToApp(Path::API_TO_APP);
$restId = array();
$restForm = array();
......
......@@ -10,11 +10,12 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\QuickFormQuery;
use IMATHUZH\Qfq\Core\Store\Store;
use IMATHUZH\Qfq\Core\Helper\Support;
Path::setCwdToApp(Path::API_TO_APP);
/**
* Return JSON encoded answer
......
......@@ -10,8 +10,10 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\QuickFormQuery;
Path::setCwdToApp(Path::API_TO_APP);
/**
* Return JSON encoded answer
......
......@@ -12,7 +12,9 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Form\TypeAhead;
use IMATHUZH\Qfq\Core\Helper\Path;
Path::setCwdToApp(Path::API_TO_APP);
/**
* Return JSON encoded answer
......
......@@ -50,6 +50,7 @@ class Path
// API
const EXT_TO_API = 'Classes/Api';
const API_TO_APP = '../../../../../';
// Icons
const EXT_TO_GFX_INFO = 'Resources/Public/icons/note.gif';
......
......@@ -157,7 +157,7 @@ class QuickFormQuery {
// Can't use store, since store needs bodytext to be parsed, which might throw exceptions if there is a syntax error.
\UserReportException::$report_uid = $t3data[T3DATA_UID];
\UserReportException::$report_bodytext = $t3data[T3DATA_BODYTEXT];
\UserReportException::$report_header = t3data[T3DATA_HEADER];
\UserReportException::$report_header = $t3data[T3DATA_HEADER];
\UserReportException::$report_pathFileName = $reportPathFileNameFull;
$btp = new BodytextParser();
......
......@@ -10,13 +10,9 @@ use http\Exception;
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\QuickFormQuery;
// TODO: replace all paths with typo3conf/ (usw.) and /../ and fileadmin/ with correct path computing function.
// TODO: set setAppRelToCwd() in every api file.
// TODO: replace Logger::makePathAbsolute()
// TODO: Compare Support::joinPath with Path::join
// TODO: Read code in Core/Typo3
// TODO: comment out autoloader in T3Handler::t3AutoloadIfNotRunning() and test if this file still runs without exception.
// TODO: create filePathToQfqConfig() and replace config references with this
// TODO: Replace all calls to T3Handler::... and Store/T3Info.php with abstraction
// TODO: AS _pagee macht link auf .../index.php . entweder datei umbenennen oder link klasse aendern
// TODO: add HTML header and body tags to echo
// TODO: Check if there are other javascript files which have to be included in qfq/Resources/Public/JavaScript
......@@ -27,6 +23,15 @@ use IMATHUZH\Qfq\Core\QuickFormQuery;
// TODO: Test if qfq, sql and mail logs still work
// TODO: write docstrings for Path.php
// PATH migration
// TODO: create filePathToQfqConfig() and replace config references with this
// TODO: replace all paths with typo3conf/ (usw.) and /../ and fileadmin/ with correct path computing function.
// TODO: Compare Support::joinPath with Path::join
// Testing
// TODO: Fix Unittests
// TODO: test if Logger::makePathAbsolute() actually still does what it should (I have changed it)
// Misc.
// TODO: TablesorterController.js: pass API url as data attribute instead of hardcode (this.tablesorterApiUrl = 'typo3conf/ext/qfq/Classes/Api/setting.php';)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment