cleanup code
This commit is contained in:
parent
e510c444d7
commit
b21e286961
16 changed files with 2077 additions and 2086 deletions
57
_admin.php
57
_admin.php
|
@ -1,59 +1,50 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
/**
|
||||
* @brief cinecturlink2, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Jean-Christian Denis and Contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
require_once dirname(__FILE__) . '/_widgets.php';
|
||||
|
||||
# Admin menu
|
||||
$_menu['Plugins']->addItem(
|
||||
__('My cinecturlink'),
|
||||
'plugin.php?p=cinecturlink2',
|
||||
'index.php?pf=cinecturlink2/icon.png',
|
||||
$core->adminurl->get('admin.plugin.cinecturlink2'),
|
||||
dcPage::getPF('cinecturlink2/icon.png'),
|
||||
preg_match(
|
||||
'/plugin.php\?p=cinecturlink2(&.*)?$/',
|
||||
$_SERVER['REQUEST_URI'])
|
||||
,
|
||||
'/' . preg_quote($core->adminurl->get('admin.plugin.dcAdvancedCleaner')) . '(&.*)?$/',
|
||||
$_SERVER['REQUEST_URI']
|
||||
),
|
||||
$core->auth->check('contentadmin', $core->blog->id)
|
||||
);
|
||||
|
||||
$core->addBehavior(
|
||||
'adminDashboardFavorites',
|
||||
array('cinecturlink2AdminBehaviors', 'adminDashboardFavorites')
|
||||
['cinecturlink2AdminBehaviors', 'adminDashboardFavorites']
|
||||
);
|
||||
|
||||
class cinecturlink2AdminBehaviors
|
||||
{
|
||||
public static function adminDashboardFavorites($core, $favs)
|
||||
{
|
||||
$favs->register('cinecturlink2', array(
|
||||
$favs->register('cinecturlink2', [
|
||||
'title' => __('My cinecturlink'),
|
||||
'url' => 'plugin.php?p=cinecturlink2#links',
|
||||
'small-icon' => 'index.php?pf=cinecturlink2/icon.png',
|
||||
'large-icon' => 'index.php?pf=cinecturlink2/icon-big.png',
|
||||
'permissions' => $core->auth->check(
|
||||
'contentadmin',
|
||||
$core->blog->id
|
||||
),
|
||||
'active_cb' => array(
|
||||
'cinecturlink2AdminBehaviors',
|
||||
'adminDashboardFavoritesActive'
|
||||
)
|
||||
));
|
||||
'url' => $core->adminurl->get('admin.plugin.cinecturlink2').'#links',
|
||||
'small-icon' => dcPage::getPF('cinecturlink2/icon.png'),
|
||||
'large-icon' => dcPage::getPF('cinecturlink2/icon-big.png'),
|
||||
'permissions' => $core->auth->check('contentadmin', $core->blog->id),
|
||||
'active_cb' => ['cinecturlink2AdminBehaviors', 'adminDashboardFavoritesActive']
|
||||
]);
|
||||
}
|
||||
|
||||
public static function adminDashboardFavoritesActive($request, $params)
|
||||
|
|
23
_install.php
23
_install.php
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
/**
|
||||
* @brief cinecturlink2, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Jean-Christian Denis and Contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
return null;
|
||||
|
|
23
_public.php
23
_public.php
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
/**
|
||||
* @brief cinecturlink2, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Jean-Christian Denis and Contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
/**
|
||||
* @brief cinecturlink2, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Jean-Christian Denis and Contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
23
_widgets.php
23
_widgets.php
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
/**
|
||||
* @brief cinecturlink2, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Jean-Christian Denis and Contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
|
||||
|
|
12
dcstore.xml
Normal file
12
dcstore.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<modules xmlns:da="http://dotaddict.org/da/">
|
||||
<module id="cinecturlink2">
|
||||
<name>Cinecturlink 2</name>
|
||||
<version>0.7.1</version>
|
||||
<author>Jean-Christian Denis and Contributors</author>
|
||||
<desc>Widgets and pages about books, musics, films, blogs you are interested in</desc>
|
||||
<file>https://github.com/JcDenis/cinecturlink2/releases/download/v0.7.1/plugin-cinecturlink2.zip</file>
|
||||
<da:dcmin>2.19</da:dcmin>
|
||||
<da:details>https://plugins.dotaddict.org/dc2/details/cinecturlink2</da:details>
|
||||
<da:support>https://github.com/JcDenis/cinecturlink2</da:support>
|
||||
</module>
|
||||
</modules>
|
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
/**
|
||||
* @brief cinecturlink2, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Jean-Christian Denis and Contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
/**
|
||||
* @brief cinecturlink2, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Jean-Christian Denis and Contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
class cinecturlink2Context
|
||||
{
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
/**
|
||||
* @brief cinecturlink2, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Jean-Christian Denis and Contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
/**
|
||||
* @brief cinecturlink2, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Jean-Christian Denis and Contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
class sitemapsCinecturlink2
|
||||
{
|
||||
|
|
23
index.php
23
index.php
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
/**
|
||||
* @brief cinecturlink2, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Jean-Christian Denis and Contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
|
||||
|
|
|
@ -323,5 +323,3 @@ $GLOBALS['__l10n']['Check to delete'] = 'Cocher pour supprimer';
|
|||
|
||||
#index.php:638
|
||||
$GLOBALS['__l10n']['update categories'] = 'mettre à jour les catégories';
|
||||
|
||||
?>
|
Loading…
Reference in a new issue