Skip to content

Commit

Permalink
changed 'include_once' to 'require_once'
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed May 6, 2017
1 parent 06b1149 commit c8cc848
Show file tree
Hide file tree
Showing 29 changed files with 87 additions and 68 deletions.
2 changes: 1 addition & 1 deletion admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
xoops_cp_header();

$adminObject->displayNavigation(basename(__FILE__));
\Xmf\Module\Admin::setPaypal('6KJ7RW5DR3VTJ');
\Xmf\Module\Admin::setPaypal('[email protected]');
$adminObject->displayAbout(false);

require_once __DIR__ . '/admin_footer.php';
6 changes: 3 additions & 3 deletions admin/admin_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
* @author The SmartFactory <www.smartfactory.ca>
*/

include_once __DIR__ . '/../../../include/cp_header.php';
require_once __DIR__ . '/../../../include/cp_header.php';
//include_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php');

//require_once __DIR__ . '/../include/common.php';

require __DIR__ . '/../class/utility.php';
include_once __DIR__ . '/../include/config.php';
require_once __DIR__ . '/../class/utility.php';
require_once __DIR__ . '/../include/config.php';

if (!isset($moduleDirName)) {
$moduleDirName = basename(dirname(__DIR__));
Expand Down
2 changes: 1 addition & 1 deletion admin/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
require_once __DIR__ . '/admin_header.php';
include_once $GLOBALS['xoops']->path('class/xoopslists.php');
include_once $GLOBALS['xoops']->path('class/pagenav.php');
include_once __DIR__ . '/../class/utility.php';
require_once __DIR__ . '/../class/utility.php';

$itemid = Request::getInt('itemid', 0, 'POST');

Expand Down
2 changes: 1 addition & 1 deletion archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

use \Xmf\Request;

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';
$GLOBALS['xoopsOption']['template_main'] = 'publisher_archive.tpl';

include_once $GLOBALS['xoops']->path('header.php');
Expand Down
2 changes: 1 addition & 1 deletion author_items.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use \Xmf\Request;

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';

$uid = Request::getInt('uid', 0, 'GET');
if (0 == $uid) {
Expand Down
2 changes: 1 addition & 1 deletion backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

use \Xmf\Request;

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';
//xoops_load('XoopsLocal'); //mb

error_reporting(0);
Expand Down
2 changes: 1 addition & 1 deletion category.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

use \Xmf\Request;

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';

$categoryid = Request::getInt('categoryid', 0, 'GET');

Expand Down
2 changes: 1 addition & 1 deletion class/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ public function highlight($content, $keywords)
if (0 !== strpos($color, '#')) {
$color = '#' . $color;
}
include_once __DIR__ . '/highlighter.php';
require_once __DIR__ . '/highlighter.php';
$highlighter = new PublisherHighlighter();
$highlighter->setReplacementString('<span style="font-weight: bolder; background-color: ' . $color . ';">\1</span>');

Expand Down
4 changes: 2 additions & 2 deletions class/uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* !
* Example
* include_once __DIR__ . '/uploader.php';
* require_once __DIR__ . '/uploader.php';
* $allowed_mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png');
* $maxfilesize = 50000;
* $maxfilewidth = 120;
Expand All @@ -42,7 +42,7 @@
* Upload Media files
* Example of usage:
* <code>
* include_once __DIR__ . '/uploader.php';
* require_once __DIR__ . '/uploader.php';
* $allowed_mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png');
* $maxfilesize = 50000;
* $maxfilewidth = 120;
Expand Down
2 changes: 1 addition & 1 deletion comment_new.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use \Xmf\Request;

include_once dirname(dirname(__DIR__)) . '/mainfile.php';
include_once __DIR__ . '/include/common.php';
require_once __DIR__ . '/include/common.php';

$com_itemid = Request::getInt('com_itemid', 0, 'GET');
if ($com_itemid > 0) {
Expand Down
7 changes: 7 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
- moved functions to Utility class (mamba)
- changed to use XoopsFormSelectUser (geekwright/mamba)
- started conversion to XMF (mamba)
- move jquery and popeye to template due to conflicts when overriding in theme (geekwright)
- switch to a color neutral skin for popeye (geekwright)
- Eliminate line feed at EOF (geekwright)
- different bugs (bleekk)
- changed min_db to 5.5 (mamba)
- changed 'include_once' to 'require_once' (mamba)



<h5>1.04 FINAL (2015-10-21)</h5>
Expand Down
2 changes: 1 addition & 1 deletion file.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use \Xmf\Request;

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';
xoops_loadLanguage('admin', PUBLISHER_DIRNAME);

$op = Request::getString('op', Request::getString('op', '', 'GET'), 'POST');
Expand Down
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

include_once dirname(dirname(__DIR__)) . '/mainfile.php';
include_once __DIR__ . '/include/common.php';
require_once __DIR__ . '/include/common.php';

$myts = MyTextSanitizer::getInstance();

Expand Down
2 changes: 1 addition & 1 deletion include/ajax_upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

error_reporting(0);
include dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
include_once __DIR__ . '/common.php';
require_once __DIR__ . '/common.php';

$GLOBALS['xoopsLogger']->activated = false;
xoops_loadLanguage('common', basename(dirname(__DIR__)));
Expand Down
2 changes: 1 addition & 1 deletion include/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');

//include_once __DIR__ . '/config.php';
//require_once __DIR__ . '/config.php';

define('PUBLISHER_DIRNAME', basename(dirname(__DIR__)));
define('PUBLISHER_URL', XOOPS_URL . '/modules/' . PUBLISHER_DIRNAME);
Expand Down
2 changes: 1 addition & 1 deletion include/notification.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');

include_once __DIR__ . '/seo_functions.php';
require_once __DIR__ . '/seo_functions.php';

/**
* @param $category
Expand Down
62 changes: 31 additions & 31 deletions include/seo_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');

include_once __DIR__ . '/common.php';
require_once __DIR__ . '/common.php';

/**
* Class PublisherSeo
Expand Down Expand Up @@ -50,36 +50,36 @@ public static function getTitle($title = '', $withExt = true)
$title = rawurlencode(strtolower($title));

// Transformation des ponctuations
$pattern = array(
'/%09/', // Tab
'/%20/', // Space
'/%21/', // !
'/%22/', // "
'/%23/', // #
'/%25/', // %
'/%26/', // &
'/%27/', // '
'/%28/', // (
'/%29/', // )
'/%2C/', // ,
'/%2F/', // /
'/%3A/', // :
'/%3B/', // ;
'/%3C/', // <
'/%3D/', // =
'/%3E/', // >
'/%3F/', // ?
'/%40/', // @
'/%5B/', // [
'/%5C/', // \
'/%5D/', // ]
'/%5E/', // ^
'/%7B/', // {
'/%7C/', // |
'/%7D/', // }
'/%7E/', // ~
"/\./" // .
);
$pattern = array(
'/%09/', // Tab
'/%20/', // Space
'/%21/', // !
'/%22/', // "
'/%23/', // #
'/%25/', // %
'/%26/', // &
'/%27/', // '
'/%28/', // (
'/%29/', // )
'/%2C/', // ,
'/%2F/', // /
'/%3A/', // :
'/%3B/', // ;
'/%3C/', // <
'/%3D/', // =
'/%3E/', // >
'/%3F/', // ?
'/%40/', // @
'/%5B/', // [
'/%5C/', // \
'/%5D/', // ]
'/%5E/', // ^
'/%7B/', // {
'/%7C/', // |
'/%7D/', // }
'/%7E/', // ~
"/\./" // .
);
$repPattern = array('-', '-', '', '', '', '-100', '', '-', '', '', '', '-', '', '', '', '-', '', '', '-at-', '', '-', '', '-', '', '-', '', '-', '');
$title = preg_replace($pattern, $repPattern, $title);

Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

use \Xmf\Request;

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';

// At which record shall we start for the Categories
$catstart = Request::getInt('catstart', 0, 'GET');
Expand Down
4 changes: 2 additions & 2 deletions item.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

use \Xmf\Request;

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';

$itemId = Request::getInt('itemid', 0, 'GET');
$itemPageId = Request::getInt('page', -1, 'GET');
Expand All @@ -46,7 +46,7 @@
//$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
//$xoTheme->addScript(PUBLISHER_URL . '/assets/js/jquery.popeye-2.1.js');
//$xoTheme->addScript(PUBLISHER_URL . '/assets/js/publisher.js');

//
//$xoTheme->addStylesheet(PUBLISHER_URL . '/assets/css/jquery.popeye.css');
//$xoTheme->addStylesheet(PUBLISHER_URL . '/assets/css/jquery.popeye.style.css');
//$xoTheme->addStylesheet(PUBLISHER_URL . '/assets/css/publisher.css');
Expand Down
2 changes: 1 addition & 1 deletion makepdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

error_reporting(E_ALL);

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';
$itemid = Request::getInt('itemid', 0, 'GET');
$item_page_id = Request::getInt('page', -1, 'GET');
if ($itemid == 0) {
Expand Down
2 changes: 1 addition & 1 deletion pop.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
$doNotStartPrint = true;
$noTitle = true;
$smartPopup = true;
include_once __DIR__ . '/print.php';
require_once __DIR__ . '/print.php';
2 changes: 1 addition & 1 deletion print.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

use \Xmf\Request;

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';
require_once $GLOBALS['xoops']->path('class/template.php');

$itemid = Request::getInt('itemid', 0, 'GET');
Expand Down
2 changes: 1 addition & 1 deletion rate.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use \Xmf\Request;

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';

//getting the values
$rating = Request::getInt('rating', 0, 'GET');
Expand Down
2 changes: 1 addition & 1 deletion search.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

use \Xmf\Request;

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';
xoops_loadLanguage('search');
//Checking general permissions
$configHandler = xoops_getHandler('config');
Expand Down
2 changes: 1 addition & 1 deletion submit.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

use \Xmf\Request;

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';
xoops_loadLanguage('admin', PUBLISHER_DIRNAME);

// Get the total number of categories
Expand Down
4 changes: 2 additions & 2 deletions testdata/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @author Michael Beck (aka Mamba)
*/

include_once __DIR__ . '/../../../mainfile.php';
require_once __DIR__ . '/../../../mainfile.php';

if (!isset($moduleDirName)) {
$moduleDirName = basename(dirname(__DIR__));
Expand Down Expand Up @@ -43,5 +43,5 @@ function loadSampleData()
\Xmf\Database\TableLoad::loadTableFromArray('publisher_categories', $cat);
\Xmf\Database\TableLoad::loadTableFromArray('publisher_items', $items);

redirect_header( '../admin/item.php', 1, _AM_PUBLISHER_SAMPLEDATA_SUCCESS);
redirect_header('../admin/item.php', 1, _AM_PUBLISHER_SAMPLEDATA_SUCCESS);
}
2 changes: 1 addition & 1 deletion view.tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
*/

//todo: check this file
include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';
include_once $GLOBALS['xoops']->path('modules/tag/view.tag.php');
4 changes: 2 additions & 2 deletions visit.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

use \Xmf\Request;

include_once __DIR__ . '/header.php';
require_once __DIR__ . '/header.php';

$fileid = Request::getInt('fileid', 0, 'GET');

Expand All @@ -48,5 +48,5 @@
header('Location: ' . $fileObj->getFileUrl());
}

echo "<html><head><meta http-equiv=\"Refresh\" content=\"0; URL=" . $myts->oopsHtmlSpecialChars($fileObj->getFileUrl()) . "\"/></head><body></body></html>";
echo '<html><head><meta http-equiv="Refresh" content="0; URL=' . $myts->oopsHtmlSpecialChars($fileObj->getFileUrl()) . '"/></head><body></body></html>';
exit();
Loading

0 comments on commit c8cc848

Please sign in to comment.