phpstan, php-cs-fixer review
parent
64a976ac19
commit
f59402ee58
|
@ -76,7 +76,7 @@ function cinecturlink2AdminIcon(): string
|
|||
return urldecode(dcPage::getPF('cinecturlink2/icon.svg'));
|
||||
}
|
||||
|
||||
function cinecturlink2AdminPerm(): bool
|
||||
function cinecturlink2AdminPerm(): string
|
||||
{
|
||||
return dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]);
|
||||
}
|
||||
|
|
|
@ -17,5 +17,5 @@ if (!defined('DC_RC_PATH')) {
|
|||
class initCinecturlink2
|
||||
{
|
||||
public const CINECTURLINK_TABLE_NAME = 'cinecturlink2';
|
||||
public const CATEGORY_TABLE_NAME = 'cinecturlink2_cat';
|
||||
public const CATEGORY_TABLE_NAME = 'cinecturlink2_cat';
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ if (!defined('DC_CONTEXT_ADMIN')) {
|
|||
|
||||
try {
|
||||
if (!dcCore::app()->newVersion(
|
||||
basename(__DIR__),
|
||||
basename(__DIR__),
|
||||
dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version')
|
||||
)) {
|
||||
return null;
|
||||
|
|
|
@ -163,7 +163,8 @@ class cinecturlink2Widget
|
|||
return null;
|
||||
}
|
||||
|
||||
$C2 = new cinecturlink2();
|
||||
$C2 = new cinecturlink2();
|
||||
$aprams = [];
|
||||
|
||||
if ($w->category) {
|
||||
if ($w->category == 'null') {
|
||||
|
|
|
@ -37,10 +37,10 @@ class cinecturlink2
|
|||
{
|
||||
dcCore::app()->blog->settings->addNamespace('cinecturlink2');
|
||||
|
||||
$this->con = dcCore::app()->con;
|
||||
$this->table = dcCore::app()->prefix . initCinecturlink2::CINECTURLINK_TABLE_NAME;
|
||||
$this->con = dcCore::app()->con;
|
||||
$this->table = dcCore::app()->prefix . initCinecturlink2::CINECTURLINK_TABLE_NAME;
|
||||
$this->cat_table = dcCore::app()->prefix . initCinecturlink2::CATEGORY_TABLE_NAME;
|
||||
$this->blog = dcCore::app()->con->escape(dcCore::app()->blog->id);
|
||||
$this->blog = dcCore::app()->con->escape(dcCore::app()->blog->id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -105,10 +105,10 @@ class adminlistCinecturlink2
|
|||
private function linkLine($checked)
|
||||
{
|
||||
$cols = [
|
||||
'check' => '<td class="nowrap minimal">' .
|
||||
'check' => '<td class="nowrap minimal">' .
|
||||
form::checkbox(['entries[]'], $this->rs->link_id, ['checked' => $checked]) .
|
||||
'</td>',
|
||||
'title' => '<td class="nowrap" scope="row">' .
|
||||
'title' => '<td class="nowrap" scope="row">' .
|
||||
'<a href="' . dcCore::app()->adminurl->get(
|
||||
'admin.plugin.cinecturlink2',
|
||||
['part' => 'link', 'linkid' => $this->rs->link_id, 'redir' => $this->redir]
|
||||
|
@ -118,10 +118,10 @@ class adminlistCinecturlink2
|
|||
'author' => '<td class="nowrap">' .
|
||||
html::escapeHTML($this->rs->link_author) .
|
||||
'</td>',
|
||||
'desc' => '<td class="maximal">' .
|
||||
'desc' => '<td class="maximal">' .
|
||||
html::escapeHTML($this->rs->link_desc) .
|
||||
'</td>',
|
||||
'link' => '<td class="nowrap">' .
|
||||
'link' => '<td class="nowrap">' .
|
||||
'<a href="' . $this->rs->link_url . '" title="' .
|
||||
html::escapeHTML($this->rs->link_url) .
|
||||
'">' . __('URL') . '</a> ' .
|
||||
|
@ -129,18 +129,18 @@ class adminlistCinecturlink2
|
|||
html::escapeHTML($this->rs->link_img) .
|
||||
'">' . __('image') . '</a> ' .
|
||||
'</td>',
|
||||
'cat' => '<td class="nowrap minimal">' .
|
||||
'cat' => '<td class="nowrap minimal">' .
|
||||
'<a href="' . dcCore::app()->adminurl->get(
|
||||
'admin.plugin.cinecturlink2',
|
||||
['part' => 'cat', 'catid' => $this->rs->cat_id, 'redir' => $this->redir]
|
||||
) . '" title="' . __('Edit') . '">' .
|
||||
html::escapeHTML($this->rs->cat_title) . '</a>' .
|
||||
'</td>',
|
||||
'note' => '</td>' .
|
||||
'note' => '</td>' .
|
||||
'<td class="nowrap count minimal">' .
|
||||
html::escapeHTML($this->rs->link_note) . '/20' .
|
||||
'</td>',
|
||||
'date' => '<td class="nowrap count minimal">' .
|
||||
'date' => '<td class="nowrap count minimal">' .
|
||||
dt::dt2str(
|
||||
dcCore::app()->blog->settings->system->date_format . ', ' . dcCore::app()->blog->settings->system->time_format,
|
||||
$this->rs->link_upddt,
|
||||
|
|
Loading…
Reference in New Issue