don't give a f* about module name

This commit is contained in:
Jean-Christian Paul Denis 2022-12-10 17:16:41 +01:00
parent 3da605b8cf
commit 31ba55df92
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
11 changed files with 69 additions and 71 deletions

View File

@ -14,7 +14,7 @@ if (!defined('DC_CONTEXT_ADMIN')) {
return null; return null;
} }
dcCore::app()->blog->settings->addNamespace('zoneclearFeedServer'); dcCore::app()->blog->settings->addNamespace(basename(__DIR__));
require_once __DIR__ . '/_widgets.php'; require_once __DIR__ . '/_widgets.php';
@ -22,15 +22,15 @@ $perm = dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([
dcAuth::PERMISSION_CONTENT_ADMIN, dcAuth::PERMISSION_CONTENT_ADMIN,
]), dcCore::app()->blog->id); ]), dcCore::app()->blog->id);
if (dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_active if (dcCore::app()->blog->settings->__get(basename(__DIR__))->zoneclearFeedServer_active
&& '' != dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_user && '' != dcCore::app()->blog->settings->__get(basename(__DIR__))->zoneclearFeedServer_user
) { ) {
dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem( dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem(
__('Feeds server'), __('Feeds server'),
dcCore::app()->adminurl->get('admin.plugin.zoneclearFeedServer'), dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__)),
dcPage::getPF('zoneclearFeedServer/icon.svg'), dcPage::getPF(basename(__DIR__) . '/icon.svg'),
preg_match( preg_match(
'/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.zoneclearFeedServer')) . '(&.*)?$/', '/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__))) . '(&.*)?$/',
$_SERVER['REQUEST_URI'] $_SERVER['REQUEST_URI']
), ),
$perm $perm
@ -94,9 +94,9 @@ class zcfsAdminBehaviors
{ {
$favs->register('zcfs', [ $favs->register('zcfs', [
'title' => __('Feeds server'), 'title' => __('Feeds server'),
'url' => dcCore::app()->adminurl->get('admin.plugin.zoneclearFeedServer'), 'url' => dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__)),
'small-icon' => dcPage::getPF('zoneclearFeedServer/icon.svg'), 'small-icon' => dcPage::getPF(basename(__DIR__) . '/icon.svg'),
'large-icon' => dcPage::getPF('zoneclearFeedServer/icon.svg'), 'large-icon' => dcPage::getPF(basename(__DIR__) . '/icon.svg'),
'permissions' => dcCore::app()->auth->makePermissions([ 'permissions' => dcCore::app()->auth->makePermissions([
dcAuth::PERMISSION_USAGE, dcAuth::PERMISSION_USAGE,
dcAuth::PERMISSION_CONTENT_ADMIN, dcAuth::PERMISSION_CONTENT_ADMIN,
@ -120,9 +120,9 @@ class zcfsAdminBehaviors
} }
$fav['title'] .= '<br />' . sprintf(__('%s feed disabled', '%s feeds disabled', $count), $count); $fav['title'] .= '<br />' . sprintf(__('%s feed disabled', '%s feeds disabled', $count), $count);
$fav['large-icon'] = dcPage::getPF('zoneclearFeedServer/icon-pdate.svg'); $fav['large-icon'] = dcPage::getPF(basename(__DIR__) . '/icon-update.svg');
$fav['url'] = dcCore::app()->adminurl->get( $fav['url'] = dcCore::app()->adminurl->get(
'admin.plugin.zoneclearFeedServer', 'admin.plugin.' . basename(__DIR__),
['part' => 'feeds', 'sortby' => 'feed_status', 'order' => 'asc'] ['part' => 'feeds', 'sortby' => 'feed_status', 'order' => 'asc']
); );
} }
@ -183,7 +183,7 @@ class zcfsAdminBehaviors
*/ */
public static function adminPostHeaders() public static function adminPostHeaders()
{ {
return dcPage::jsLoad(dcPage::getPF('zoneclearFeedServer/js/post.js')); return dcPage::jsLoad(dcPage::getPF(basename(__DIR__) . '/js/post.js'));
} }
/** /**
@ -241,7 +241,7 @@ class zcfsAdminBehaviors
$edit = sprintf( $edit = sprintf(
'<p><a href="%s">%s</a></p>', '<p><a href="%s">%s</a></p>',
dcCore::app()->adminurl->get( dcCore::app()->adminurl->get(
'admin.plugin.zoneclearFeedServer', 'admin.plugin.' . basename(__DIR__),
['part' => 'feed', 'feed_id' => $fid->meta_id] ['part' => 'feed', 'feed_id' => $fid->meta_id]
), ),
__('Edit this feed') __('Edit this feed')

View File

@ -17,8 +17,8 @@ if (!defined('DC_CONTEXT_MODULE')) {
$redir = empty($_REQUEST['redir']) ? dcCore::app()->admin->list->getURL() . '#plugins' : $_REQUEST['redir']; $redir = empty($_REQUEST['redir']) ? dcCore::app()->admin->list->getURL() . '#plugins' : $_REQUEST['redir'];
# -- Get settings -- # -- Get settings --
dcCore::app()->blog->settings->addNamespace('zoneclearFeedServer'); dcCore::app()->blog->settings->addNamespace(basename(__DIR__));
$s = dcCore::app()->blog->settings->zoneclearFeedServer; $s = dcCore::app()->blog->settings->__get(basename(__DIR__));
$active = (bool) $s->zoneclearFeedServer_active; $active = (bool) $s->zoneclearFeedServer_active;
$pub_active = (bool) $s->zoneclearFeedServer_pub_active; $pub_active = (bool) $s->zoneclearFeedServer_pub_active;
@ -79,7 +79,7 @@ if (!empty($_POST['save'])) {
); );
dcCore::app()->adminurl->redirect( dcCore::app()->adminurl->redirect(
'admin.plugins', 'admin.plugins',
['module' => 'zoneclearFeedServer', 'conf' => 1, 'redir' => dcCore::app()->admin->list->getRedir()] ['module' => basename(__DIR__), 'conf' => 1, 'redir' => dcCore::app()->admin->list->getRedir()]
); );
} catch (Exception $e) { } catch (Exception $e) {
dcCore::app()->error->add($e->getMessage()); dcCore::app()->error->add($e->getMessage());
@ -124,7 +124,7 @@ __('Enable plugin') . '</label></p>
<div class="fieldset">'; <div class="fieldset">';
if (dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_pub_active) { if ($s->zoneclearFeedServer_pub_active) {
echo sprintf( echo sprintf(
'<p><a class="onblog_link outgoing" href="%s" title="%s">%s <img alt="" src="images/outgoing-link.svg"></a></p>', '<p><a class="onblog_link outgoing" href="%s" title="%s">%s <img alt="" src="images/outgoing-link.svg"></a></p>',
$pub_page_url, $pub_page_url,

View File

@ -25,8 +25,8 @@ $this->registerModule(
dcAuth::PERMISSION_CONTENT_ADMIN, dcAuth::PERMISSION_CONTENT_ADMIN,
]), ]),
'type' => 'plugin', 'type' => 'plugin',
'support' => 'https://github.com/JcDenis/zoneclearFeedServer', 'support' => 'https://github.com/JcDenis/' . basename(__DIR__),
'details' => 'https://plugins.dotaddict.org/dc2/details/pacKman', 'details' => 'https://plugins.dotaddict.org/dc2/details/' . basename(__DIR__),
'repository' => 'https://raw.githubusercontent.com/JcDenis/zoneclearFeedServer/master/dcstore.xml', 'repository' => 'https://raw.githubusercontent.com/JcDenis/' . basename(__DIR__) . '/master/dcstore.xml',
] ]
); );

View File

@ -16,5 +16,5 @@ if (!defined('DC_RC_PATH')) {
class initZoneclearFeedServer class initZoneclearFeedServer
{ {
public const FEED_TABLE_NAME = 'zc_feed'; public const TABLE_NAME = 'zc_feed';
} }

View File

@ -25,7 +25,7 @@ try {
# Tables # Tables
$t = new dbStruct(dcCore::app()->con, dcCore::app()->prefix); $t = new dbStruct(dcCore::app()->con, dcCore::app()->prefix);
$t->{initZoneclearFeedServer::FEED_TABLE_NAME} $t->{initZoneclearFeedServer::TABLE_NAME}
->feed_id('bigint', 0, false) ->feed_id('bigint', 0, false)
->feed_creadt('timestamp', 0, false, 'now()') ->feed_creadt('timestamp', 0, false, 'now()')
->feed_upddt('timestamp', 0, false, 'now()') ->feed_upddt('timestamp', 0, false, 'now()')

View File

@ -15,8 +15,8 @@ if (!defined('DC_RC_PATH')) {
} }
# Namespace for settings # Namespace for settings
dcCore::app()->blog->settings->addNamespace('zoneclearFeedServer'); dcCore::app()->blog->settings->addNamespace(basename(__DIR__));
$s = dcCore::app()->blog->settings->zoneclearFeedServer; $s = dcCore::app()->blog->settings->__get(basename(__DIR__));
# Widgets # Widgets
require_once __DIR__ . '/_widgets.php'; require_once __DIR__ . '/_widgets.php';
@ -236,7 +236,7 @@ class zcfsRsExtPosts extends rsExtPost
public static function getURL(dcRecord $rs): string public static function getURL(dcRecord $rs): string
{ {
$url = $rs->zcFeed('url'); $url = $rs->zcFeed('url');
$types = @unserialize(dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_post_title_redir); $types = @unserialize(dcCore::app()->blog->settings->__get(basename(__DIR__))->zoneclearFeedServer_post_title_redir);
$full = is_array($types) && in_array(dcCore::app()->url->type, $types); $full = is_array($types) && in_array(dcCore::app()->url->type, $types);
return $url && $full ? return $url && $full ?
@ -257,7 +257,7 @@ class zcfsRsExtPosts extends rsExtPost
$content = self::zcFeedBrother('getContent', [&$rs, $absolute_urls]); $content = self::zcFeedBrother('getContent', [&$rs, $absolute_urls]);
if ($url && $sitename && $rs->post_type == 'post') { if ($url && $sitename && $rs->post_type == 'post') {
$types = @unserialize(dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_post_full_tpl); $types = @unserialize(dcCore::app()->blog->settings->__get(basename(__DIR__))->zoneclearFeedServer_post_full_tpl);
if (is_array($types) && in_array(dcCore::app()->url->type, $types)) { if (is_array($types) && in_array(dcCore::app()->url->type, $types)) {
return $content . sprintf( return $content . sprintf(
@ -297,7 +297,7 @@ class zcfsUrlHandler extends dcUrlHandlers
*/ */
public static function zcFeedsPage($args) public static function zcFeedsPage($args)
{ {
$s = dcCore::app()->blog->settings->zoneclearFeedServer; $s = dcCore::app()->blog->settings->__get(basename(__DIR__));
# Not active # Not active
if (!$s->zoneclearFeedServer_active) { if (!$s->zoneclearFeedServer_active) {

View File

@ -14,15 +14,13 @@ if (!defined('DC_CONTEXT_ADMIN')) {
return null; return null;
} }
$mod_id = 'zoneclearFeedServer';
$this->addUserAction( $this->addUserAction(
/* type */ /* type */
'settings', 'settings',
/* action */ /* action */
'delete_all', 'delete_all',
/* ns */ /* ns */
$mod_id, basename(__DIR__),
/* desc */ /* desc */
__('delete all settings') __('delete all settings')
); );
@ -32,7 +30,7 @@ $this->addUserAction(
/* action */ /* action */
'delete', 'delete',
/* ns */ /* ns */
initZoneclearFeedServer::FEED_TABLE_NAME, initZoneclearFeedServer::TABLE_NAME,
/* desc */ /* desc */
__('delete table') __('delete table')
); );
@ -42,7 +40,7 @@ $this->addUserAction(
/* action */ /* action */
'delete', 'delete',
/* ns */ /* ns */
$mod_id, basename(__DIR__),
/* desc */ /* desc */
__('delete plugin files') __('delete plugin files')
); );
@ -52,7 +50,7 @@ $this->addUserAction(
/* action */ /* action */
'delete', 'delete',
/* ns */ /* ns */
$mod_id, basename(__DIR__),
/* desc */ /* desc */
__('delete the version number') __('delete the version number')
); );
@ -63,9 +61,9 @@ $this->addDirectAction(
/* action */ /* action */
'delete_all', 'delete_all',
/* ns */ /* ns */
$mod_id, basename(__DIR__),
/* desc */ /* desc */
sprintf(__('delete all %s settings'), $mod_id) sprintf(__('delete all %s settings'), basename(__DIR__))
); );
$this->addDirectAction( $this->addDirectAction(
/* type */ /* type */
@ -73,9 +71,9 @@ $this->addDirectAction(
/* action */ /* action */
'delete', 'delete',
/* ns */ /* ns */
initZoneclearFeedServer::FEED_TABLE_NAME, initZoneclearFeedServer::TABLE_NAME,
/* desc */ /* desc */
sprintf(__('delete %s table'), $mod_id) sprintf(__('delete %s table'), basename(__DIR__))
); );
$this->addDirectAction( $this->addDirectAction(
/* type */ /* type */
@ -83,9 +81,9 @@ $this->addDirectAction(
/* action */ /* action */
'delete', 'delete',
/* ns */ /* ns */
$mod_id, basename(__DIR__),
/* desc */ /* desc */
sprintf(__('delete %s plugin files'), $mod_id) sprintf(__('delete %s plugin files'), basename(__DIR__))
); );
$this->addDirectAction( $this->addDirectAction(
/* type */ /* type */
@ -93,9 +91,9 @@ $this->addDirectAction(
/* action */ /* action */
'delete', 'delete',
/* ns */ /* ns */
$mod_id, basename(__DIR__),
/* desc */ /* desc */
sprintf(__('delete %s version number'), $mod_id) sprintf(__('delete %s version number'), basename(__DIR__))
); );
$this->addDirectCallback( $this->addDirectCallback(
/* function */ /* function */
@ -106,7 +104,7 @@ $this->addDirectCallback(
function zoneclearfeedServerUninstall($id) function zoneclearfeedServerUninstall($id)
{ {
if ($id != 'zoneclearFeedServer') { if ($id != basename(__DIR__)) {
return null; return null;
} }
//... //...

View File

@ -152,7 +152,7 @@ class zoneclearFeedServerWidget
return null; return null;
} }
if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_active if (!dcCore::app()->blog->settings->__get(basename(__DIR__))->zoneclearFeedServer_active
|| !$w->checkHomeOnly(dcCore::app()->url->type) || !$w->checkHomeOnly(dcCore::app()->url->type)
) { ) {
return null; return null;
@ -184,7 +184,7 @@ class zoneclearFeedServerWidget
$i++; $i++;
} }
$pub = ''; $pub = '';
if ($w->pagelink && dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_pub_active) { if ($w->pagelink && dcCore::app()->blog->settings->__get(basename(__DIR__))->zoneclearFeedServer_pub_active) {
$pub = sprintf( $pub = sprintf(
'<p><strong><a href="%s">%s</a></strong></p>', '<p><strong><a href="%s">%s</a></strong></p>',
dcCore::app()->blog->url . dcCore::app()->url->getBase('zoneclearFeedsPage'), dcCore::app()->blog->url . dcCore::app()->url->getBase('zoneclearFeedsPage'),
@ -212,7 +212,7 @@ class zoneclearFeedServerWidget
return; return;
} }
if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_active if (!dcCore::app()->blog->settings->__get(basename(__DIR__))->zoneclearFeedServer_active
|| !$w->checkHomeOnly(dcCore::app()->url->type) || !$w->checkHomeOnly(dcCore::app()->url->type)
) { ) {
return null; return null;
@ -232,7 +232,7 @@ class zoneclearFeedServerWidget
$text = $count ? sprintf(__('one source', '%d sources', $count), $count) : __('no sources'); $text = $count ? sprintf(__('one source', '%d sources', $count), $count) : __('no sources');
if (dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_pub_active) { if (dcCore::app()->blog->settings->__get(basename(__DIR__))->zoneclearFeedServer_pub_active) {
$text = sprintf( $text = sprintf(
'<a href="%s">%s</a>', '<a href="%s">%s</a>',
dcCore::app()->blog->url . dcCore::app()->url->getBase('zoneclearFeedsPage'), dcCore::app()->blog->url . dcCore::app()->url->getBase('zoneclearFeedsPage'),

View File

@ -38,7 +38,7 @@ class zoneclearFeedServer
{ {
$this->con = dcCore::app()->con; $this->con = dcCore::app()->con;
$this->blog = dcCore::app()->con->escape(dcCore::app()->blog->id); $this->blog = dcCore::app()->con->escape(dcCore::app()->blog->id);
$this->table = dcCore::app()->prefix . initZoneclearFeedServer::FEED_TABLE_NAME; $this->table = dcCore::app()->prefix . initZoneclearFeedServer::TABLE_NAME;
} }
/** /**
@ -395,7 +395,7 @@ class zoneclearFeedServer
*/ */
public function checkFeedsUpdate($id = null, $throw = false) public function checkFeedsUpdate($id = null, $throw = false)
{ {
$s = dcCore::app()->blog->settings->zoneclearFeedServer; $s = dcCore::app()->blog->settings->__get(basename(dirname('../' . __DIR__)));
# Not configured # Not configured
if (!$s->zoneclearFeedServer_active || !$s->zoneclearFeedServer_user) { if (!$s->zoneclearFeedServer_active || !$s->zoneclearFeedServer_user) {

View File

@ -98,7 +98,7 @@ class zcfsFeedsList extends adminGenericList
$shunk_feed = substr($shunk_feed, 0, 50) . '...' . substr($shunk_feed, -20); $shunk_feed = substr($shunk_feed, 0, 50) . '...' . substr($shunk_feed, -20);
} }
$url = 'plugin.php?p=zoneclearFeedServer&amp;part=feed&amp;feed_id=' . $this->rs->feed_id; $url = dcCore::app()->adminurl->get('admin.plugin.' . basename(dirname('../' . __DIR__)), ['part' => 'feed', 'feed_id' => $this->rs->feed_id]);
$cols = [ $cols = [
'check' => '<td class="nowrap minimal">' . 'check' => '<td class="nowrap minimal">' .

View File

@ -28,8 +28,8 @@ dcPage::check(dcCore::app()->auth->makePermissions([
$zcfs = new zoneclearFeedServer(); $zcfs = new zoneclearFeedServer();
# Not configured # Not configured
if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_active if (!dcCore::app()->blog->settings->__get(basename(__DIR__))->zoneclearFeedServer_active
|| !dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_user || !dcCore::app()->blog->settings->__get(basename(__DIR__))->zoneclearFeedServer_user
) { ) {
echo echo
'<html><head><title>' . __('Feeds server') . '</title></head><body>' . '<html><head><title>' . __('Feeds server') . '</title></head><body>' .
@ -224,7 +224,7 @@ if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_act
__('Feed successfully updated.') __('Feed successfully updated.')
); );
dcCore::app()->adminurl->redirect( dcCore::app()->adminurl->redirect(
'admin.plugin.zoneclearFeedServer', 'admin.plugin.' . basename(__DIR__),
['part' => 'feed', 'feed_id' => $feed_id] ['part' => 'feed', 'feed_id' => $feed_id]
); );
} catch (Exception $e) { } catch (Exception $e) {
@ -244,7 +244,7 @@ if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_act
__('Feed successfully created.') __('Feed successfully created.')
); );
dcCore::app()->adminurl->redirect( dcCore::app()->adminurl->redirect(
'admin.plugin.zoneclearFeedServer', 'admin.plugin.' . basename(__DIR__),
['part' => 'feed', 'feed_id' => $return_id] ['part' => 'feed', 'feed_id' => $return_id]
); );
} catch (Exception $e) { } catch (Exception $e) {
@ -259,7 +259,7 @@ if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_act
$posts_actions_page = new dcPostsActions( $posts_actions_page = new dcPostsActions(
'plugin.php', 'plugin.php',
[ [
'p' => 'zoneclearFeedServer', 'p' => basename(__DIR__),
'part' => 'feed', 'part' => 'feed',
'feed_id' => $feed_id, 'feed_id' => $feed_id,
'_ANCHOR' => 'entries', '_ANCHOR' => 'entries',
@ -309,8 +309,8 @@ if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_act
echo echo
'<html><head><title>' . __('Feeds server') . '</title>' . '<html><head><title>' . __('Feeds server') . '</title>' .
($feed_id && !dcCore::app()->error->flag() ? ($feed_id && !dcCore::app()->error->flag() ?
$post_filter->js(dcCore::app()->adminurl->get('admin.plugin.zoneclearFeedServer', ['part' => 'feed', 'feed_id' => $feed_id], '&') . '#entries') . $post_filter->js(dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__), ['part' => 'feed', 'feed_id' => $feed_id], '&') . '#entries') .
dcPage::jsLoad(dcPage::getPF('zoneclearFeedServer/js/list.js')) dcPage::jsLoad(dcPage::getPF(basename(__DIR__) . '/js/list.js'))
: '') . : '') .
dcPage::jsPageTabs() . dcPage::jsPageTabs() .
$next_headlink . "\n" . $prev_headlink . $next_headlink . "\n" . $prev_headlink .
@ -426,7 +426,7 @@ if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_act
'<p class="clear"> '<p class="clear">
<input type="submit" name="save" value="' . __('Save') . ' (s)" accesskey="s"/>' . <input type="submit" name="save" value="' . __('Save') . ' (s)" accesskey="s"/>' .
dcCore::app()->adminurl->getHiddenFormFields('admin.plugin.zoneclearFeedServer', [ dcCore::app()->adminurl->getHiddenFormFields('admin.plugin.' . basename(__DIR__), [
'part' => 'feed', 'part' => 'feed',
'feed_id' => $feed_id, 'feed_id' => $feed_id,
'action' => 'savefeed', 'action' => 'savefeed',
@ -443,8 +443,8 @@ if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_act
# show filters # show filters
$post_filter->display( $post_filter->display(
['admin.plugin.zoneclearFeedServer','#entries'], ['admin.plugin.' . basename(__DIR__),'#entries'],
dcCore::app()->adminurl->getHiddenFormFields('admin.plugin.zoneclearFeedServer', [ dcCore::app()->adminurl->getHiddenFormFields('admin.plugin.' . basename(__DIR__), [
'part' => 'feed', 'part' => 'feed',
'feed_id' => $feed_id, 'feed_id' => $feed_id,
]) ])
@ -459,8 +459,8 @@ if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_act
$post_list->display( $post_list->display(
$post_filter->page, $post_filter->page,
$post_filter->nb, $post_filter->nb,
dcCore::app()->adminurl->get('admin.plugin.zoneclearFeedServer', $args, '&') . '#entries', dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__), $args, '&') . '#entries',
'<form action="' . dcCore::app()->adminurl->get('admin.plugin.zoneclearFeedServer', ['part' => 'feed']) . '#entries" method="post" id="form-entries">' . '<form action="' . dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__), ['part' => 'feed']) . '#entries" method="post" id="form-entries">' .
'%s' . '%s' .
'<div class="two-cols">' . '<div class="two-cols">' .
@ -469,8 +469,8 @@ if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_act
'<p class="col right">' . __('Selected entries action:') . ' ' . '<p class="col right">' . __('Selected entries action:') . ' ' .
form::combo('action', $posts_actions_page->getCombo()) . form::combo('action', $posts_actions_page->getCombo()) .
'<input type="submit" name="save" value="' . __('ok') . '" /></p>' . '<input type="submit" name="save" value="' . __('ok') . '" /></p>' .
dcCore::app()->adminurl->getHiddenFormFields('admin.plugin.zoneclearFeedServer', $post_filter->values()) . dcCore::app()->adminurl->getHiddenFormFields('admin.plugin.' . basename(__DIR__), $post_filter->values()) .
form::hidden('redir', dcCore::app()->adminurl->get('admin.plugin.zoneclearFeedServer', $post_filter->values())) . form::hidden('redir', dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__), $post_filter->values())) .
dcCore::app()->formNonce() . dcCore::app()->formNonce() .
'</div>' . '</div>' .
'</form>', '</form>',
@ -489,7 +489,7 @@ if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_act
# actions # actions
$feeds_actions_page = new zcfsFeedsActionsPage( $feeds_actions_page = new zcfsFeedsActionsPage(
'plugin.php', 'plugin.php',
['p' => 'zoneclearFeedServer', 'part' => 'feeds'] ['p' => basename(__DIR__), 'part' => 'feeds']
); );
if ($feeds_actions_page->process()) { if ($feeds_actions_page->process()) {
return null; return null;
@ -518,8 +518,8 @@ if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_act
# display # display
echo echo
'<html><head><title>' . __('Feeds server') . '</title>' . '<html><head><title>' . __('Feeds server') . '</title>' .
$feeds_filter->js(dcCore::app()->adminurl->get('admin.plugin.zoneclearFeedServer', ['part' => 'feeds'], '&')) . $feeds_filter->js(dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__), ['part' => 'feeds'], '&')) .
dcPage::jsLoad(dcPage::getPF('zoneclearFeedServer/js/list.js')) . dcPage::jsLoad(dcPage::getPF(basename(__DIR__) . '/js/list.js')) .
dcPage::jsPageTabs() . dcPage::jsPageTabs() .
# --BEHAVIOR-- adminZoneclearFeedServerHeader # --BEHAVIOR-- adminZoneclearFeedServerHeader
@ -534,25 +534,25 @@ if (!dcCore::app()->blog->settings->zoneclearFeedServer->zoneclearFeedServer_act
dcPage::notices() . dcPage::notices() .
'<p class="top-add">' . '<p class="top-add">' .
'<a class="button add" href="' . dcCore::app()->adminurl->get('admin.plugin.zoneclearFeedServer', ['part' => 'feed']) . '">' . '<a class="button add" href="' . dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__), ['part' => 'feed']) . '">' .
__('New feed') . '</a></p>'; __('New feed') . '</a></p>';
$feeds_filter->display( $feeds_filter->display(
'admin.plugin.zoneclearFeedServer', 'admin.plugin.' . basename(__DIR__),
dcCore::app()->adminurl->getHiddenFormFields('admin.plugin.zoneclearFeedServer', ['part' => 'feeds']) dcCore::app()->adminurl->getHiddenFormFields('admin.plugin.' . basename(__DIR__), ['part' => 'feeds'])
); );
$feeds_list->feedsDisplay( $feeds_list->feedsDisplay(
$feeds_filter->page, $feeds_filter->page,
$feeds_filter->nb, $feeds_filter->nb,
'<form action="' . dcCore::app()->adminurl->get('admin.plugin.zoneclearFeedServer', ['part' => 'feeds']) . '" method="post" id="form-actions">' . '<form action="' . dcCore::app()->adminurl->get('admin.plugin.' . basename(__DIR__), ['part' => 'feeds']) . '" method="post" id="form-actions">' .
'%s' . '%s' .
'<div class="two-cols">' . '<div class="two-cols">' .
'<p class="col checkboxes-helpers"></p>' . '<p class="col checkboxes-helpers"></p>' .
'<p class="col right">' . __('Selected feeds action:') . ' ' . '<p class="col right">' . __('Selected feeds action:') . ' ' .
form::combo(['action'], $feeds_actions_page->getCombo()) . form::combo(['action'], $feeds_actions_page->getCombo()) .
'<input type="submit" value="' . __('ok') . '" />' . '<input type="submit" value="' . __('ok') . '" />' .
dcCore::app()->adminurl->getHiddenFormFields('admin.plugin.zoneclearFeedServer', $feeds_filter->values(true)) . dcCore::app()->adminurl->getHiddenFormFields('admin.plugin.' . basename(__DIR__), $feeds_filter->values(true)) .
dcCore::app()->formNonce() . dcCore::app()->formNonce() .
'</p>' . '</p>' .
'</div>' . '</div>' .