Skip to content

Commit

Permalink
Merge pull request #5 from mambax7/master
Browse files Browse the repository at this point in the history
updates
  • Loading branch information
mambax7 authored Oct 20, 2021
2 parents c9e02ec + 570fc7f commit b4378c2
Show file tree
Hide file tree
Showing 186 changed files with 9,699 additions and 5,433 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on: [ push, pull_request ]

jobs:
phpstan:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: [ '7.2', '7.4', '8.0', '8.1' ]
steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v5
- name: PHPStan Static Analysis
uses: php-actions/phpstan@v3
with:
path: /
php-version: ${{ matrix.php-versions }}
extensions: mbstring, dom, fileinfo, mysql
tools: phpstan, psalm
# run: phpstan analyze src --level=5 --error-format=checkstyle | cs2pr
# 8- Run Psalm scan
- name: Run Psalm scan
run: psalm --threads=8 --shepherd --stats --output-format=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57 changes: 57 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# language: php
build:
environment:
php: 8.0.11
nodes:
tests: true
analysis:
dependencies:
after:
# The following installs the most recent XOOPS CMS version, you might want
# to install a specific release tag or branch instead.
- git clone --depth=1 https://github.com/XOOPS/XoopsCore25
- git clone --depth=1 https://github.com/mambax7/tag
- git clone --depth=1 https://github.com/mambax7/adslight
- git clone --depth=1 https://github.com/mambax7/ams
- git clone --depth=1 https://github.com/mambax7/apcal
- git clone --depth=1 https://github.com/mambax7/extcal
- git clone --depth=1 https://github.com/mambax7/extgallery
- git clone --depth=1 https://github.com/mambax7/lexikon
- git clone --depth=1 https://github.com/mambax7/myalbum
- git clone --depth=1 https://github.com/mambax7/mylinks
- git clone --depth=1 https://github.com/mambax7/newbb
- git clone --depth=1 https://github.com/mambax7/news
- git clone --depth=1 https://github.com/mambax7/oledrion
- git clone --depth=1 https://github.com/mambax7/publisher
- git clone --depth=1 https://github.com/mambax7/smartfaq
- git clone --depth=1 https://github.com/mambax7/smartpartner
- git clone --depth=1 https://github.com/mambax7/wfdownloads
- git clone --depth=1 https://github.com/mambax7/wflinks
- git clone --depth=1 https://github.com/mambax7/xoopstube
project_setup:
override: true
tests:
override:
- php-scrutinizer-run --enable-security-analysis
filter:
dependency_paths:
- XoopsCore25/*
- tag/*
- adslight/*
- ams/*
- apcal/*
- extcal/*
- extgallery/*
- lexikon/*
- myalbum/*
- mylinks/*
- newbb/*
- news/*
- oledrion/*
- publisher/*
- smartfaq/*
- smartpartner/*
- wfdownloads/*
- wflinks/*
- xoopstube/*

23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
# XOOPS CMS Module ![XOOPS CMS](https://avatars2.githubusercontent.com/u/12771439?v=3&s=200)
![alt XOOPS CMS](https://xoops.org/images/logoXoopsPhp8.png)

**RSSFit** is a module for XOOPS generates RSS 2.0 validated XML feed. Web masters can decide what to be displayed in the XML output by activating installed plug-ins.
## RSSFit module for [XOOPS CMS 2.5.10+](https://xoops.org)

**XOOPS Module Archive:** Module in this archive are older modules for XOOPS CMS, and therefore some of them might not work with the latest XOOPS and PHP versions.
[![XOOPS CMS Module](https://img.shields.io/badge/XOOPS%20CMS-Module-blue.svg)](https://xoops.org)
[![Software License](https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html)

However, please fork them and if you have any improvements and fixes, please share them back with us.
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/XoopsModules25x/rss.svg?style=flat)](https://scrutinizer-ci.com/g/XoopsModules25x/rssfit/?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/95b12220e0ac4056b9af52af708379c9)](https://www.codacy.com/app/mambax7/rss_2)
[![Code Climate](https://img.shields.io/codeclimate/github/XoopsModules25x/rss.svg?style=flat)](https://codeclimate.com/github/XoopsModules25x/rss)
[![Latest Pre-Release](https://img.shields.io/github/tag/XoopsModules25x/rss.svg?style=flat)](https://github.com/XoopsModules25x/rssfit/tags/)
[![Latest Version](https://img.shields.io/github/release/XoopsModules25x/rss.svg?style=flat)](https://github.com/XoopsModules25x/rssfit/releases/)

Visit us on http://xoops.org
**RSSFit** module for [XOOPS CMS](https://xoops.org) is a module for XOOPS generates RSS 2.0 validated XML feed. Web masters can decide what to be displayed in the XML output by activating installed plug-ins.

The upcoming XOOPS CMS version is being crafted at: https://github.com/XOOPS
[![Tutorial Available](https://xoops.org/images/tutorial-available-blue.svg)](https://xoops.gitbook.io/rssfit-tutorial/) Tutorial: see [GitBook](https://xoops.gitbook.io/rssfit-tutorial/). To contribute to the Tutorial, [fork it on GitHub](https://github.com/XoopsDocs/rssfit-tutorial)

[![Translations on Transifex](https://xoops.org/images/translations-transifex-blue.svg)](https://www.transifex.com/xoops)

Please visit us on https://xoops.org

Current and upcoming "next generation" versions of XOOPS CMS are crafted on GitHub at: https://github.com/XOOPS
30 changes: 0 additions & 30 deletions admin/about.php

This file was deleted.

21 changes: 7 additions & 14 deletions admin/admin_footer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php

declare(strict_types=1);
/*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
Expand All @@ -10,21 +12,12 @@
*/

