diff --git a/admin/admin_footer.php b/admin/admin_footer.php
index fa52379..0b3fed3 100644
--- a/admin/admin_footer.php
+++ b/admin/admin_footer.php
@@ -17,13 +17,8 @@
* @since 1.0.6
*/
-$pathIcon32 = Xmf\Module\Admin::iconUrl('', 32);
+$pathIcon32 = Xmf\Module\Admin::iconUrl('', 32);
-echo "
';
+echo "';
xoops_cp_footer();
diff --git a/admin/admin_header.php b/admin/admin_header.php
index f9d4810..4e5806b 100644
--- a/admin/admin_header.php
+++ b/admin/admin_header.php
@@ -26,8 +26,8 @@
require_once __DIR__ . '/../include/common.php';
$moduleDirName = basename(dirname(__DIR__));
-$helper = Xoopstube\Helper::getInstance();
-$adminObject = Xmf\Module\Admin::getInstance();
+$helper = Xoopstube\Helper::getInstance();
+$adminObject = Xmf\Module\Admin::getInstance();
$pathIcon16 = Xmf\Module\Admin::iconUrl('', 16);
$pathIcon32 = Xmf\Module\Admin::iconUrl('', 32);
diff --git a/admin/altcat.php b/admin/altcat.php
index ae59b9e..af75fd0 100644
--- a/admin/altcat.php
+++ b/admin/altcat.php
@@ -26,7 +26,7 @@
$lid = Request::getInt('lid', Request::getInt('lid', 0, 'POST'), 'GET'); //cleanRequestVars($_REQUEST, 'lid', 0);
/**
- * @param Xoopstube\Tree $xt
+ * @param Xoopstube\Tree $xt
* @param int $itemid
* @param $title
* @param $checks
diff --git a/admin/blocksadmin.php b/admin/blocksadmin.php
index a772ed4..3755712 100644
--- a/admin/blocksadmin.php
+++ b/admin/blocksadmin.php
@@ -62,7 +62,7 @@ function listBlocks()
xoops_loadLanguage('admin/groups', 'system');
/** @var XoopsModuleHandler $moduleHandler */
- $moduleHandler = xoops_getHandler('module');
+ $moduleHandler = xoops_getHandler('module');
/** @var \XoopsMemberHandler $memberHandler */
$memberHandler = xoops_getHandler('member');
/** @var \XoopsGroupPermHandler $grouppermHandler */
diff --git a/admin/category.php b/admin/category.php
index afe0059..528b53b 100644
--- a/admin/category.php
+++ b/admin/category.php
@@ -83,11 +83,11 @@ function createCategory($cid = 0)
/** @var \XoopsMemberHandler $memberHandler */
$memberHandler = xoops_getHandler('member');
- $group_list = $memberHandler->getGroupList();
+ $group_list = $memberHandler->getGroupList();
$memberHandler = xoops_getHandler('member');
/** @var \XoopsGroupPermHandler $grouppermHandler */
$grouppermHandler = xoops_getHandler('groupperm');
- $groups = $grouppermHandler->getGroupIds('XTubeCatPerm', $cid, $xoopsModule->getVar('mid'));
+ $groups = $grouppermHandler->getGroupIds('XTubeCatPerm', $cid, $xoopsModule->getVar('mid'));
} else {
$groups = true;
}
diff --git a/admin/main.php b/admin/main.php
index 8e79671..029c5d2 100644
--- a/admin/main.php
+++ b/admin/main.php
@@ -302,11 +302,11 @@ function edit($lid = 0)
$updated = Request::getInt('was_published', time(), 'POST');
//PHP 5.3
-// $temp = Request::getArray('published', [], 'POST');
-// $published = strtotime($temp['date']) + $temp['time'];
+ // $temp = Request::getArray('published', [], 'POST');
+ // $published = strtotime($temp['date']) + $temp['time'];
// PHP 5.4
- $published = strtotime(Request::getArray('published', [], 'POST')['date']) + Request::getArray('published', [], 'POST')['time'];
+ $published = strtotime(Request::getArray('published', [], 'POST')['date']) + Request::getArray('published', [], 'POST')['time'];
if (0 == Request::getInt('up_dated', '', 'POST')) {
$updated = 0;
@@ -329,7 +329,7 @@ function edit($lid = 0)
$publishdate = time();
}
// if (Request::hasVar('expiredateactivate', 'POST')) {
- $expiredate = strtotime(Request::getArray('expired', [], 'POST')['date']) + Request::getArray('expired', [], 'POST')['time'];
+ $expiredate = strtotime(Request::getArray('expired', [], 'POST')['date']) + Request::getArray('expired', [], 'POST')['time'];
// }
if (Request::hasVar('clearexpire', 'POST')) {
@@ -345,7 +345,7 @@ function edit($lid = 0)
. $GLOBALS['xoopsDB']->prefix('xoopstube_videos')
. ' (lid, cid, title, vidid, screenshot, submitter, publisher, status, date, hits, rating, votes, comments, vidsource, published, expired, updated, offline, description, ipaddress, notifypub, vidrating, time, keywords, item_tag, picurl )';
$sql .= " VALUES (NULL, $cid, '$title', '$vidid', '', '$submitter', '$publisher', '$status', '$date', 0, 0, 0, 0, '$vidsource', '$published', '$expiredate', '$updated', '$offline', '$descriptionb', '$ipaddress', '0', '$vidrating', '$time', '$keywords', '$item_tag', '$picurl')";
- // $newid = $GLOBALS['xoopsDB'] -> getInsertId();
+ // $newid = $GLOBALS['xoopsDB'] -> getInsertId();
} else {
$sql = 'UPDATE '
. $GLOBALS['xoopsDB']->prefix('xoopstube_videos')
diff --git a/admin/menu.php b/admin/menu.php
index 749c6f5..121de05 100644
--- a/admin/menu.php
+++ b/admin/menu.php
@@ -23,10 +23,9 @@
//require_once __DIR__ . '/../include/common.php';
$helper = Xoopstube\Helper::getInstance();
-$pathIcon32 = \Xmf\Module\Admin::menuIconPath('');
+$pathIcon32 = \Xmf\Module\Admin::menuIconPath('');
$pathModIcon32 = $helper->getModule()->getInfo('modicons32');
-
$adminmenu[] = [
'title' => _MI_XOOPSTUBE_HOME,
'link' => 'admin/index.php',
diff --git a/blocks/xoopstube_block_tag.php b/blocks/xoopstube_block_tag.php
index 18c5590..1048a91 100644
--- a/blocks/xoopstube_block_tag.php
+++ b/blocks/xoopstube_block_tag.php
@@ -30,7 +30,7 @@
function xtubeShowTagBlockCloud($options)
{
$moduleDirName = basename(dirname(__DIR__));
-// require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/Utility.php';
+ // require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/Utility.php';
if (Xoopstube\Utility::isModuleTagInstalled()) {
require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
@@ -48,7 +48,7 @@ function xtubeShowTagBlockCloud($options)
function xtubeEditTagBlockCloud($options)
{
$moduleDirName = basename(dirname(__DIR__));
-// require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/Utility.php';
+ // require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/Utility.php';
if (Xoopstube\Utility::isModuleTagInstalled()) {
require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
@@ -66,7 +66,7 @@ function xtubeEditTagBlockCloud($options)
function xtubeShowTagBlockTop($options)
{
$moduleDirName = basename(dirname(__DIR__));
-// require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/Utility.php';
+ // require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/Utility.php';
if (Xoopstube\Utility::isModuleTagInstalled()) {
require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
@@ -84,7 +84,7 @@ function xtubeShowTagBlockTop($options)
function xtubeEditTagBlockTop($options)
{
$moduleDirName = basename(dirname(__DIR__));
-// require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/Utility.php';
+ // require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/class/Utility.php';
if (Xoopstube\Utility::isModuleTagInstalled()) {
require_once XOOPS_ROOT_PATH . '/modules/tag/blocks/block.php';
diff --git a/blocks/xoopstube_top.php b/blocks/xoopstube_top.php
index 695c198..8520a86 100644
--- a/blocks/xoopstube_top.php
+++ b/blocks/xoopstube_top.php
@@ -28,9 +28,9 @@
*/
function checkBlockGroups($cid = 0, $permType = 'XTubeCatPerm', $redirect = false)
{
- $moduleDirName = basename(dirname(__DIR__));
- $groups = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
- $grouppermHandler = xoops_getHandler('groupperm');
+ $moduleDirName = basename(dirname(__DIR__));
+ $groups = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
+ $grouppermHandler = xoops_getHandler('groupperm');
/** @var XoopsModuleHandler $moduleHandler */
$moduleHandler = xoops_getHandler('module');
$module = $moduleHandler->getByDirname($moduleDirName);
@@ -58,9 +58,9 @@ function xtubeCheckBlockGroups($cid = 0, $permType = 'XTubeCatPerm', $redirect =
$moduleDirName = basename(dirname(__DIR__));
$groups = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
/** @var XoopsModuleHandler $moduleHandler */
- $moduleHandler = xoops_getHandler('module');
- $xtubeModule = $moduleHandler->getByDirname($moduleDirName);
- $grouppermHandler = xoops_getHandler('groupperm');
+ $moduleHandler = xoops_getHandler('module');
+ $xtubeModule = $moduleHandler->getByDirname($moduleDirName);
+ $grouppermHandler = xoops_getHandler('groupperm');
if (!$grouppermHandler->checkRight($permType, $cid, $groups, $xtubeModule->getVar('mid'))) {
if (false === $redirect) {
return false;
@@ -262,7 +262,7 @@ function showTopVideoBlock($options)
}
require_once XOOPS_ROOT_PATH . '/modules/' . $xtubeModule->getVar('dirname') . '/include/video.php';
-// require_once XOOPS_ROOT_PATH . '/modules/' . $xtubeModule->getVar('dirname') . '/class/Utility.php';
+ // require_once XOOPS_ROOT_PATH . '/modules/' . $xtubeModule->getVar('dirname') . '/class/Utility.php';
while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result))) {
if (false === checkBlockGroups($myrow['cid']) || 0 == $myrow['cid']) {
@@ -309,7 +309,7 @@ function showTopVideoBlock($options)
function getRandomVideo($options)
{
global $xtubemyts;
- $utility = new Xoopstube\Utility();
+ $utility = new Xoopstube\Utility();
$moduleDirName = basename(dirname(__DIR__));
$block = [];
/** @var XoopsModuleHandler $moduleHandler */
@@ -335,7 +335,7 @@ function getRandomVideo($options)
}
require_once XOOPS_ROOT_PATH . '/modules/' . $xtubeModule->getVar('dirname') . '/include/video.php';
-// require_once XOOPS_ROOT_PATH . '/modules/' . $xtubeModule->getVar('dirname') . '/class/Utility.php';
+ // require_once XOOPS_ROOT_PATH . '/modules/' . $xtubeModule->getVar('dirname') . '/class/Utility.php';
while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result2))) {
if (false === checkBlockGroups($myrow['cid']) || 0 == $myrow['cid']) {
@@ -399,7 +399,7 @@ function getRandomVideoForHorizontalBlock($options)
}
require_once XOOPS_ROOT_PATH . '/modules/' . $xtubeModule->getVar('dirname') . '/include/video.php';
-// require_once XOOPS_ROOT_PATH . '/modules/' . $xtubeModule->getVar('dirname') . '/class/Utility.php';
+ // require_once XOOPS_ROOT_PATH . '/modules/' . $xtubeModule->getVar('dirname') . '/class/Utility.php';
while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result2))) {
if (false === checkBlockGroups($myrow['cid']) || 0 == $myrow['cid']) {
diff --git a/brokenvideo.php b/brokenvideo.php
index c89bd8c..4bf3bb9 100644
--- a/brokenvideo.php
+++ b/brokenvideo.php
@@ -43,18 +43,8 @@
redirect_header('singlevideo.php?cid=' . (int)$cid . '&lid=' . $lid, 2, $ratemessage);
} else {
$reportid = 0;
- $sql = sprintf(
- 'INSERT INTO `%s` (reportid, lid, sender, ip, date, confirmed, acknowledged, title ) VALUES ( %u, %u, %u, %s, %u, %u, %u, %s)',
- $GLOBALS['xoopsDB']->prefix('xoopstube_broken'),
- $reportid,
- $lid,
- $sender,
- $GLOBALS['xoopsDB']->quoteString($ip),
- $time,
- 0,
- 0,
- $GLOBALS['xoopsDB']->quoteString($title)
- );
+ $sql = sprintf('INSERT INTO `%s` (reportid, lid, sender, ip, date, confirmed, acknowledged, title ) VALUES ( %u, %u, %u, %s, %u, %u, %u, %s)', $GLOBALS['xoopsDB']->prefix('xoopstube_broken'), $reportid, $lid, $sender, $GLOBALS['xoopsDB']->quoteString($ip), $time, 0, 0,
+ $GLOBALS['xoopsDB']->quoteString($title));
if (!$result = $GLOBALS['xoopsDB']->query($sql)) {
$error[] = _MD_XOOPSTUBE_ERROR;
}
diff --git a/class/Common/Breadcrumb.php b/class/Common/Breadcrumb.php
index 5cc3aa5..484af48 100644
--- a/class/Common/Breadcrumb.php
+++ b/class/Common/Breadcrumb.php
@@ -31,7 +31,7 @@
*/
class Breadcrumb
{
- public $dirname;
+ public $dirname;
private $bread = [];
/**
diff --git a/class/Common/FilesManagement.php b/class/Common/FilesManagement.php
index 9eeb56c..5b1b52c 100644
--- a/class/Common/FilesManagement.php
+++ b/class/Common/FilesManagement.php
@@ -35,7 +35,8 @@ public static function createFolder($folder)
file_put_contents($folder . '/index.html', '');
}
- } catch (\Exception $e) {
+ }
+ catch (\Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n", ' ';
}
}
diff --git a/class/Common/LetterChoice.php b/class/Common/LetterChoice.php
index 2f04c8e..677b002 100644
--- a/class/Common/LetterChoice.php
+++ b/class/Common/LetterChoice.php
@@ -62,12 +62,12 @@ class LetterChoice
*
* @param \XoopsPersistableObjectHandler $objHandler {@link XoopsPersistableObjectHandler}
* @param \CriteriaElement $criteria {@link CriteriaElement}
- * @param string $field_name search by field
- * @param array $alphabet array of alphabet letters
- * @param string $arg_name item on the current page
- * @param string $url
- * @param string $extra_arg Additional arguments to pass in the URL
- * @param boolean $caseSensitive
+ * @param string $field_name search by field
+ * @param array $alphabet array of alphabet letters
+ * @param string $arg_name item on the current page
+ * @param string $url
+ * @param string $extra_arg Additional arguments to pass in the URL
+ * @param boolean $caseSensitive
*/
public function __construct(
$objHandler,
@@ -77,17 +77,17 @@ public function __construct(
$arg_name = 'letter',
$url = null,
$extra_arg = '',
- $caseSensitive = false
- ) {
- $this->helper = Xoopstube\Helper::getInstance();
- $this->objHandler = $objHandler;
- $this->criteria = null === $criteria ? new \CriteriaCompo() : $criteria;
- $this->field_name = null === $field_name ? $this->objHandler->identifierName : $field_name;
-// $this->alphabet = (count($alphabet) > 0) ? $alphabet : range('a', 'z'); // is there a way to get locale alphabet?
-// $this->alphabet = getLocalAlphabet();
- $this->alphabet = include __DIR__ . '/../../language/'.$GLOBALS['xoopsConfig']['language'] .'/alphabet.php';
- $this->arg_name = $arg_name;
- $this->url = null === $url ? $_SERVER['PHP_SELF'] : $url;
+ $caseSensitive = false)
+ {
+ $this->helper = Xoopstube\Helper::getInstance();
+ $this->objHandler = $objHandler;
+ $this->criteria = null === $criteria ? new \CriteriaCompo() : $criteria;
+ $this->field_name = null === $field_name ? $this->objHandler->identifierName : $field_name;
+ // $this->alphabet = (count($alphabet) > 0) ? $alphabet : range('a', 'z'); // is there a way to get locale alphabet?
+ // $this->alphabet = getLocalAlphabet();
+ $this->alphabet = include __DIR__ . '/../../language/' . $GLOBALS['xoopsConfig']['language'] . '/alphabet.php';
+ $this->arg_name = $arg_name;
+ $this->url = null === $url ? $_SERVER['PHP_SELF'] : $url;
if ('' !== $extra_arg && ('&' !== substr($extra_arg, -5) || '&' !== substr($extra_arg, -1))) {
$this->extra = '&' . $extra_arg;
}
@@ -103,14 +103,13 @@ public function __construct(
*/
public function render($alphaCount = null, $howmanyother = null)
{
- $moduleDirName = basename(dirname(dirname(__DIR__)));
+ $moduleDirName = basename(dirname(dirname(__DIR__)));
$moduleDirNameUpper = strtoupper($moduleDirName);
xoops_loadLanguage('common', $moduleDirName);
xoops_loadLanguage('alphabet', $moduleDirName);
- $all = constant('CO_' . $moduleDirNameUpper . '_ALL');
+ $all = constant('CO_' . $moduleDirNameUpper . '_ALL');
$other = constant('CO_' . $moduleDirNameUpper . '_OTHER');
-
$ret = '';
//
if (!$this->caseSensitive) {
@@ -121,15 +120,14 @@ public function render($alphaCount = null, $howmanyother = null)
$countsByLetters = $this->objHandler->getCounts($this->criteria);
// fill alphabet array
$alphabetArray = [];
- $letter_array = [];
+ $letter_array = [];
- $letter = 'All';
+ $letter = 'All';
$letter_array['letter'] = $all;
$letter_array['count'] = $alphaCount;
- $letter_array['url'] = $this->url ;
+ $letter_array['url'] = $this->url;
$alphabetArray[$letter] = $letter_array;
-
foreach ($this->alphabet as $letter) {
$letter_array = [];
if (!$this->caseSensitive) {
@@ -157,10 +155,9 @@ public function render($alphaCount = null, $howmanyother = null)
unset($letter_array);
}
-
$letter_array['letter'] = $other;
$letter_array['count'] = $howmanyother;
- $letter_array['url'] = $this->url. '?init=Other' ;
+ $letter_array['url'] = $this->url . '?init=Other';
$alphabetArray[$letter] = $letter_array;
// render output
diff --git a/class/Common/VersionChecks.php b/class/Common/VersionChecks.php
index 92ba385..491f31c 100644
--- a/class/Common/VersionChecks.php
+++ b/class/Common/VersionChecks.php
@@ -23,7 +23,7 @@ trait VersionChecks
* @static
* @param \XoopsModule $module
*
- * @param null|string $requiredVer
+ * @param null|string $requiredVer
* @return bool true if meets requirements, false if not
*/
public static function checkVerXoops(\XoopsModule $module = null, $requiredVer = null)
@@ -39,10 +39,10 @@ public static function checkVerXoops(\XoopsModule $module = null, $requiredVer =
if (null === $requiredVer) {
$requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
}
- $success = true;
+ $success = true;
if (version_compare($currentVer, $requiredVer, '<')) {
- $success = false;
+ $success = false;
$module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
}
diff --git a/class/Helper.php b/class/Helper.php
index 457b8f1..c85749f 100644
--- a/class/Helper.php
+++ b/class/Helper.php
@@ -15,7 +15,7 @@
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @package
* @since
- * @author XOOPS Development Team
+ * @author XOOPS Development Team
*/
defined('XOOPS_ROOT_PATH') || die('Restricted access');
@@ -28,14 +28,14 @@ class Helper extends \Xmf\Module\Helper
public $debug;
/**
- *
+ *
* @param bool $debug
*/
public function __construct($debug = false)
{
$this->debug = $debug;
- $moduleDirName = basename(dirname(__DIR__));
- parent::__construct($moduleDirName);
+ $moduleDirName = basename(dirname(__DIR__));
+ parent::__construct($moduleDirName);
}
/**
diff --git a/class/Lists.php b/class/Lists.php
index ef593d2..5b28f9c 100644
--- a/class/Lists.php
+++ b/class/Lists.php
@@ -54,8 +54,8 @@ public function __construct(
$emptyselect = 0,
$type = 0,
$prefix = '',
- $suffix = ''
- ) {
+ $suffix = '')
+ {
$this->value = $value;
$this->selection = $selected;
$this->path = $path;
diff --git a/class/Session.php b/class/Session.php
index 0835b47..806c0eb 100644
--- a/class/Session.php
+++ b/class/Session.php
@@ -108,7 +108,6 @@ public static function getInstance()
$instance = new static();
}
-
return $instance;
}
}
diff --git a/class/Thumbnails.php b/class/Thumbnails.php
index 1c845d0..debe4a7 100644
--- a/class/Thumbnails.php
+++ b/class/Thumbnails.php
@@ -140,8 +140,8 @@ public function createThumbnail(
$img_height = null,
$img_quality = null,
$img_update = null,
- $img_aspect = null
- ) {
+ $img_aspect = null)
+ {
$this->_source_path = XOOPS_ROOT_PATH . "/{$this->_img_path}";
$this->_save_path = XOOPS_ROOT_PATH . "/{$this->_img_path}/{$this->_img_savepath}";
$this->_source_url = XOOPS_URL . "/{$this->_img_path}";
diff --git a/class/Utility.php b/class/Utility.php
index 6a18f7e..f3e2871 100644
--- a/class/Utility.php
+++ b/class/Utility.php
@@ -36,8 +36,6 @@
// defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined');
-
-
//require_once __DIR__ . '/../include/common.php';
/**
@@ -169,7 +167,7 @@ public static function javascriptLinkConfirm($message, $form = false)
public static function IP()
{
$proxy_ip = '';
- if (\Xmf\Request::hasVar('HTTP_X_FORWARDED_FOR', 'SERVER')) {
+ if (\Xmf\Request::hasVar('HTTP_X_FORWARDED_FOR', 'SERVER')) {
$proxy_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED'])) {
$proxy_ip = $_SERVER['HTTP_X_FORWARDED'];
@@ -342,7 +340,6 @@ public static function redirect($message = '', $url = 'index.php', $time = 2)
redirect_header($url, $time, $message);
}
-
/**
* Returns the module's name (as defined by the user in the module manager) with cache
*
@@ -939,9 +936,9 @@ public static function createMetaKeywords($content)
if (isset($_SESSION['xoopstube_keywords_limit'])) {
$limit = $_SESSION['xoopstube_keywords_limit'];
} else {
- $configHandler = xoops_getHandler('config');
- $xoopsConfigSearch = $configHandler->getConfigsByCat(XOOPS_CONF_SEARCH);
- $limit = $xoopsConfigSearch['keyword_min'];
+ $configHandler = xoops_getHandler('config');
+ $xoopsConfigSearch = $configHandler->getConfigsByCat(XOOPS_CONF_SEARCH);
+ $limit = $xoopsConfigSearch['keyword_min'];
$_SESSION['xoopstube_keywords_limit'] = $limit;
}
$myts = \MyTextSanitizer::getInstance();
@@ -1015,8 +1012,8 @@ public static function uploadFile(
$mimeTypes = null,
$uploadMaxSize = null,
$maxWidth = null,
- $maxHeight = null
- ) {
+ $maxHeight = null)
+ {
require_once XOOPS_ROOT_PATH . '/class/uploader.php';
global $destname;
if (isset($_POST['xoops_upload_file'])) {
@@ -1071,8 +1068,8 @@ public static function resizePicture(
$param_width,
$param_height,
$keep_original = false,
- $fit = 'inside'
- ) {
+ $fit = 'inside')
+ {
// require_once XOOPSTUBE_PATH . 'class/wideimage/WideImage.inc.php';
$resize = true;
if (XOOPSTUBE_DONT_RESIZE_IF_SMALLER) {
@@ -1101,7 +1098,6 @@ public static function resizePicture(
return true;
}
-
/**
* Ajoute des jours à une date et retourne la nouvelle date au format Date de Mysql
*
@@ -1233,7 +1229,6 @@ public static function makeInfotips($text)
return $ret;
}
-
/**
* @param $datastream
* @param $url
@@ -1464,7 +1459,7 @@ public static function checkGroups($cid = 0, $permType = 'XTubeCatPerm', $redire
{
global $xoopsModule;
- $groups = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
+ $groups = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
/** @var \XoopsGroupPermHandler $grouppermHandler */
$grouppermHandler = xoops_getHandler('groupperm');
if (!$grouppermHandler->checkRight($permType, $cid, $groups, $xoopsModule->getVar('mid'))) {
@@ -1549,8 +1544,8 @@ public static function cleanRequestVars(
$name = null,
$def = null,
$strict = false,
- $lengthcheck = 15
- ) {
+ $lengthcheck = 15)
+ {
// Sanitise $_request for further use. This method gives more control and security.
// Method is more for functionality rather than beauty at the moment, will correct later.
unset($array['usercookie'], $array['PHPSESSID']);
@@ -2308,24 +2303,24 @@ public static function getDirSelectOption($selected, $dirarray, $namearray)
echo '';
}
-// /**
-// * @param $selected
-// * @param $dirarray
-// * @param $namearray
-// */
-// public static function getDirSelectOption($selected, $dirarray, $namearray)
-// {
-// echo "";
-// echo "-------------------------------------- ";
-// foreach ($namearray as $namearray => $workd) {
-// $opt_selected = '';
-// if ($workd == $selected) {
-// $opt_selected = 'selected';
-// }
-// echo '' . $workd . ' ';
-// }
-// echo ' ';
-// }
+ // /**
+ // * @param $selected
+ // * @param $dirarray
+ // * @param $namearray
+ // */
+ // public static function getDirSelectOption($selected, $dirarray, $namearray)
+ // {
+ // echo "";
+ // echo "-------------------------------------- ";
+ // foreach ($namearray as $namearray => $workd) {
+ // $opt_selected = '';
+ // if ($workd == $selected) {
+ // $opt_selected = 'selected';
+ // }
+ // echo '' . $workd . ' ';
+ // }
+ // echo ' ';
+ // }
/**
* @param $FILES
@@ -2343,8 +2338,8 @@ public static function uploadFiles(
$allowed_mimetypes = '',
$redirecturl = 'index.php', // $num = 0,
$redirect = 0,
- $usertype = 1
- ) {
+ $usertype = 1)
+ {
global $FILES, $xoopsModule;
$down = [];
@@ -2477,8 +2472,8 @@ public static function setPageNavigationCategoryList(
$start,
$art = 'art',
$_this = '',
- $align
- ) {
+ $align)
+ {
if ($pubrowamount < $GLOBALS['xoopsModuleConfig']['admin_perpage']) {
return false;
}
@@ -3110,7 +3105,6 @@ public static function getLettersChoice()
return $html;
}
-
/**
* Recursively sort categories by level and weight
*
@@ -3156,44 +3150,44 @@ public static function sortCategories($pid = 0, $level = 0)
* @access public
* @author luciorota
*/
-// public static function lettersChoice()
-// {
-// $helper = Xoopstube\Helper::getInstance();
-//
-// $criteria = $helper->getHandler('Videos')->getActiveCriteria();
-// $criteria->setGroupby('UPPER(LEFT(title,1))');
-// $countsByLetters = $helper->getHandler('Videos')->getCounts($criteria);
-// // Fill alphabet array
-// $alphabet = getLocalAlphabet();
-// $alphabetArray = [];
-// foreach ($alphabet as $letter) {
-// $letter_array = [];
-// if (isset($countsByLetters[$letter])) {
-// $letter_array['letter'] = $letter;
-// $letter_array['count'] = $countsByLetters[$letter];
-// $letter_array['url'] = XOOPS_URL . "/modules/{$helper->getModule()->dirname()}/viewcat.php?list={$letter}";
-// } else {
-// $letter_array['letter'] = $letter;
-// $letter_array['count'] = 0;
-// $letter_array['url'] = '';
-// }
-// $alphabetArray[$letter] = $letter_array;
-// unset($letter_array);
-// }
-// // Render output
-// if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) {
-// require_once $GLOBALS['xoops']->path('/class/theme.php');
-// $GLOBALS['xoTheme'] = new \xos_opal_Theme();
-// }
-// require_once $GLOBALS['xoops']->path('class/template.php');
-// $letterschoiceTpl = new \XoopsTpl();
-// $letterschoiceTpl->caching = false; // Disable cache
-// $letterschoiceTpl->assign('alphabet', $alphabetArray);
-// $html = $letterschoiceTpl->fetch("db:{$helper->getModule()->dirname()}_common_letterschoice.tpl");
-// unset($letterschoiceTpl);
-//
-// return $html;
-// }
+ // public static function lettersChoice()
+ // {
+ // $helper = Xoopstube\Helper::getInstance();
+ //
+ // $criteria = $helper->getHandler('Videos')->getActiveCriteria();
+ // $criteria->setGroupby('UPPER(LEFT(title,1))');
+ // $countsByLetters = $helper->getHandler('Videos')->getCounts($criteria);
+ // // Fill alphabet array
+ // $alphabet = getLocalAlphabet();
+ // $alphabetArray = [];
+ // foreach ($alphabet as $letter) {
+ // $letter_array = [];
+ // if (isset($countsByLetters[$letter])) {
+ // $letter_array['letter'] = $letter;
+ // $letter_array['count'] = $countsByLetters[$letter];
+ // $letter_array['url'] = XOOPS_URL . "/modules/{$helper->getModule()->dirname()}/viewcat.php?list={$letter}";
+ // } else {
+ // $letter_array['letter'] = $letter;
+ // $letter_array['count'] = 0;
+ // $letter_array['url'] = '';
+ // }
+ // $alphabetArray[$letter] = $letter_array;
+ // unset($letter_array);
+ // }
+ // // Render output
+ // if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) {
+ // require_once $GLOBALS['xoops']->path('/class/theme.php');
+ // $GLOBALS['xoTheme'] = new \xos_opal_Theme();
+ // }
+ // require_once $GLOBALS['xoops']->path('class/template.php');
+ // $letterschoiceTpl = new \XoopsTpl();
+ // $letterschoiceTpl->caching = false; // Disable cache
+ // $letterschoiceTpl->assign('alphabet', $alphabetArray);
+ // $html = $letterschoiceTpl->fetch("db:{$helper->getModule()->dirname()}_common_letterschoice.tpl");
+ // unset($letterschoiceTpl);
+ //
+ // return $html;
+ // }
//=============== from WF-Downloads ======================================
@@ -3219,8 +3213,7 @@ public static function isUserAdmin()
return $xtubeIsAdmin;
}
-//from Lexikon
-
+ //from Lexikon
/**
* @return int
@@ -3229,8 +3222,8 @@ public static function countCats()
{
global $xoopsUser, $xoopsModule;
$grouppermHandler = xoops_getHandler('groupperm');
- $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
- $totalcats = $grouppermHandler->getItemIds('lexikon_view', $groups, $xoopsModule->getVar('mid'));
+ $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
+ $totalcats = $grouppermHandler->getItemIds('lexikon_view', $groups, $xoopsModule->getVar('mid'));
return count($totalcats);
}
@@ -3242,7 +3235,7 @@ public static function countWords()
{
global $xoopsUser, $xoopsDB;
$grouppermHandler = xoops_getHandler('groupperm');
- $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
+ $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
/** @var \XoopsModuleHandler $moduleHandler */
$moduleHandler = xoops_getHandler('module');
$module = $moduleHandler->getByDirname('lexikon');
@@ -3257,21 +3250,20 @@ public static function countWords()
return $publishedwords;
}
-
/**
* @return array
*/
public static function getCategoryArray()
{
- global $xoopsDB, $xoopsUser, $xoopsModule;
+ global $xoopsDB, $xoopsUser, $xoopsModule;
/** @var Xoopstube\Helper $helper */
- $helper = Xoopstube\Helper::getInstance();
- $myts = \MyTextSanitizer::getInstance();
- $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
+ $helper = Xoopstube\Helper::getInstance();
+ $myts = \MyTextSanitizer::getInstance();
+ $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
$grouppermHandler = xoops_getHandler('groupperm');
- $block0 = [];
- $count = 1;
- $resultcat = $xoopsDB->query('SELECT categoryID, name, total, logourl FROM ' . $xoopsDB->prefix('lxcategories') . ' ORDER BY weight ASC');
+ $block0 = [];
+ $count = 1;
+ $resultcat = $xoopsDB->query('SELECT categoryID, name, total, logourl FROM ' . $xoopsDB->prefix('lxcategories') . ' ORDER BY weight ASC');
while (false !== (list($catID, $name, $total, $logourl) = $xoopsDB->fetchRow($resultcat))) {
if ($grouppermHandler->checkRight('lexikon_view', $catID, $groups, $xoopsModule->getVar('mid'))) {
$catlinks = [];
@@ -3302,7 +3294,7 @@ public static function getAlphaArray()
{
global $xoopsUser, $xoopsDB, $xoopsModule;
$grouppermHandler = xoops_getHandler('groupperm');
- $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
+ $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
/** @var \XoopsModuleHandler $moduleHandler */
$moduleHandler = xoops_getHandler('module');
$module = $moduleHandler->getByDirname('lexikon');
@@ -3360,7 +3352,6 @@ function unichr($a)
return $alpha;
}
-
/**
* chr() with unicode support
* I found this on this site http://en.php.net/chr
@@ -3381,5 +3372,4 @@ public static function getUchr($initials)
return $str;
}
-
}
diff --git a/class/Videos.php b/class/Videos.php
index e83aa82..04c9cf7 100644
--- a/class/Videos.php
+++ b/class/Videos.php
@@ -43,8 +43,8 @@ class Videos extends \XoopsObject
protected function __construct($debug)
{
$this->debug = $debug;
- $moduleDirName = basename(dirname(__DIR__));
- parent::__construct($moduleDirName);
+ $moduleDirName = basename(dirname(__DIR__));
+ parent::__construct($moduleDirName);
}
/**
diff --git a/docs/changelog.txt b/docs/changelog.txt
index d1e903a..f9c0e6c 100644
--- a/docs/changelog.txt
+++ b/docs/changelog.txt
@@ -1,11 +1,10 @@
-1.08 Beta 1 [NOT RELEASED] Dev: Xoops 2.5.9, PHP 7.2.3
+1.08 Beta 1 [2018-04-08] Dev: Xoops 2.5.9, PHP 7.2.4
- namespaces (mamba)
- Autoload (mamba)
- added Export data to YML - set in Preferences (mamba)
- added XoopsLogger (mamba)
-- Constants are class (mamba)
-
+- Constants in class (mamba)
1.07 RC 1 [NOT RELEASED]
diff --git a/header.php b/header.php
index c851820..6df3c30 100644
--- a/header.php
+++ b/header.php
@@ -44,8 +44,6 @@
$GLOBALS['xoTheme'] = new \xos_opal_Theme();
}
-
-
//$GLOBALS['xoTheme']->addStylesheet('modules/' . $moduleDirName . '/assets/css/xtubestyle.css');
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
@@ -53,7 +51,6 @@
//$xoTheme->addStylesheet(XOOPSTUBE_URL . '/assets/js/magnific/magnific-popup.css');
$GLOBALS['xoTheme']->addStylesheet(XOOPSTUBE_URL . '/assets/css/module.css');
-
require_once XOOPS_ROOT_PATH . '/header.php';
global $xoopModuleConfig;
diff --git a/include/common.php b/include/common.php
index 300265e..241c0ab 100644
--- a/include/common.php
+++ b/include/common.php
@@ -22,9 +22,8 @@
include __DIR__ . '/../preloads/autoloader.php';
-$moduleDirName = basename(dirname(__DIR__));
-$moduleDirNameUpper = strtoupper($moduleDirName); //$capsDirName
-
+$moduleDirName = basename(dirname(__DIR__));
+$moduleDirNameUpper = strtoupper($moduleDirName); //$capsDirName
/** @var \XoopsDatabase $db */
/** @var Xoopstube\Helper $helper */
@@ -56,8 +55,8 @@
define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1);
}
-$pathIcon16 = Xmf\Module\Admin::iconUrl('', 16);
-$pathIcon32 = Xmf\Module\Admin::iconUrl('', 32);
+$pathIcon16 = Xmf\Module\Admin::iconUrl('', 16);
+$pathIcon32 = Xmf\Module\Admin::iconUrl('', 32);
//$pathModIcon16 = $helper->getModule()->getInfo('modicons16');
//$pathModIcon32 = $helper->getModule()->getInfo('modicons32');
diff --git a/include/config.php b/include/config.php
index 8f57098..3ac4768 100644
--- a/include/config.php
+++ b/include/config.php
@@ -17,8 +17,8 @@
* @since 1.0.6
*/
-$moduleDirName = basename(dirname(__DIR__));
-$moduleDirNameUpper = strtoupper($moduleDirName);
+$moduleDirName = basename(dirname(__DIR__));
+$moduleDirNameUpper = strtoupper($moduleDirName);
/**
* @return object
diff --git a/include/search.inc.php b/include/search.inc.php
index 0a6635b..11291ab 100644
--- a/include/search.inc.php
+++ b/include/search.inc.php
@@ -29,7 +29,7 @@ function xtubeCheckSearchGroups($cid = 0, $permType = 'XTubeCatPerm', $redirect
$moduleDirName = basename(dirname(__DIR__));
// $modulePath = dirname(__DIR__);
- $groups = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
+ $groups = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
$grouppermHandler = xoops_getHandler('groupperm');
/** @var XoopsModuleHandler $moduleHandler */
diff --git a/index.php b/index.php
index 3734c1e..98c9f7b 100644
--- a/index.php
+++ b/index.php
@@ -23,14 +23,13 @@
include __DIR__ . '/header.php';
-$moduleDirName = basename(__DIR__);
+$moduleDirName = basename(__DIR__);
$moduleDirNameUpper = strtoupper($moduleDirName);
$start = Request::getInt('start', Request::getInt('start', 0, 'POST'), 'GET');
$GLOBALS['xoopsOption']['template_main'] = 'xoopstube_index.tpl';
-
//$xoTheme->addStylesheet('modules/' . $moduleDirName . '/assets/css/xtubestyle.css');
$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
@@ -38,15 +37,9 @@
$xoopsTpl->assign('xoopstube_url', XOOPSTUBE_URL . '/');
-
-
include XOOPS_ROOT_PATH . '/header.php';
-
-
-
-
-$mytree = new Xoopstube\Tree($GLOBALS['xoopsDB']->prefix('xoopstube_cat'), 'cid', 'pid');
+$mytree = new Xoopstube\Tree($GLOBALS['xoopsDB']->prefix('xoopstube_cat'), 'cid', 'pid');
$xtubemyts = new Xoopstube\TextSanitizer(); // MyTextSanitizer object
// Begin Main page Heading etc
@@ -69,29 +62,25 @@
//$catarray['letters'] = Xoopstube\Utility::getLetters();
-
// Letter Choice Start ---------------------------------------
XoopsModules\Xoopstube\Helper::getInstance()->loadLanguage('common');
$xoopsTpl->assign('letterChoiceTitle', constant('CO_' . $moduleDirNameUpper . '_' . 'BROWSETOTOPIC'));
/** @var \XoopsDatabase $db */
-$db = \XoopsDatabaseFactory::getDatabaseConnection();
-$objHandler = new Xoopstube\VideosHandler($db);
+$db = \XoopsDatabaseFactory::getDatabaseConnection();
+$objHandler = new Xoopstube\VideosHandler($db);
$choicebyletter = new Xoopstube\Common\LetterChoice($objHandler, null, null, range('a', 'z'), 'letter', 'viewcat.php');
//$choicebyletter = new Xoopstube\Common\LetterChoice($objHandler, null, null, range('a', 'z'), 'init', XOOPSTUBE_URL . '/letter.php');
//render the LetterChoice partial and story as part of the Category array
//$catarray['letters'] = $choicebyletter->render($alphaCount, $howmanyother);
-$catarray['letters'] = $choicebyletter->render();
-
+$catarray['letters'] = $choicebyletter->render();
//now assign it to the Smarty variable
$xoopsTpl->assign('catarray', $catarray);
// Letter Choice End ------------------------------------
-
-
// End main page Headers
$count = 1;
@@ -224,6 +213,4 @@
$xoopsTpl->assign('lang_thereare', sprintf($lang_thereare, $total_cat, $listings['count']));
$xoopsTpl->assign('module_dir', $xoopsModule->getVar('dirname'));
-
-
include XOOPS_ROOT_PATH . '/footer.php';
diff --git a/language/english/admin.php b/language/english/admin.php
index dc80f6d..4852344 100644
--- a/language/english/admin.php
+++ b/language/english/admin.php
@@ -115,10 +115,8 @@
* Permissions defines
*/
define('_AM_XOOPSTUBE_PERM_MANAGEMENT', 'Permissions Management');
-define(
- '_AM_XOOPSTUBE_PERM_PERMSNOTE',
- "NOTE: Please be aware that even if you've set correct viewing permissions here, a group might not see the articles or blocks if you don't also grant that group permissions to access the module. To do that, go to System admin > Groups , choose the appropriate group and click the checkboxes to grant its members the access.
"
-);
+define('_AM_XOOPSTUBE_PERM_PERMSNOTE',
+ "NOTE: Please be aware that even if you've set correct viewing permissions here, a group might not see the articles or blocks if you don't also grant that group permissions to access the module. To do that, go to System admin > Groups , choose the appropriate group and click the checkboxes to grant its members the access.
");
define('_AM_XOOPSTUBE_PERM_CPERMISSIONS', 'Category Permissions');
define('_AM_XOOPSTUBE_PERM_CSELECTPERMISSIONS', 'Select categories that each group is allowed to view');
define('_AM_XOOPSTUBE_PERM_CNOCATEGORY', "Cannot set permission's: No Categories's have been created yet!");
diff --git a/language/english/common.php b/language/english/common.php
index da39e0b..ffc583b 100644
--- a/language/english/common.php
+++ b/language/english/common.php
@@ -40,7 +40,6 @@
define('CO_' . $moduleDirNameUpper . '_' . 'PRINT', "Print ");
define('CO_' . $moduleDirNameUpper . '_' . 'PDF', "Create PDF ");
-
define('CO_' . $moduleDirNameUpper . '_' . 'UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
define('CO_' . $moduleDirNameUpper . '_' . 'UPGRADEFAILED1', "Update failed - couldn't add new fields");
define('CO_' . $moduleDirNameUpper . '_' . 'UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
@@ -56,10 +55,9 @@
define('CO_' . $moduleDirNameUpper . '_' . 'ERROR_BAD_REMOVE', 'Could not delete %s');
define('CO_' . $moduleDirNameUpper . '_' . 'ERROR_NO_PLUGIN', 'Could not load plugin');
-
//Help
define('CO_' . $moduleDirNameUpper . '_' . 'DIRNAME', basename(dirname(dirname(__DIR__))));
-define('CO_' . $moduleDirNameUpper . '_' . 'HELP_HEADER', __DIR__.'/help/helpheader.tpl');
+define('CO_' . $moduleDirNameUpper . '_' . 'HELP_HEADER', __DIR__ . '/help/helpheader.tpl');
define('CO_' . $moduleDirNameUpper . '_' . 'BACK_2_ADMIN', 'Back to Administration of ');
define('CO_' . $moduleDirNameUpper . '_' . 'OVERVIEW', 'Overview');
diff --git a/language/english/main.php b/language/english/main.php
index f612f60..4979178 100644
--- a/language/english/main.php
+++ b/language/english/main.php
@@ -273,8 +273,6 @@ function getXtubeAlphabet()
return $xtubeAlphabet;
}
-
-
//1.07
define('_MD_XOOPSTUBE_COUNTRYLTOH', 'Country, Low to High!');
diff --git a/preloads/autoloader.php b/preloads/autoloader.php
index ed936f9..f753e90 100644
--- a/preloads/autoloader.php
+++ b/preloads/autoloader.php
@@ -11,7 +11,7 @@
$base_dir = __DIR__ . '/../class/';
// does the class use the namespace prefix?
- $len = strlen($prefix);
+ $len = strlen($prefix);
if (0 !== strncmp($prefix, $class, $len)) {
return;
@@ -23,7 +23,7 @@
// replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
- $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
+ $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
// if the file exists, require it
if (file_exists($file)) {
diff --git a/preloads/core.php b/preloads/core.php
index 333c889..8e9177f 100644
--- a/preloads/core.php
+++ b/preloads/core.php
@@ -20,7 +20,7 @@
/**
* Class XoopstubeCorePreload
*/
-class XoopstubeCorePreload extends XoopsPreloadItem
+class XoopstubeCorePreload extends \XoopsPreloadItem
{
// to add PSR-4 autoloader
/**
diff --git a/ratevideo.php b/ratevideo.php
index d00437d..b1ef30c 100644
--- a/ratevideo.php
+++ b/ratevideo.php
@@ -81,17 +81,8 @@
// All is well. Add to Line Item Rate to DB.
$newid = $GLOBALS['xoopsDB']->genId($GLOBALS['xoopsDB']->prefix('xoopstube_votedata') . '_ratingid_seq');
$datetime = time();
- $sql = sprintf(
- 'INSERT INTO `%s` (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp, title) VALUES (%u, %u, %u, %u, %s, %u, %s)',
- $GLOBALS['xoopsDB']->prefix('xoopstube_votedata'),
- $newid,
- $lid,
- $ratinguser,
- $rating,
- $GLOBALS['xoopsDB']->quoteString($ip),
- $datetime,
- $GLOBALS['xoopsDB']->quoteString($title)
- );
+ $sql = sprintf('INSERT INTO `%s` (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp, title) VALUES (%u, %u, %u, %u, %s, %u, %s)', $GLOBALS['xoopsDB']->prefix('xoopstube_votedata'), $newid, $lid, $ratinguser, $rating, $GLOBALS['xoopsDB']->quoteString($ip), $datetime,
+ $GLOBALS['xoopsDB']->quoteString($title));
if (!$result = $GLOBALS['xoopsDB']->query($sql)) {
$ratemessage = _MD_XOOPSTUBE_ERROR;
} else {
diff --git a/sbookmarks.php b/sbookmarks.php
index 74e1ef9..dba6dd8 100644
--- a/sbookmarks.php
+++ b/sbookmarks.php
@@ -32,7 +32,7 @@ function getSocialBookmarks($lid)
{
global $xoopsModule;
- $xtubemyts = new Xoopstube\TextSanitizer();
+ $xtubemyts = new Xoopstube\TextSanitizer();
$sbmark_arr = $GLOBALS['xoopsDB']->fetchArray($GLOBALS['xoopsDB']->query('SELECT lid, title FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_videos') . ' WHERE lid=' . (int)$lid));
$sbmark_arr['title'] = $xtubemyts->htmlSpecialCharsStrip($sbmark_arr['title']);
$sbmark_arr['link'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/singlevideo.php?lid=' . (int)$lid;
diff --git a/submit.php b/submit.php
index 71a103d..aabd5e6 100644
--- a/submit.php
+++ b/submit.php
@@ -99,6 +99,7 @@
}
// Notify of new link (anywhere) and new link in category
+ /** @var \XoopsNotificationHandler $notificationHandler */
$notificationHandler = xoops_getHandler('notification');
$tags = [];
diff --git a/testdata/index.php b/testdata/index.php
index 1ac6d78..595f525 100644
--- a/testdata/index.php
+++ b/testdata/index.php
@@ -38,7 +38,7 @@
function loadSampleData()
{
- $moduleDirName = basename(dirname(__DIR__));
+ $moduleDirName = basename(dirname(__DIR__));
xoops_loadLanguage('admin', $moduleDirName);
$items = \Xmf\Yaml::readWrapped('item-data.yml');
$cat = \Xmf\Yaml::readWrapped('cat-data.yml');
diff --git a/viewcat.php b/viewcat.php
index dfb4c1e..a858e4f 100644
--- a/viewcat.php
+++ b/viewcat.php
@@ -41,7 +41,6 @@
$GLOBALS['xoopsOption']['template_main'] = 'xoopstube_viewcat.tpl';
-
include XOOPS_ROOT_PATH . '/header.php';
//$xoTheme->addStylesheet('modules/' . $moduleDirName . '/assets/css/xtubestyle.css');
@@ -58,13 +57,10 @@
$xoopsTpl->assign('xoopstube_url', XOOPSTUBE_URL . '/');
-
-
global $xoopsModule;
$xtubemyts = new Xoopstube\TextSanitizer(); // MyTextSanitizer object
-
/*
$catarray['letters'] = Xoopstube\Utility::getLetters();
//$catarray['letters'] = Xoopstube\Utility::getLettersChoice();
@@ -77,27 +73,22 @@
XoopsModules\Xoopstube\Helper::getInstance()->loadLanguage('common');
$xoopsTpl->assign('letterChoiceTitle', constant('CO_' . $moduleDirNameUpper . '_' . 'BROWSETOTOPIC'));
/** @var \XoopsDatabase $db */
-$db = \XoopsDatabaseFactory::getDatabaseConnection();
-$objHandler = new Xoopstube\VideosHandler($db);
+$db = \XoopsDatabaseFactory::getDatabaseConnection();
+$objHandler = new Xoopstube\VideosHandler($db);
$choicebyletter = new Xoopstube\Common\LetterChoice($objHandler, null, null, range('a', 'z'), 'letter');
//$choicebyletter = new Xoopstube\Common\LetterChoice($objHandler, null, null, range('a', 'z'), 'init', XOOPSTUBE_URL . '/letter.php');
-$catarray['letters'] = $choicebyletter->render();
+$catarray['letters'] = $choicebyletter->render();
//$catarray['letters'] = $choicebyletter->render($alphaCount, $howmanyother);
$xoopsTpl->assign('catarray', $catarray);
// Letter Choice End ------------------------------------
-
-
//$catArray['letters'] = Xoopstube\Utility::getLettersChoice();
//$catArray['letters'] = Xoopstube\Utility::getLettersChoice();
//$catArray['toolbar'] = xoopstube_toolbar();
//$xoopsTpl->assign('catarray', $catArray);
-
-
-
//$catArray['imageheader'] = Xoopstube\Utility::headerImage();
////$catArray['letters'] = Wfdownloads\Utility::lettersChoice();
///** @var \XoopsDatabase $db */
@@ -106,9 +97,6 @@
//$choicebyletter = new Xoopstube\Common\LetterChoice($objHandler, null, null, range('a', 'z'), 'letter');
//$catarray['letters'] = $choicebyletter->render();
-
-
-
// Breadcrumb
$pathstring = '' . _MD_XOOPSTUBE_MAIN . ' ';
$pathstring .= $mytree->getNicePathFromId($cid, 'title', 'viewcat.php?op=');
diff --git a/xoops_version.php b/xoops_version.php
index b9b0e70..8b56767 100644
--- a/xoops_version.php
+++ b/xoops_version.php
@@ -28,7 +28,7 @@
$modversion = [
'version' => 1.08,
'module_status' => 'Beta 1',
- 'release_date' => '2018/03/14',
+ 'release_date' => '2018/03/08',
'name' => _MI_XOOPSTUBE_NAME,
'description' => _MI_XOOPSTUBE_DESC,
'official' => 1, //1 indicates supported by XOOPS Dev Team, 0 means 3rd party supported
@@ -47,33 +47,16 @@
'manual_file' => XOOPS_URL . "/modules/{$moduleDirName}/docs/install.txt",
'min_php' => '5.5',
'min_xoops' => '2.5.9',
- 'min_admin' => '1.1',
+ 'min_admin' => '1.2',
'min_db' => ['mysql' => '5.5'],
// images
'image' => 'assets/images/logoModule.png',
'iconsmall' => 'assets/images/iconsmall.png',
'iconbig' => 'assets/images/iconbig.png',
'dirname' => $moduleDirName,
- // Frameworks
- // 'dirmoduleadmin' => 'Frameworks/moduleclasses/moduleadmin',
- // 'systemIcons16' => 'Frameworks/moduleclasses/icons/16',
- // 'systemIcons32' => 'Frameworks/moduleclasses/icons/32',
- // 'systemIcons32url' => XOOPS_URL . '/' . 'Frameworks/moduleclasses/icons/32',
-
- //Frameworks
- // 'dirmoduleadmin' => 'Frameworks/moduleclasses/moduleadmin',
- // 'sysIcons16' => 'Frameworks/moduleclasses/icons/16',
- // 'sysIcons32' => 'Frameworks/moduleclasses/icons/32',
// Local path icons
'modicons16' => 'assets/images/icons/16',
'modicons32' => 'assets/images/icons/32',
-
- // Local path icons
- // 'moduleIcons16' => 'assets/images/icons/16',
- // 'moduleIcons32' => 'assets/images/icons/32',
- // About
- // 'release_date' => "2013/10/07",
- // 'release' => "2015-04-03",
'demo_site_url' => 'https://xoops.org',
'demo_site_name' => 'XOOPS Demo Site',
'support_url' => 'https://xoops.org/modules/newbb',
@@ -238,7 +221,7 @@
$module = $moduleHandler->getByDirname($modversion['dirname']);
$cansubmit = 0;
if (is_object($module)) {
- $groups = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
+ $groups = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
$grouppermHandler = xoops_getHandler('groupperm');
if ($grouppermHandler->checkRight('XTubeSubPerm', 0, $groups, $module->getVar('mid'))) {
$cansubmit = 1;
@@ -325,7 +308,6 @@
'description' => ''
];
-
// ------------------- Config ------------------- //
$modversion['config'][] = [
'name' => 'popular',
@@ -814,7 +796,6 @@
'default' => 0,
];
-
// ------------------- Notification ------------------- //
$modversion['config'][] = [
'name' => 'notifications',