mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-01-19 02:58:41 +00:00
auto fixes
This commit is contained in:
parent
696f5c371d
commit
2ebd697c6b
|
|
@ -97,9 +97,9 @@ final class Installer extends InstallerAbstract
|
|||
continue;
|
||||
}
|
||||
|
||||
$taskAttrType[$attribute['name']] = !\is_array($responseData['response'])
|
||||
? $responseData['response']->toArray()
|
||||
: $responseData['response'];
|
||||
$taskAttrType[$attribute['name']] = \is_array($responseData['response'])
|
||||
? $responseData['response']
|
||||
: $responseData['response']->toArray();
|
||||
|
||||
$isFirst = true;
|
||||
foreach ($attribute['l11n'] as $language => $l11n) {
|
||||
|
|
@ -169,9 +169,9 @@ final class Installer extends InstallerAbstract
|
|||
continue;
|
||||
}
|
||||
|
||||
$attrValue = !\is_array($responseData['response'])
|
||||
? $responseData['response']->toArray()
|
||||
: $responseData['response'];
|
||||
$attrValue = \is_array($responseData['response'])
|
||||
? $responseData['response']
|
||||
: $responseData['response']->toArray();
|
||||
|
||||
$taskAttrValue[$attribute['name']][] = $attrValue;
|
||||
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ final class ApiController extends Controller
|
|||
if (($val['status'] = !TaskStatus::isValidValue((int) $request->getData('status')))
|
||||
|| ($val['due'] = !((bool) \strtotime((string) $request->getData('due'))))
|
||||
|| ($val['task'] = !(\is_numeric($request->getData('task'))))
|
||||
|| ($val['forward'] = !(\is_numeric(!$request->hasData('forward') ? $request->header->account : $request->getData('forward'))))
|
||||
|| ($val['forward'] = !(\is_numeric($request->hasData('forward') ? $request->getData('forward') : $request->header->account)))
|
||||
) {
|
||||
return $val;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ use phpOMS\Uri\UriFactory;
|
|||
<?php
|
||||
$c = 0;
|
||||
foreach ($this->tasks as $key => $task) : ++$c;
|
||||
$url = UriFactory::build(!empty($task->redirect) ? $task->redirect : ('task/single?{?}&id=' . $task->id));
|
||||
$url = UriFactory::build(empty($task->redirect) ? 'task/single?{?}&id=' . $task->id : ($task->redirect));
|
||||
|
||||
$color = 'darkred';
|
||||
if ($task->getStatus() === TaskStatus::DONE) { $color = 'green'; }
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ $tasksList = $this->getData('tasks') ?? [];
|
|||
<?php
|
||||
$c = 0;
|
||||
foreach ($tasksList as $key => $task) : ++$c;
|
||||
$url = UriFactory::build(!empty($task->redirect)
|
||||
? $task->redirect
|
||||
: ('task/single?{?}&id=' . $task->id)
|
||||
$url = UriFactory::build(empty($task->redirect)
|
||||
? 'task/single?{?}&id=' . $task->id
|
||||
: ($task->redirect)
|
||||
);
|
||||
?>
|
||||
<tr data-href="<?= $url; ?>">
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php
|
||||
$c = 0;
|
||||
foreach ($open as $key => $task) : ++$c;
|
||||
$url = UriFactory::build(!empty($task->redirect)
|
||||
? '{/app}/' . $task->redirect
|
||||
: ('task/single?{?}&id=' . $task->id),
|
||||
$url = UriFactory::build(empty($task->redirect)
|
||||
? 'task/single?{?}&id=' . $task->id
|
||||
: ('{/app}/' . $task->redirect),
|
||||
['$id' => $task->id]
|
||||
);
|
||||
?>
|
||||
|
|
@ -79,7 +79,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
|
||||
<a href="<?= $url; ?>">
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<td data-label="<?= $this->getHtml('Creator'); ?>">
|
||||
|
|
@ -112,9 +112,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php
|
||||
$c = 0;
|
||||
foreach ($open as $key => $task) : ++$c;
|
||||
$url = UriFactory::build(!empty($task->redirect)
|
||||
? '{/app}/' . $task->redirect
|
||||
: ('task/single?{?}&id=' . $task->id),
|
||||
$url = UriFactory::build(empty($task->redirect)
|
||||
? 'task/single?{?}&id=' . $task->id
|
||||
: ('{/app}/' . $task->redirect),
|
||||
['$id' => $task->id]
|
||||
);
|
||||
?>
|
||||
|
|
@ -138,7 +138,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
|
||||
<a href="<?= $url; ?>">
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<td data-label="<?= $this->getHtml('Creator'); ?>">
|
||||
|
|
@ -176,9 +176,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
}
|
||||
|
||||
++$c;
|
||||
$url = UriFactory::build(!empty($task->redirect)
|
||||
? '{/app}/' . $task->redirect
|
||||
: ('task/single?{?}&id=' . $task->id),
|
||||
$url = UriFactory::build(empty($task->redirect)
|
||||
? 'task/single?{?}&id=' . $task->id
|
||||
: ('{/app}/' . $task->redirect),
|
||||
['$id' => $task->id]
|
||||
);
|
||||
?>
|
||||
|
|
@ -202,7 +202,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
|
||||
<a href="<?= $url; ?>">
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<td data-label="<?= $this->getHtml('Creator'); ?>">
|
||||
|
|
@ -242,9 +242,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php
|
||||
$c = 0;
|
||||
foreach ($open as $key => $task) : ++$c;
|
||||
$url = UriFactory::build(!empty($task->redirect)
|
||||
? '{/app}/' . $task->redirect
|
||||
: ('task/single?{?}&id=' . $task->id),
|
||||
$url = UriFactory::build(empty($task->redirect)
|
||||
? 'task/single?{?}&id=' . $task->id
|
||||
: ('{/app}/' . $task->redirect),
|
||||
['$id' => $task->id]
|
||||
);
|
||||
?>
|
||||
|
|
@ -268,7 +268,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
|
||||
<a href="<?= $url; ?>">
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<td data-label="<?= $this->getHtml('Creator'); ?>">
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
data-tpl-text-path="/0/response/description"
|
||||
data-value=""><?= $task->description; ?></article>
|
||||
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<?php endforeach; ?>
|
||||
<?php if (!empty($taskMedia)) : ?>
|
||||
<div>
|
||||
|
|
@ -380,7 +380,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="form-group">
|
||||
<label for="iDue"><?= $this->getHtml('Due'); ?></label>
|
||||
<input type="datetime-local" id="iDue" name="due" value="<?= $this->printHtml(
|
||||
!empty($elements) ? \end($elements)->due->format('Y-m-d\TH:i:s') : $task->due->format('Y-m-d\TH:i:s')
|
||||
empty($elements) ? $task->due->format('Y-m-d\TH:i:s') : \end($elements)->due->format('Y-m-d\TH:i:s')
|
||||
); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ function phpServe() : void
|
|||
|
||||
// Execute the command and store the process ID
|
||||
$output = [];
|
||||
echo \sprintf('Starting server...') . \PHP_EOL;
|
||||
echo 'Starting server...' . \PHP_EOL;
|
||||
echo \sprintf(' Current directory: %s', \getcwd()) . \PHP_EOL;
|
||||
echo \sprintf(' %s', $command);
|
||||
\exec($command, $output);
|
||||
|
|
@ -406,7 +406,7 @@ function phpServe() : void
|
|||
|
||||
// Kill the web server when the process ends
|
||||
\register_shutdown_function(function() use ($killCommand, $pid) : void {
|
||||
echo \PHP_EOL . \sprintf('Stopping server...') . \PHP_EOL;
|
||||
echo \PHP_EOL . 'Stopping server...' . \PHP_EOL;
|
||||
echo \sprintf(' %s - Killing process with ID %d', \date('r'), $pid) . \PHP_EOL;
|
||||
\exec($killCommand . $pid);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user