/**
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @package
* @since
* @author XOOPS Development Team
* @copyright XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @author XOOPS Development Team
*/
$pathIcon32 = Xmf\Module\Admin::iconUrl('', '32');

global $xoopsModule;
$pathIcon32 = \Xmf\Module\Admin::menuIconPath('');

echo "<div class='adminfooter'>\n"
." <div style='text-align: center;'>\n"
." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
." </div>\n"
." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
."</div>";
echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';

xoops_cp_footer();
46 changes: 23 additions & 23 deletions admin/admin_header.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php

declare(strict_types=1);
/*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
Expand All @@ -10,35 +12,33 @@
*/

/**
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @package
* @since
* @author XOOPS Development Team
* @copyright XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @author XOOPS Development Team
*/

$path = dirname(dirname(dirname(__DIR__)));
require_once $path . '/mainfile.php';
require_once $path . '/include/cp_functions.php';
require_once $path . '/include/cp_header.php';

class_exists('\Xmf\Module\Admin') or die('XMF is required.');
use Xmf\Module\Admin;
use XoopsModules\Rssfit\{
Helper
};

global $xoopsModule;
/** @var Helper $helper */
/** @var Admin $adminObject */

$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
require \dirname(__DIR__) . '/preloads/autoloader.php';

// Load language files
\Xmf\Language::load('main', $thisModuleDir);
//\Xmf\Language::load('modinfo', $thisModuleDir);
require \dirname(__DIR__, 3) . '/include/cp_header.php';
require \dirname(__DIR__) . '/include/common.php';

xoops_cp_header();
$helper = Helper::getInstance();
$adminObject = Admin::getInstance();

$moduleDirName = $helper->getDirname();
$moduleDirNameUpper = mb_strtoupper($moduleDirName);

//if functions.php file exist
require_once dirname(dirname(__FILE__)) . '/include/common.php';
//require '../include/common.php';

global $xoopsModule;
// Load language files
$helper->loadLanguage('admin');
$helper->loadLanguage('modinfo');
$helper->loadLanguage('common');

$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
xoops_cp_header();
39 changes: 39 additions & 0 deletions admin/do_about.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

declare(strict_types=1);

/*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

use Xmf\Module\Admin;

/**
* @copyright XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @author XOOPS Development Team
*/

use Xmf\Request;
use XoopsModules\Rssfit;

if (!preg_match('#/rssfit/admin/#', $_SERVER['SCRIPT_NAME'])) {
header('Location: index.php');
}

require_once __DIR__ . '/admin_header.php';

$adminObject = Admin::getInstance();
//xoops_cp_header();

$adminObject->displayNavigation(basename(__FILE__));
Admin::setPaypal('xoopsfoundation@gmail.com');
$adminObject->displayAbout(false);

require_once __DIR__ . '/admin_footer.php';
Loading

0 comments on commit b4378c2

Please sign in to comment.