mirror of
https://github.com/Karaka-Management/oms-OnlineResourceWatcher.git
synced 2026-01-30 16:28:43 +00:00
phpcs autofixes
This commit is contained in:
parent
cfee20a379
commit
dbe3a122e4
|
|
@ -49,10 +49,10 @@ class Messages
|
|||
|
||||
$settings = [
|
||||
[
|
||||
'id' => null,
|
||||
'name' => SettingsEnum::LOGIN_MAIL_REGISTRATION_TEMPLATE,
|
||||
'id' => null,
|
||||
'name' => SettingsEnum::LOGIN_MAIL_REGISTRATION_TEMPLATE,
|
||||
'content' => (string) $messages['email_template'][0]['id'],
|
||||
'module' => 'OnlineResourceWatcher',
|
||||
'module' => 'OnlineResourceWatcher',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ final class Installer extends InstallerAbstract
|
|||
'Directory /var/www is not writable. Please allow the apache user (www-data) to write to this directory.'
|
||||
);
|
||||
|
||||
var_dump('NOT WRITABLE');
|
||||
\var_dump('NOT WRITABLE');
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -57,7 +57,7 @@ final class Installer extends InstallerAbstract
|
|||
parent::install($app, $info, $cfgHandler);
|
||||
|
||||
if (!\is_dir(__DIR__ . '/../Files')) {
|
||||
mkdir(__DIR__ . '/../Files');
|
||||
\mkdir(__DIR__ . '/../Files');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ declare(strict_types=1);
|
|||
use Modules\OnlineResourceWatcher\Controller\ApiController;
|
||||
use Modules\OnlineResourceWatcher\Models\PermissionCategory;
|
||||
use phpOMS\Account\PermissionType;
|
||||
use phpOMS\Router\RouteVerb;
|
||||
|
||||
return [
|
||||
'^.*/orw/check -i all*$' => [
|
||||
|
|
@ -27,5 +26,5 @@ return [
|
|||
'state' => PermissionCategory::RESOURCE,
|
||||
],
|
||||
],
|
||||
]
|
||||
];
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -15,7 +15,10 @@ declare(strict_types=1);
|
|||
namespace Modules\OnlineResourceWatcher\Controller;
|
||||
|
||||
use Modules\Admin\Models\NullAccount;
|
||||
use Modules\Admin\Models\SettingsEnum;
|
||||
use Modules\Messages\Models\EmailMapper;
|
||||
use Modules\OnlineResourceWatcher\Models\Inform;
|
||||
use Modules\OnlineResourceWatcher\Models\InformBlacklistMapper;
|
||||
use Modules\OnlineResourceWatcher\Models\InformMapper;
|
||||
use Modules\OnlineResourceWatcher\Models\Report;
|
||||
use Modules\OnlineResourceWatcher\Models\ReportMapper;
|
||||
|
|
@ -23,6 +26,7 @@ use Modules\OnlineResourceWatcher\Models\ReportStatus;
|
|||
use Modules\OnlineResourceWatcher\Models\Resource;
|
||||
use Modules\OnlineResourceWatcher\Models\ResourceMapper;
|
||||
use Modules\OnlineResourceWatcher\Models\ResourceStatus;
|
||||
use Modules\OnlineResourceWatcher\Models\SettingsEnum as OrwSettingsEnum;
|
||||
use phpOMS\Message\Http\HttpRequest;
|
||||
use phpOMS\Message\Http\RequestStatusCode;
|
||||
use phpOMS\Message\NotificationLevel;
|
||||
|
|
@ -30,14 +34,10 @@ use phpOMS\Message\RequestAbstract;
|
|||
use phpOMS\Message\ResponseAbstract;
|
||||
use phpOMS\Model\Message\FormValidation;
|
||||
use phpOMS\System\File\Local\Directory;
|
||||
use phpOMS\System\SystemUtils;
|
||||
use phpOMS\Utils\StringUtils;
|
||||
use Modules\Admin\Models\SettingsEnum;
|
||||
use Modules\OnlineResourceWatcher\Models\SettingsEnum as OrwSettingsEnum;
|
||||
use Modules\Messages\Models\EmailMapper;
|
||||
use Modules\OnlineResourceWatcher\Models\InformBlacklistMapper;
|
||||
use phpOMS\System\OperatingSystem;
|
||||
use phpOMS\System\SystemType;
|
||||
use phpOMS\System\SystemUtils;
|
||||
use phpOMS\Utils\StringUtils;
|
||||
|
||||
/**
|
||||
* OnlineResourceWatcher controller class.
|
||||
|
|
@ -69,7 +69,7 @@ final class ApiController extends Controller
|
|||
->where('id', (int) $request->getData('id'))
|
||||
->execute();
|
||||
|
||||
$path = '';
|
||||
$path = '';
|
||||
$basePath = __DIR__ . '/../Files/' . $resource->path . '/' . $resource->lastVersionPath;
|
||||
|
||||
if (\is_file($basePath . '/index.htm')) {
|
||||
|
|
@ -268,11 +268,11 @@ final class ApiController extends Controller
|
|||
|
||||
$path .= 'temp/' . $resource->id . '/' . $timestamp;
|
||||
$toCheck[] = [
|
||||
'resource' => $resource,
|
||||
'resource' => $resource,
|
||||
'timestamp' => $timestamp,
|
||||
'path' => $path,
|
||||
'handled' => false,
|
||||
'loop' => 0,
|
||||
'path' => $path,
|
||||
'handled' => false,
|
||||
'loop' => 0,
|
||||
];
|
||||
|
||||
try {
|
||||
|
|
@ -333,7 +333,7 @@ final class ApiController extends Controller
|
|||
$report->status = ReportStatus::DOWNLOAD_ERROR;
|
||||
|
||||
$this->createModel($request->header->account, $report, ReportMapper::class, 'report', $request->getOrigin());
|
||||
$old = clone $resource;
|
||||
$old = clone $resource;
|
||||
$resource->checkedAt = $report->createdAt;
|
||||
$this->updateModel($request->header->account, $old, $resource, ResourceMapper::class, 'resource', $request->getOrigin());
|
||||
|
||||
|
|
@ -370,8 +370,8 @@ final class ApiController extends Controller
|
|||
\rename($path . '/index.html', $path . '/index.htm');
|
||||
}
|
||||
|
||||
$extension = 'htm';
|
||||
$fileName = 'index.htm';
|
||||
$extension = 'htm';
|
||||
$fileName = 'index.htm';
|
||||
$toCheck[$index]['handled'] = true;
|
||||
} else {
|
||||
foreach ($filesNew as $file) {
|
||||
|
|
@ -387,8 +387,8 @@ final class ApiController extends Controller
|
|||
|| StringUtils::endsWith($file, '.md')
|
||||
|| StringUtils::endsWith($file, '.txt')
|
||||
) {
|
||||
$fileName = $file;
|
||||
$extension = \substr($file, \strripos($file, '.') + 1);
|
||||
$fileName = $file;
|
||||
$extension = \substr($file, \strripos($file, '.') + 1);
|
||||
$toCheck[$index]['handled'] = true;
|
||||
|
||||
break;
|
||||
|
|
@ -411,7 +411,7 @@ final class ApiController extends Controller
|
|||
}
|
||||
|
||||
$this->createModel($request->header->account, $report, ReportMapper::class, 'report', $request->getOrigin());
|
||||
$old = clone $resource;
|
||||
$old = clone $resource;
|
||||
$resource->path = (string) $resource->id;
|
||||
$resource->lastVersionPath = (string) $check['timestamp'];
|
||||
$resource->lastVersionDate = $report->createdAt;
|
||||
|
|
@ -454,8 +454,8 @@ final class ApiController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
$lastVersionPath = $basePath . '/' . $id . '/' . $lastVersionTimestamp;
|
||||
$oldPath = $lastVersionPath . '/' . $fileName;
|
||||
$lastVersionPath = $basePath . '/' . $id . '/' . $lastVersionTimestamp;
|
||||
$oldPath = $lastVersionPath . '/' . $fileName;
|
||||
$newPath = $path . '/' . $fileName;
|
||||
|
||||
if (!\is_file($newPath) || !$toCheck[$index]['handled']) {
|
||||
|
|
@ -552,8 +552,8 @@ final class ApiController extends Controller
|
|||
}
|
||||
|
||||
// @todo: move to informUsers function
|
||||
$owner = new Inform();
|
||||
$owner->email = $resource->owner->getEmail();
|
||||
$owner = new Inform();
|
||||
$owner->email = $resource->owner->getEmail();
|
||||
$resource->inform[] = $owner;
|
||||
|
||||
foreach ($resource->inform as $inform) {
|
||||
|
|
@ -588,7 +588,7 @@ final class ApiController extends Controller
|
|||
$resource->id,
|
||||
$inform->email,
|
||||
$resource->uri,
|
||||
$resource->owner->getEmail()
|
||||
$resource->owner->getEmail(),
|
||||
],
|
||||
$mailL11n->body
|
||||
);
|
||||
|
|
@ -605,7 +605,7 @@ final class ApiController extends Controller
|
|||
$resource->id,
|
||||
$inform->email,
|
||||
$resource->uri,
|
||||
$resource->owner->getEmail()
|
||||
$resource->owner->getEmail(),
|
||||
],
|
||||
$mailL11n->bodyAlt
|
||||
);
|
||||
|
|
@ -862,9 +862,9 @@ final class ApiController extends Controller
|
|||
*/
|
||||
private function createInformFromRequest(RequestAbstract $request) : Inform
|
||||
{
|
||||
$inform = new Inform();
|
||||
$inform->account = $request->getDataInt('account');
|
||||
$inform->email = $request->getDataString('email');
|
||||
$inform = new Inform();
|
||||
$inform->account = $request->getDataInt('account');
|
||||
$inform->email = $request->getDataString('email');
|
||||
$inform->resource = $request->getDataInt('resource');
|
||||
|
||||
return $inform;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\OnlineResourceWatcher\Models;
|
||||
|
||||
use Modules\Admin\Models\AccountMapper;
|
||||
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||
|
||||
/**
|
||||
|
|
@ -38,7 +37,7 @@ final class InformBlacklistMapper extends DataMapperFactory
|
|||
*/
|
||||
public const COLUMNS = [
|
||||
'orw_resource_blacklist_id' => ['name' => 'orw_resource_blacklist_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'orw_resource_blacklist_mail' => ['name' => 'orw_resource_blacklist_mail', 'type' => 'string', 'internal' => 'email',],
|
||||
'orw_resource_blacklist_mail' => ['name' => 'orw_resource_blacklist_mail', 'type' => 'string', 'internal' => 'email',],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\OnlineResourceWatcher\Models;
|
||||
|
||||
use Modules\Admin\Models\AccountMapper;
|
||||
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||
|
||||
/**
|
||||
|
|
@ -37,9 +36,9 @@ final class InformMapper extends DataMapperFactory
|
|||
* @since 1.0.0
|
||||
*/
|
||||
public const COLUMNS = [
|
||||
'orw_resource_info_id' => ['name' => 'orw_resource_info_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'orw_resource_info_mail' => ['name' => 'orw_resource_info_mail', 'type' => 'string', 'internal' => 'email',],
|
||||
'orw_resource_info_account' => ['name' => 'orw_resource_info_account', 'type' => 'int', 'internal' => 'account',],
|
||||
'orw_resource_info_id' => ['name' => 'orw_resource_info_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'orw_resource_info_mail' => ['name' => 'orw_resource_info_mail', 'type' => 'string', 'internal' => 'email',],
|
||||
'orw_resource_info_account' => ['name' => 'orw_resource_info_account', 'type' => 'int', 'internal' => 'account',],
|
||||
'orw_resource_info_resource' => ['name' => 'orw_resource_info_resource', 'type' => 'int', 'internal' => 'resource',],
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\OnlineResourceWatcher\Models;
|
||||
|
||||
use Modules\Admin\Models\Account;
|
||||
use Modules\Admin\Models\NullAccount;
|
||||
|
||||
/**
|
||||
* Report class.
|
||||
*
|
||||
|
|
@ -69,10 +66,10 @@ class Report implements \JsonSerializable
|
|||
public function toArray() : array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'createdAt' => $this->createdAt,
|
||||
'resource' => $this->resource,
|
||||
'status' => $this->status,
|
||||
'id' => $this->id,
|
||||
'createdAt' => $this->createdAt,
|
||||
'resource' => $this->resource,
|
||||
'status' => $this->status,
|
||||
'changemetric' => $this->changeMetric,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ final class ReportMapper extends DataMapperFactory
|
|||
* @since 1.0.0
|
||||
*/
|
||||
public const COLUMNS = [
|
||||
'orw_resource_report_id' => ['name' => 'orw_resource_report_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'orw_resource_report_status' => ['name' => 'orw_resource_report_status', 'type' => 'int', 'internal' => 'status',],
|
||||
'orw_resource_report_id' => ['name' => 'orw_resource_report_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'orw_resource_report_status' => ['name' => 'orw_resource_report_status', 'type' => 'int', 'internal' => 'status',],
|
||||
'orw_resource_report_metric' => ['name' => 'orw_resource_report_metric', 'type' => 'int', 'internal' => 'changeMetric',],
|
||||
'orw_resource_report_path' => ['name' => 'orw_resource_report_path', 'type' => 'string', 'internal' => 'versionPath',],
|
||||
'orw_resource_report_path' => ['name' => 'orw_resource_report_path', 'type' => 'string', 'internal' => 'versionPath',],
|
||||
'orw_resource_report_change' => ['name' => 'orw_resource_report_change', 'type' => 'string', 'internal' => 'change',],
|
||||
'orw_resource_report_resource' => ['name' => 'orw_resource_report_resource', 'type' => 'int', 'internal' => 'resource',],
|
||||
'orw_resource_report_created_at' => ['name' => 'orw_resource_report_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt',],
|
||||
'orw_resource_report_resource' => ['name' => 'orw_resource_report_resource', 'type' => 'int', 'internal' => 'resource',],
|
||||
'orw_resource_report_created_at' => ['name' => 'orw_resource_report_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt',],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -13,74 +13,74 @@
|
|||
declare(strict_types=1);
|
||||
|
||||
return ['OnlineResourceWatcher' => [
|
||||
'Action' => 'Action',
|
||||
'Add' => 'Add',
|
||||
'Admin' => 'Admin',
|
||||
'Back' => 'Back',
|
||||
'Bills' => 'Bills',
|
||||
'By' => 'By',
|
||||
'Cancel' => 'Cancel',
|
||||
'Checked' => 'Checked',
|
||||
'Dashboard' => 'Dashboard',
|
||||
'Date' => 'Date',
|
||||
'Filter' => 'Filter',
|
||||
'ForgotPassword' => 'Forgot Password',
|
||||
'Home' => 'Home',
|
||||
'ID' => 'ID',
|
||||
'Imprint' => 'Imprint',
|
||||
'Legal' => 'Legal',
|
||||
'Log' => 'Log',
|
||||
'Logo' => 'Logo',
|
||||
'SignOut' => 'Sign Out',
|
||||
'Logs' => 'Logs',
|
||||
'Organization' => 'Organization',
|
||||
'Organizations' => 'Organizations',
|
||||
'Password' => 'Password',
|
||||
'PrivacyPolicy' => 'Privacy Policy',
|
||||
'Ref' => 'Ref',
|
||||
'Report' => 'Report',
|
||||
'Reports' => 'Reports',
|
||||
'Reset' => 'Reset',
|
||||
'Resource' => 'Resource',
|
||||
'Resources' => 'Resources',
|
||||
'Create' => 'Create',
|
||||
'Delete' => 'Delete',
|
||||
'Suspend' => 'Suspend',
|
||||
'Send' => 'Send',
|
||||
'Save' => 'Save',
|
||||
'Search' => 'Search',
|
||||
'Settings' => 'Settings',
|
||||
'SignIn' => 'Sign In',
|
||||
'Status' => 'Status',
|
||||
'Submit' => 'Submit',
|
||||
'Terms' => 'Terms',
|
||||
'Trigger' => 'Trigger',
|
||||
'Type' => 'Type',
|
||||
'User' => 'User',
|
||||
'Username' => 'Username',
|
||||
'Users' => 'Users',
|
||||
'New' => 'New',
|
||||
'Number' => 'Number',
|
||||
'CustomerNo' => 'Customer No.',
|
||||
'CustomerName' => 'Customer Name',
|
||||
'Amount' => 'Amount',
|
||||
'Members' => 'Members',
|
||||
'Name' => 'Name',
|
||||
'Active' => 'Active',
|
||||
'Address' => 'Address',
|
||||
'Postal' => 'Postal',
|
||||
'City' => 'City',
|
||||
'BillingEmail' => 'Billing Email',
|
||||
'Statistics' => 'Statistics',
|
||||
'PlanSettings' => 'Plan Settings',
|
||||
'Action' => 'Action',
|
||||
'Add' => 'Add',
|
||||
'Admin' => 'Admin',
|
||||
'Back' => 'Back',
|
||||
'Bills' => 'Bills',
|
||||
'By' => 'By',
|
||||
'Cancel' => 'Cancel',
|
||||
'Checked' => 'Checked',
|
||||
'Dashboard' => 'Dashboard',
|
||||
'Date' => 'Date',
|
||||
'Filter' => 'Filter',
|
||||
'ForgotPassword' => 'Forgot Password',
|
||||
'Home' => 'Home',
|
||||
'ID' => 'ID',
|
||||
'Imprint' => 'Imprint',
|
||||
'Legal' => 'Legal',
|
||||
'Log' => 'Log',
|
||||
'Logo' => 'Logo',
|
||||
'SignOut' => 'Sign Out',
|
||||
'Logs' => 'Logs',
|
||||
'Organization' => 'Organization',
|
||||
'Organizations' => 'Organizations',
|
||||
'Password' => 'Password',
|
||||
'PrivacyPolicy' => 'Privacy Policy',
|
||||
'Ref' => 'Ref',
|
||||
'Report' => 'Report',
|
||||
'Reports' => 'Reports',
|
||||
'Reset' => 'Reset',
|
||||
'Resource' => 'Resource',
|
||||
'Resources' => 'Resources',
|
||||
'Create' => 'Create',
|
||||
'Delete' => 'Delete',
|
||||
'Suspend' => 'Suspend',
|
||||
'Send' => 'Send',
|
||||
'Save' => 'Save',
|
||||
'Search' => 'Search',
|
||||
'Settings' => 'Settings',
|
||||
'SignIn' => 'Sign In',
|
||||
'Status' => 'Status',
|
||||
'Submit' => 'Submit',
|
||||
'Terms' => 'Terms',
|
||||
'Trigger' => 'Trigger',
|
||||
'Type' => 'Type',
|
||||
'User' => 'User',
|
||||
'Username' => 'Username',
|
||||
'Users' => 'Users',
|
||||
'New' => 'New',
|
||||
'Number' => 'Number',
|
||||
'CustomerNo' => 'Customer No.',
|
||||
'CustomerName' => 'Customer Name',
|
||||
'Amount' => 'Amount',
|
||||
'Members' => 'Members',
|
||||
'Name' => 'Name',
|
||||
'Active' => 'Active',
|
||||
'Address' => 'Address',
|
||||
'Postal' => 'Postal',
|
||||
'City' => 'City',
|
||||
'BillingEmail' => 'Billing Email',
|
||||
'Statistics' => 'Statistics',
|
||||
'PlanSettings' => 'Plan Settings',
|
||||
'BillingSettings' => 'Billing Settings',
|
||||
'UserSettings' => 'User Settings',
|
||||
'Login' => 'Login',
|
||||
'Email' => 'Email',
|
||||
'NewPassword' => 'New Password',
|
||||
'CreateResource' => 'Create Resource',
|
||||
'Inform' => 'Inform',
|
||||
'Element' => 'Element',
|
||||
'Exit' => 'Exit',
|
||||
'Url' => 'Url',
|
||||
'UserSettings' => 'User Settings',
|
||||
'Login' => 'Login',
|
||||
'Email' => 'Email',
|
||||
'NewPassword' => 'New Password',
|
||||
'CreateResource' => 'Create Resource',
|
||||
'Inform' => 'Inform',
|
||||
'Element' => 'Element',
|
||||
'Exit' => 'Exit',
|
||||
'Url' => 'Url',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -13,82 +13,82 @@
|
|||
declare(strict_types=1);
|
||||
|
||||
return ['OnlineResourceWatcher' => [
|
||||
'Action' => 'Action',
|
||||
'Add' => 'Add',
|
||||
'Admin' => 'Admin',
|
||||
'Back' => 'Back',
|
||||
'Bills' => 'Bills',
|
||||
'By' => 'By',
|
||||
'Cancel' => 'Cancel',
|
||||
'Checked' => 'Checked',
|
||||
'Dashboard' => 'Dashboard',
|
||||
'Date' => 'Date',
|
||||
'Filter' => 'Filter',
|
||||
'ForgotPassword' => 'Forgot Password',
|
||||
'Home' => 'Home',
|
||||
'ID' => 'ID',
|
||||
'Imprint' => 'Imprint',
|
||||
'Legal' => 'Legal',
|
||||
'Log' => 'Log',
|
||||
'Logo' => 'Logo',
|
||||
'SignOut' => 'Sign Out',
|
||||
'Logs' => 'Logs',
|
||||
'Organization' => 'Organization',
|
||||
'Organizations' => 'Organizations',
|
||||
'Password' => 'Password',
|
||||
'PrivacyPolicy' => 'Privacy Policy',
|
||||
'Ref' => 'Ref',
|
||||
'Report' => 'Report',
|
||||
'Reports' => 'Reports',
|
||||
'Reset' => 'Reset',
|
||||
'Resource' => 'Resource',
|
||||
'Resources' => 'Resources',
|
||||
'Create' => 'Create',
|
||||
'Delete' => 'Delete',
|
||||
'Suspend' => 'Suspend',
|
||||
'Send' => 'Send',
|
||||
'Save' => 'Save',
|
||||
'Search' => 'Search',
|
||||
'Settings' => 'Settings',
|
||||
'SignIn' => 'Sign In',
|
||||
'Status' => 'Status',
|
||||
'Submit' => 'Submit',
|
||||
'Terms' => 'Terms',
|
||||
'Trigger' => 'Trigger',
|
||||
'Type' => 'Type',
|
||||
'User' => 'User',
|
||||
'Username' => 'Username',
|
||||
'Users' => 'Users',
|
||||
'New' => 'New',
|
||||
'Number' => 'Number',
|
||||
'CustomerNo' => 'Customer No.',
|
||||
'CustomerName' => 'Customer Name',
|
||||
'Amount' => 'Amount',
|
||||
'Members' => 'Members',
|
||||
'Name' => 'Name',
|
||||
'Active' => 'Active',
|
||||
'Address' => 'Address',
|
||||
'Postal' => 'Postal',
|
||||
'City' => 'City',
|
||||
'BillingEmail' => 'Billing Email',
|
||||
'Statistics' => 'Statistics',
|
||||
'PlanSettings' => 'Plan Settings',
|
||||
'Action' => 'Action',
|
||||
'Add' => 'Add',
|
||||
'Admin' => 'Admin',
|
||||
'Back' => 'Back',
|
||||
'Bills' => 'Bills',
|
||||
'By' => 'By',
|
||||
'Cancel' => 'Cancel',
|
||||
'Checked' => 'Checked',
|
||||
'Dashboard' => 'Dashboard',
|
||||
'Date' => 'Date',
|
||||
'Filter' => 'Filter',
|
||||
'ForgotPassword' => 'Forgot Password',
|
||||
'Home' => 'Home',
|
||||
'ID' => 'ID',
|
||||
'Imprint' => 'Imprint',
|
||||
'Legal' => 'Legal',
|
||||
'Log' => 'Log',
|
||||
'Logo' => 'Logo',
|
||||
'SignOut' => 'Sign Out',
|
||||
'Logs' => 'Logs',
|
||||
'Organization' => 'Organization',
|
||||
'Organizations' => 'Organizations',
|
||||
'Password' => 'Password',
|
||||
'PrivacyPolicy' => 'Privacy Policy',
|
||||
'Ref' => 'Ref',
|
||||
'Report' => 'Report',
|
||||
'Reports' => 'Reports',
|
||||
'Reset' => 'Reset',
|
||||
'Resource' => 'Resource',
|
||||
'Resources' => 'Resources',
|
||||
'Create' => 'Create',
|
||||
'Delete' => 'Delete',
|
||||
'Suspend' => 'Suspend',
|
||||
'Send' => 'Send',
|
||||
'Save' => 'Save',
|
||||
'Search' => 'Search',
|
||||
'Settings' => 'Settings',
|
||||
'SignIn' => 'Sign In',
|
||||
'Status' => 'Status',
|
||||
'Submit' => 'Submit',
|
||||
'Terms' => 'Terms',
|
||||
'Trigger' => 'Trigger',
|
||||
'Type' => 'Type',
|
||||
'User' => 'User',
|
||||
'Username' => 'Username',
|
||||
'Users' => 'Users',
|
||||
'New' => 'New',
|
||||
'Number' => 'Number',
|
||||
'CustomerNo' => 'Customer No.',
|
||||
'CustomerName' => 'Customer Name',
|
||||
'Amount' => 'Amount',
|
||||
'Members' => 'Members',
|
||||
'Name' => 'Name',
|
||||
'Active' => 'Active',
|
||||
'Address' => 'Address',
|
||||
'Postal' => 'Postal',
|
||||
'City' => 'City',
|
||||
'BillingEmail' => 'Billing Email',
|
||||
'Statistics' => 'Statistics',
|
||||
'PlanSettings' => 'Plan Settings',
|
||||
'BillingSettings' => 'Billing Settings',
|
||||
'UserSettings' => 'User Settings',
|
||||
'Login' => 'Login',
|
||||
'Email' => 'Email',
|
||||
'NewPassword' => 'New Password',
|
||||
'CreateResource' => 'Create Resource',
|
||||
'Inform' => 'Inform',
|
||||
'Element' => 'Element',
|
||||
'Exit' => 'Exit',
|
||||
'Url' => 'Url',
|
||||
'Preview' => 'Preview',
|
||||
'XPath' => 'XPath',
|
||||
'Comparison' => 'Comparison',
|
||||
'History' => 'History',
|
||||
'rstatus-1' => 'Resource added',
|
||||
'rstatus-2' => 'No change',
|
||||
'rstatus-3' => 'Changed',
|
||||
'rstatus--1' => 'Download error',
|
||||
'UserSettings' => 'User Settings',
|
||||
'Login' => 'Login',
|
||||
'Email' => 'Email',
|
||||
'NewPassword' => 'New Password',
|
||||
'CreateResource' => 'Create Resource',
|
||||
'Inform' => 'Inform',
|
||||
'Element' => 'Element',
|
||||
'Exit' => 'Exit',
|
||||
'Url' => 'Url',
|
||||
'Preview' => 'Preview',
|
||||
'XPath' => 'XPath',
|
||||
'Comparison' => 'Comparison',
|
||||
'History' => 'History',
|
||||
'rstatus-1' => 'Resource added',
|
||||
'rstatus-2' => 'No change',
|
||||
'rstatus-3' => 'Changed',
|
||||
'rstatus--1' => 'Download error',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
declare(strict_types=1);
|
||||
|
||||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use phpOMS\Uri\UriFactory;
|
|||
|
||||
/** @var \Modules\OnlineResourceWatcher\Models\Resource */
|
||||
$resource = $this->getData('resource') ?? new \Modules\OnlineResourceWatcher\Models\NullResource();
|
||||
$reports = $resource->reports;
|
||||
$reports = $resource->reports;
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
|
|
@ -82,10 +82,10 @@ $reports = $resource->reports;
|
|||
<div class="portlet-body col-simple">
|
||||
<?php
|
||||
|
||||
$type = '';
|
||||
$type = '';
|
||||
$basePath = __DIR__ . '/../../Files/' . $resource->path . '/' . $resource->lastVersionPath;
|
||||
$path = '';
|
||||
$webPath = 'Modules/OnlineResourceWatcher/Files/' . $resource->path . '/' . $resource->lastVersionPath;
|
||||
$path = '';
|
||||
$webPath = 'Modules/OnlineResourceWatcher/Files/' . $resource->path . '/' . $resource->lastVersionPath;
|
||||
|
||||
if (\is_file($basePath . '/index.jpg')) {
|
||||
$type = 'img';
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ use phpOMS\Event\EventManager;
|
|||
use phpOMS\Localization\L11nManager;
|
||||
use phpOMS\Message\Http\HttpRequest;
|
||||
use phpOMS\Message\Http\HttpResponse;
|
||||
use phpOMS\Message\Http\RequestStatusCode;
|
||||
use phpOMS\Module\ModuleAbstract;
|
||||
use phpOMS\Module\ModuleManager;
|
||||
use phpOMS\Router\WebRouter;
|
||||
|
|
@ -56,14 +55,14 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
protected string $appName = 'Api';
|
||||
};
|
||||
|
||||
$this->app->dbPool = $GLOBALS['dbpool'];
|
||||
$this->app->dbPool = $GLOBALS['dbpool'];
|
||||
$this->app->unitId = 1;
|
||||
$this->app->accountManager = new AccountManager($GLOBALS['session']);
|
||||
$this->app->appSettings = new CoreSettings();
|
||||
$this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules/');
|
||||
$this->app->dispatcher = new Dispatcher($this->app);
|
||||
$this->app->eventManager = new EventManager($this->app->dispatcher);
|
||||
$this->app->l11nManager = new L11nManager();
|
||||
$this->app->accountManager = new AccountManager($GLOBALS['session']);
|
||||
$this->app->appSettings = new CoreSettings();
|
||||
$this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules/');
|
||||
$this->app->dispatcher = new Dispatcher($this->app);
|
||||
$this->app->eventManager = new EventManager($this->app->dispatcher);
|
||||
$this->app->l11nManager = new L11nManager();
|
||||
$this->app->eventManager->importFromFile(__DIR__ . '/../../../Web/Api/Hooks.php');
|
||||
|
||||
$account = new Account();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user