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