Use root namespace

This commit is contained in:
Dennis Eichhorn 2018-05-30 13:39:00 +02:00
parent 004cb991d2
commit 307a9e52de
5 changed files with 8 additions and 8 deletions

View File

@ -38,7 +38,7 @@ class Navigation
*/
public static function install(string $path = null, DatabasePool $dbPool = null) : void
{
$navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);
$navData = \json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);
$class = '\\Modules\\Navigation\\Admin\\Installer';
/** @var $class \Modules\Navigation\Admin\Installer */

View File

@ -16,7 +16,7 @@
$log = $this->app->logger->getByLine((int) $this->request->getData('id') ?? 1);
$temp = trim($log['backtrace']);
$log['backtrace'] = json_decode($temp, true);
$log['backtrace'] = \json_decode($temp, true);
$details = '* Uri: `' . trim($log['path']) . "`\n"
. '* Level: `' . trim($log['level']) . "`\n"
@ -25,7 +25,7 @@ $details = '* Uri: `' . trim($log['path']) . "`\n"
. '* Line: `' . trim($log['line']) . "`\n"
. '* Version: `' . trim($log['version']) . "`\n"
. '* OS: `' . trim($log['os']) . "`\n\n"
. "Backtrace: \n\n```\n" . json_encode($log['backtrace'], JSON_PRETTY_PRINT);
. "Backtrace: \n\n```\n" . \json_encode($log['backtrace'], JSON_PRETTY_PRINT);
echo $this->getData('nav')->render(); ?>
@ -55,7 +55,7 @@ echo $this->getData('nav')->render(); ?>
<tr>
<td><?= $this->getHtml('Level') ?>
<td>
<i class="fa fa-<?= $this->printHtml(in_array($log['level'], ['notice', 'info', 'debug']) ? 'info-circle' : 'warning'); ?>"></i>
<i class="fa fa-<?= $this->printHtml(\in_array($log['level'], ['notice', 'info', 'debug']) ? 'info-circle' : 'warning'); ?>"></i>
<td><?= $this->printHtml($log['level']); ?>
<tr>
<td><?= $this->getHtml('Message') ?>
@ -81,7 +81,7 @@ echo $this->getData('nav')->render(); ?>
<td colspan="3"><?= $this->getHtml('Backtrace') ?>
<tr>
<td colspan="3">
<pre><?= $this->printHtml(json_encode($log['backtrace'], JSON_PRETTY_PRINT)); ?></pre>
<pre><?= $this->printHtml(\json_encode($log['backtrace'], JSON_PRETTY_PRINT)); ?></pre>
<tr>
<td colspan="3" style="padding-top: 10px"><a class="button" target="_blank"
href="https://gitreports.com/issue/Orange-Management/Orange-Management/?name=Guest&issue_title=<?= $this->printHtml(urlencode($log['message'])); ?>&details=<?= $this->printHtml(urlencode($details)); ?>"><?= $this->getHtml('Report') ?></a>

View File

@ -35,7 +35,7 @@ echo $this->getData('nav')->render(); ?>
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/monitoring/logs/single?{?}&id=' . $key);?>
<tr>
<td><a href=<?= $this->printHtml($url); ?>><i class="fa fa-clock-o"></i> <?= $this->printHtml($value[0] ?? ''); ?></a>
<td><a href=<?= $this->printHtml($url); ?>><i class="fa fa-<?= $this->printHtml(in_array($value[1], ['notice', 'info', 'debug']) ? 'info-circle' : 'warning'); ?>"></i> <?= $this->printHtml($value[1] ?? ''); ?></a>
<td><a href=<?= $this->printHtml($url); ?>><i class="fa fa-<?= $this->printHtml(\in_array($value[1], ['notice', 'info', 'debug']) ? 'info-circle' : 'warning'); ?>"></i> <?= $this->printHtml($value[1] ?? ''); ?></a>
<td><a href=<?= $this->printHtml($url); ?>><i class="fa fa-wifi"></i> <?= $this->printHtml($value[2] ?? ''); ?></a>
<td><a href=<?= $this->printHtml($url); ?>><i class="fa fa-commenting"></i> <?= $this->printHtml($value[7] ?? ''); ?></a>
<?php endforeach;

View File

@ -29,7 +29,7 @@ echo $this->getData('nav')->render(); ?>
<td><?= $this->getHtml('Deprecated') ?>
<td><?= $this->getHtml('Integrity') ?>
<tbody>
<?php foreach ($files as $key => $file) : $source = file_get_contents($file); ?>
<?php foreach ($files as $key => $file) : $source = \file_get_contents($file); ?>
<tr>
<td><?= $file; ?>
<td><?= \phpOMS\Security\PhpCode::hasUnicode($source); ?>

View File

@ -48,7 +48,7 @@ echo $this->getData('nav')->render(); ?>
<td><?= $this->getHtml('Modified') ?>
<td><?= $this->getHtml('Integrity') ?>
<tbody>
<?php foreach ($files as $file) : $content = file_get_contents(__DIR__ . '/../../../../phpOMS/' . $file); ?>
<?php foreach ($files as $file) : $content = \file_get_contents(__DIR__ . '/../../../../phpOMS/' . $file); ?>
<tr>
<td>
<td><?= $file; ?>