@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | |
| 399 | 399 | /** |
| 400 | 400 | * Thanks to the NewBB2 Development Team |
| 401 | - * @param $target |
|
| 401 | + * @param string $target |
|
| 402 | 402 | * @return bool |
| 403 | 403 | */ |
| 404 | 404 | public static function mkdirAsAdmin($target) |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | |
| 552 | 552 | /** |
| 553 | 553 | * @param $dirname |
| 554 | - * @return bool |
|
| 554 | + * @return boolean|null |
|
| 555 | 555 | */ |
| 556 | 556 | public static function deleteFile($dirname) |
| 557 | 557 | { |
@@ -744,7 +744,7 @@ discard block |
||
| 744 | 744 | } |
| 745 | 745 | |
| 746 | 746 | /** |
| 747 | - * @param $name |
|
| 747 | + * @param string $name |
|
| 748 | 748 | */ |
| 749 | 749 | public static function closeCollapsable($name) |
| 750 | 750 | { |
@@ -754,7 +754,7 @@ discard block |
||
| 754 | 754 | } |
| 755 | 755 | |
| 756 | 756 | /** |
| 757 | - * @param $name |
|
| 757 | + * @param string $name |
|
| 758 | 758 | * @param $value |
| 759 | 759 | * @param int $time |
| 760 | 760 | */ |
@@ -768,7 +768,7 @@ discard block |
||
| 768 | 768 | } |
| 769 | 769 | |
| 770 | 770 | /** |
| 771 | - * @param $name |
|
| 771 | + * @param string $name |
|
| 772 | 772 | * @param string $default |
| 773 | 773 | * @return string |
| 774 | 774 | */ |
@@ -917,7 +917,7 @@ discard block |
||
| 917 | 917 | } |
| 918 | 918 | |
| 919 | 919 | /** |
| 920 | - * @param $src |
|
| 920 | + * @param string $src |
|
| 921 | 921 | */ |
| 922 | 922 | public static function addScript($src) |
| 923 | 923 | { |
@@ -1096,8 +1096,8 @@ discard block |
||
| 1096 | 1096 | } |
| 1097 | 1097 | |
| 1098 | 1098 | /** |
| 1099 | - * @param $module |
|
| 1100 | - * @param $file |
|
| 1099 | + * @param string $module |
|
| 1100 | + * @param string $file |
|
| 1101 | 1101 | */ |
| 1102 | 1102 | public static function loadLanguageFile($module, $file) |
| 1103 | 1103 | { |
@@ -1215,7 +1215,7 @@ discard block |
||
| 1215 | 1215 | * This function should be able to cover almost all floats that appear in an european environment. |
| 1216 | 1216 | * @param $str |
| 1217 | 1217 | * @param bool $set |
| 1218 | - * @return float|int |
|
| 1218 | + * @return double |
|
| 1219 | 1219 | */ |
| 1220 | 1220 | public static function getFloat($str, $set = false) |
| 1221 | 1221 | { |
@@ -1250,7 +1250,7 @@ discard block |
||
| 1250 | 1250 | /** |
| 1251 | 1251 | * @param $var |
| 1252 | 1252 | * @param bool $currencyObj |
| 1253 | - * @return float|int|mixed|string |
|
| 1253 | + * @return string |
|
| 1254 | 1254 | */ |
| 1255 | 1255 | public static function getCurrency($var, $currencyObj = false) |
| 1256 | 1256 | { |
@@ -1278,7 +1278,7 @@ discard block |
||
| 1278 | 1278 | |
| 1279 | 1279 | /** |
| 1280 | 1280 | * @param $var |
| 1281 | - * @return float|int|mixed|string |
|
| 1281 | + * @return string |
|
| 1282 | 1282 | */ |
| 1283 | 1283 | public static function float($var) |
| 1284 | 1284 | { |
@@ -1326,7 +1326,7 @@ discard block |
||
| 1326 | 1326 | /** |
| 1327 | 1327 | * @param $moduleName |
| 1328 | 1328 | * @param $items |
| 1329 | - * @return array |
|
| 1329 | + * @return string[] |
|
| 1330 | 1330 | */ |
| 1331 | 1331 | public static function getTablesArray($moduleName, $items) |
| 1332 | 1332 | { |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public static function getCssLink($cssfile) |
| 27 | 27 | { |
| 28 | - $ret = '<link rel="stylesheet" type="text/css" href="' . $cssfile . '">'; |
|
| 28 | + $ret = '<link rel="stylesheet" type="text/css" href="'.$cssfile.'">'; |
|
| 29 | 29 | |
| 30 | 30 | return $ret; |
| 31 | 31 | } |
@@ -116,14 +116,14 @@ discard block |
||
| 116 | 116 | $seoMode = static::getModuleModeSEO($moduleName); |
| 117 | 117 | if ('rewrite' === $seoMode) { |
| 118 | 118 | $seoModuleName = static::getModuleNameForSEO($moduleName); |
| 119 | - $ret = XOOPS_URL . '/' . $seoModuleName . '/'; |
|
| 119 | + $ret = XOOPS_URL.'/'.$seoModuleName.'/'; |
|
| 120 | 120 | } elseif ('pathinfo' === $seoMode) { |
| 121 | - $ret = XOOPS_URL . '/modules/' . $moduleName . '/seo.php/' . $seoModuleName . '/'; |
|
| 121 | + $ret = XOOPS_URL.'/modules/'.$moduleName.'/seo.php/'.$seoModuleName.'/'; |
|
| 122 | 122 | } else { |
| 123 | - $ret = XOOPS_URL . '/modules/' . $moduleName . '/'; |
|
| 123 | + $ret = XOOPS_URL.'/modules/'.$moduleName.'/'; |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - return '<a href="' . $ret . '">' . $smartModule->getVar('name') . '</a>'; |
|
| 126 | + return '<a href="'.$ret.'">'.$smartModule->getVar('name').'</a>'; |
|
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | //Verifies that a MySQL table exists |
| 226 | 226 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
| 227 | 227 | $realname = $xoopsDB->prefix($table); |
| 228 | - $sql = 'SHOW TABLES FROM ' . XOOPS_DB_NAME; |
|
| 228 | + $sql = 'SHOW TABLES FROM '.XOOPS_DB_NAME; |
|
| 229 | 229 | $ret = $xoopsDB->queryF($sql); |
| 230 | 230 | while (false !== (list($m_table) = $xoopsDB->fetchRow($ret))) { |
| 231 | 231 | if ($m_table == $realname) { |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $moduleName = static::getCurrentModuleName(); |
| 255 | 255 | } |
| 256 | 256 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
| 257 | - $sql = sprintf('SELECT metavalue FROM `%s` WHERE metakey=%s', $xoopsDB->prefix($moduleName . '_meta'), $xoopsDB->quoteString($key)); |
|
| 257 | + $sql = sprintf('SELECT metavalue FROM `%s` WHERE metakey=%s', $xoopsDB->prefix($moduleName.'_meta'), $xoopsDB->quoteString($key)); |
|
| 258 | 258 | $ret = $xoopsDB->query($sql); |
| 259 | 259 | if (!$ret) { |
| 260 | 260 | $value = false; |
@@ -297,9 +297,9 @@ discard block |
||
| 297 | 297 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
| 298 | 298 | $ret = static::getMeta($key, $moduleName); |
| 299 | 299 | if ('0' === $ret || $ret > 0) { |
| 300 | - $sql = sprintf('UPDATE %s SET metavalue = %s WHERE metakey = %s', $xoopsDB->prefix($moduleName . '_meta'), $xoopsDB->quoteString($value), $xoopsDB->quoteString($key)); |
|
| 300 | + $sql = sprintf('UPDATE %s SET metavalue = %s WHERE metakey = %s', $xoopsDB->prefix($moduleName.'_meta'), $xoopsDB->quoteString($value), $xoopsDB->quoteString($key)); |
|
| 301 | 301 | } else { |
| 302 | - $sql = sprintf('INSERT INTO %s (metakey, metavalue) VALUES (%s, %s)', $xoopsDB->prefix($moduleName . '_meta'), $xoopsDB->quoteString($key), $xoopsDB->quoteString($value)); |
|
| 302 | + $sql = sprintf('INSERT INTO %s (metakey, metavalue) VALUES (%s, %s)', $xoopsDB->prefix($moduleName.'_meta'), $xoopsDB->quoteString($key), $xoopsDB->quoteString($value)); |
|
| 303 | 303 | } |
| 304 | 304 | $ret = $xoopsDB->queryF($sql); |
| 305 | 305 | if (!$ret) { |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | { |
| 480 | 480 | static $smartModules; |
| 481 | 481 | if (isset($smartModules[$moduleName])) { |
| 482 | - $ret =& $smartModules[$moduleName]; |
|
| 482 | + $ret = & $smartModules[$moduleName]; |
|
| 483 | 483 | |
| 484 | 484 | return $ret; |
| 485 | 485 | } |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | { |
| 516 | 516 | static $smartConfigs; |
| 517 | 517 | if (isset($smartConfigs[$moduleName])) { |
| 518 | - $ret =& $smartConfigs[$moduleName]; |
|
| 518 | + $ret = & $smartConfigs[$moduleName]; |
|
| 519 | 519 | |
| 520 | 520 | return $ret; |
| 521 | 521 | } |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | return $ret; |
| 544 | 544 | } |
| 545 | 545 | $hModConfig = xoops_getHandler('config'); |
| 546 | - $smartConfigs[$moduleName] =& $hModConfig->getConfigsByCat(0, $module->getVar('mid')); |
|
| 546 | + $smartConfigs[$moduleName] = & $hModConfig->getConfigsByCat(0, $module->getVar('mid')); |
|
| 547 | 547 | } |
| 548 | 548 | |
| 549 | 549 | return $smartConfigs[$moduleName]; |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | { |
| 570 | 570 | $ret = ''; |
| 571 | 571 | foreach ($errors as $key => $value) { |
| 572 | - $ret .= '<br> - ' . $value; |
|
| 572 | + $ret .= '<br> - '.$value; |
|
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | return $ret; |
@@ -589,17 +589,17 @@ discard block |
||
| 589 | 589 | if (!is_numeric($userid)) { |
| 590 | 590 | return $userid; |
| 591 | 591 | } |
| 592 | - $userid = (int)$userid; |
|
| 592 | + $userid = (int) $userid; |
|
| 593 | 593 | if ($userid > 0) { |
| 594 | 594 | if ($users == []) { |
| 595 | 595 | //fetching users |
| 596 | 596 | $memberHandler = xoops_getHandler('member'); |
| 597 | - $user =& $memberHandler->getUser($userid); |
|
| 597 | + $user = & $memberHandler->getUser($userid); |
|
| 598 | 598 | } else { |
| 599 | 599 | if (!isset($users[$userid])) { |
| 600 | 600 | return $GLOBALS['xoopsConfig']['anonymous']; |
| 601 | 601 | } |
| 602 | - $user =& $users[$userid]; |
|
| 602 | + $user = & $users[$userid]; |
|
| 603 | 603 | } |
| 604 | 604 | if (is_object($user)) { |
| 605 | 605 | $ts = \MyTextSanitizer:: getInstance(); |
@@ -610,15 +610,15 @@ discard block |
||
| 610 | 610 | $fullname = $user->getVar('name'); |
| 611 | 611 | } |
| 612 | 612 | if (!empty($fullname)) { |
| 613 | - $linkeduser = "$fullname [<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $userid . "'>" . $ts->htmlSpecialChars($username) . '</a>]'; |
|
| 613 | + $linkeduser = "$fullname [<a href='".XOOPS_URL.'/userinfo.php?uid='.$userid."'>".$ts->htmlSpecialChars($username).'</a>]'; |
|
| 614 | 614 | } else { |
| 615 | - $linkeduser = "<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $userid . "'>" . ucwords($ts->htmlSpecialChars($username)) . '</a>'; |
|
| 615 | + $linkeduser = "<a href='".XOOPS_URL.'/userinfo.php?uid='.$userid."'>".ucwords($ts->htmlSpecialChars($username)).'</a>'; |
|
| 616 | 616 | } |
| 617 | 617 | // add contact info: email + PM |
| 618 | 618 | if ($withContact) { |
| 619 | - $linkeduser .= ' <a href="mailto:' . $user->getVar('email') . '"><img style="vertical-align: middle;" src="' . XOOPS_URL . '/images/icons/email.gif' . '" alt="' . _CO_SOBJECT_SEND_EMAIL . '" title="' . _CO_SOBJECT_SEND_EMAIL . '"></a>'; |
|
| 620 | - $js = "javascript:openWithSelfMain('" . XOOPS_URL . '/pmlite.php?send2=1&to_userid=' . $userid . "', 'pmlite',450,370);"; |
|
| 621 | - $linkeduser .= ' <a href="' . $js . '"><img style="vertical-align: middle;" src="' . XOOPS_URL . '/images/icons/pm.gif' . '" alt="' . _CO_SOBJECT_SEND_PM . '" title="' . _CO_SOBJECT_SEND_PM . '"></a>'; |
|
| 619 | + $linkeduser .= ' <a href="mailto:'.$user->getVar('email').'"><img style="vertical-align: middle;" src="'.XOOPS_URL.'/images/icons/email.gif'.'" alt="'._CO_SOBJECT_SEND_EMAIL.'" title="'._CO_SOBJECT_SEND_EMAIL.'"></a>'; |
|
| 620 | + $js = "javascript:openWithSelfMain('".XOOPS_URL.'/pmlite.php?send2=1&to_userid='.$userid."', 'pmlite',450,370);"; |
|
| 621 | + $linkeduser .= ' <a href="'.$js.'"><img style="vertical-align: middle;" src="'.XOOPS_URL.'/images/icons/pm.gif'.'" alt="'._CO_SOBJECT_SEND_PM.'" title="'._CO_SOBJECT_SEND_PM.'"></a>'; |
|
| 622 | 622 | } |
| 623 | 623 | |
| 624 | 624 | return $linkeduser; |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | public static function getAdminMenu($currentoption = 0, $breadcrumb = '', $submenus = false, $currentsub = -1) |
| 638 | 638 | { |
| 639 | 639 | global $xoopsModule, $xoopsConfig; |
| 640 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
| 640 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
| 641 | 641 | |
| 642 | 642 | |
| 643 | 643 | /** @var Smartobject\Helper $helper */ |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | $helper->loadLanguage('modinfo'); |
| 647 | 647 | $headermenu = []; |
| 648 | 648 | $adminObject = []; |
| 649 | - include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/menu.php'; |
|
| 649 | + include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/admin/menu.php'; |
|
| 650 | 650 | $tpl = new \XoopsTpl(); |
| 651 | 651 | $tpl->assign([ |
| 652 | 652 | 'headermenu' => $headermenu, |
@@ -669,11 +669,11 @@ discard block |
||
| 669 | 669 | public static function getCollapsableBar($id = '', $title = '', $dsc = '') |
| 670 | 670 | { |
| 671 | 671 | global $xoopsModule; |
| 672 | - echo "<h3 style=\"color: #2F5376; font-weight: bold; font-size: 14px; margin: 6px 0 0 0; \"><a href='javascript:;' onclick=\"togglecollapse('" . $id . "'); toggleIcon('" . $id . "_icon')\";>"; |
|
| 673 | - echo "<img id='" . $id . "_icon' src=" . SMARTOBJECT_URL . "assets/images/close12.gif alt=''></a> " . $title . '</h3>'; |
|
| 674 | - echo "<div id='" . $id . "'>"; |
|
| 672 | + echo "<h3 style=\"color: #2F5376; font-weight: bold; font-size: 14px; margin: 6px 0 0 0; \"><a href='javascript:;' onclick=\"togglecollapse('".$id."'); toggleIcon('".$id."_icon')\";>"; |
|
| 673 | + echo "<img id='".$id."_icon' src=".SMARTOBJECT_URL."assets/images/close12.gif alt=''></a> ".$title.'</h3>'; |
|
| 674 | + echo "<div id='".$id."'>"; |
|
| 675 | 675 | if ('' !== $dsc) { |
| 676 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $dsc . '</span>'; |
|
| 676 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$dsc.'</span>'; |
|
| 677 | 677 | } |
| 678 | 678 | } |
| 679 | 679 | |
@@ -687,11 +687,11 @@ discard block |
||
| 687 | 687 | global $xoopsModule; |
| 688 | 688 | $onClick = "ajaxtogglecollapse('$id')"; |
| 689 | 689 | //$onClick = "togglecollapse('$id'); toggleIcon('" . $id . "_icon')"; |
| 690 | - echo '<h3 style="border: 1px solid; color: #2F5376; font-weight: bold; font-size: 14px; margin: 6px 0 0 0; " onclick="' . $onClick . '">'; |
|
| 691 | - echo "<img id='" . $id . "_icon' src=" . SMARTOBJECT_URL . "assets/images/close12.gif alt=''></a> " . $title . '</h3>'; |
|
| 692 | - echo "<div id='" . $id . "'>"; |
|
| 690 | + echo '<h3 style="border: 1px solid; color: #2F5376; font-weight: bold; font-size: 14px; margin: 6px 0 0 0; " onclick="'.$onClick.'">'; |
|
| 691 | + echo "<img id='".$id."_icon' src=".SMARTOBJECT_URL."assets/images/close12.gif alt=''></a> ".$title.'</h3>'; |
|
| 692 | + echo "<div id='".$id."'>"; |
|
| 693 | 693 | if ('' !== $dsc) { |
| 694 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $dsc . '</span>'; |
|
| 694 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$dsc.'</span>'; |
|
| 695 | 695 | } |
| 696 | 696 | } |
| 697 | 697 | |
@@ -721,13 +721,13 @@ discard block |
||
| 721 | 721 | { |
| 722 | 722 | $urls = static::getCurrentUrls(); |
| 723 | 723 | $path = $urls['phpself']; |
| 724 | - $cookie_name = $path . '_smart_collaps_' . $name; |
|
| 724 | + $cookie_name = $path.'_smart_collaps_'.$name; |
|
| 725 | 725 | $cookie_name = str_replace('.', '_', $cookie_name); |
| 726 | 726 | $cookie = static::getCookieVar($cookie_name, ''); |
| 727 | 727 | if ('none' === $cookie) { |
| 728 | 728 | echo ' |
| 729 | 729 | <script type="text/javascript"><!-- |
| 730 | - togglecollapse("' . $name . '"); toggleIcon("' . $name . '_icon"); |
|
| 730 | + togglecollapse("' . $name.'"); toggleIcon("'.$name.'_icon"); |
|
| 731 | 731 | //--> |
| 732 | 732 | </script> |
| 733 | 733 | '; |
@@ -793,17 +793,17 @@ discard block |
||
| 793 | 793 | $httphost = $_SERVER['HTTP_HOST']; |
| 794 | 794 | $querystring = $_SERVER['QUERY_STRING']; |
| 795 | 795 | if ('' !== $querystring) { |
| 796 | - $querystring = '?' . $querystring; |
|
| 796 | + $querystring = '?'.$querystring; |
|
| 797 | 797 | } |
| 798 | - $currenturl = $http . $httphost . $phpself . $querystring; |
|
| 798 | + $currenturl = $http.$httphost.$phpself.$querystring; |
|
| 799 | 799 | $urls = []; |
| 800 | 800 | $urls['http'] = $http; |
| 801 | 801 | $urls['httphost'] = $httphost; |
| 802 | 802 | $urls['phpself'] = $phpself; |
| 803 | 803 | $urls['querystring'] = $querystring; |
| 804 | - $urls['full_phpself'] = $http . $httphost . $phpself; |
|
| 804 | + $urls['full_phpself'] = $http.$httphost.$phpself; |
|
| 805 | 805 | $urls['full'] = $currenturl; |
| 806 | - $urls['isHomePage'] = (XOOPS_URL . '/index.php') == ($http . $httphost . $phpself); |
|
| 806 | + $urls['isHomePage'] = (XOOPS_URL.'/index.php') == ($http.$httphost.$phpself); |
|
| 807 | 807 | |
| 808 | 808 | return $urls; |
| 809 | 809 | } |
@@ -880,13 +880,13 @@ discard block |
||
| 880 | 880 | { |
| 881 | 881 | global $xoopsConfig, $xoopsModule; |
| 882 | 882 | |
| 883 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
| 883 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
| 884 | 884 | $tpl = new \XoopsTpl(); |
| 885 | 885 | |
| 886 | 886 | $hModule = xoops_getHandler('module'); |
| 887 | - $versioninfo =& $hModule->get($xoopsModule->getVar('mid')); |
|
| 888 | - $modfootertxt = 'Module ' . $versioninfo->getInfo('name') . ' - Version ' . $versioninfo->getInfo('version') . ''; |
|
| 889 | - $modfooter = "<a href='" . $versioninfo->getInfo('support_site_url') . "' target='_blank'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . "/assets/images/cssbutton.gif' title='" . $modfootertxt . "' alt='" . $modfootertxt . "'></a>"; |
|
| 887 | + $versioninfo = & $hModule->get($xoopsModule->getVar('mid')); |
|
| 888 | + $modfootertxt = 'Module '.$versioninfo->getInfo('name').' - Version '.$versioninfo->getInfo('version').''; |
|
| 889 | + $modfooter = "<a href='".$versioninfo->getInfo('support_site_url')."' target='_blank'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname')."/assets/images/cssbutton.gif' title='".$modfootertxt."' alt='".$modfootertxt."'></a>"; |
|
| 890 | 890 | $tpl->assign('modfooter', $modfooter); |
| 891 | 891 | |
| 892 | 892 | if (!defined('_AM_SOBJECT_XOOPS_PRO')) { |
@@ -894,7 +894,7 @@ discard block |
||
| 894 | 894 | } |
| 895 | 895 | $smartobjectConfig = static::getModuleConfig('smartobject'); |
| 896 | 896 | $tpl->assign('smartobject_enable_admin_footer', $smartobjectConfig['enable_admin_footer']); |
| 897 | - $tpl->display(SMARTOBJECT_ROOT_PATH . 'templates/smartobject_admin_footer.tpl'); |
|
| 897 | + $tpl->display(SMARTOBJECT_ROOT_PATH.'templates/smartobject_admin_footer.tpl'); |
|
| 898 | 898 | } |
| 899 | 899 | |
| 900 | 900 | public static function getXoopsCpFooter() |
@@ -921,7 +921,7 @@ discard block |
||
| 921 | 921 | */ |
| 922 | 922 | public static function addScript($src) |
| 923 | 923 | { |
| 924 | - echo '<script src="' . $src . '" type="text/javascript"></script>'; |
|
| 924 | + echo '<script src="'.$src.'" type="text/javascript"></script>'; |
|
| 925 | 925 | } |
| 926 | 926 | |
| 927 | 927 | /** |
@@ -930,16 +930,16 @@ discard block |
||
| 930 | 930 | public static function addStyle($src) |
| 931 | 931 | { |
| 932 | 932 | if ('smartobject' === $src) { |
| 933 | - $src = SMARTOBJECT_URL . 'assets/css/module.css'; |
|
| 933 | + $src = SMARTOBJECT_URL.'assets/css/module.css'; |
|
| 934 | 934 | } |
| 935 | 935 | echo static::getCssLink($src); |
| 936 | 936 | } |
| 937 | 937 | |
| 938 | 938 | public static function addAdminAjaxSupport() |
| 939 | 939 | { |
| 940 | - static::addScript(SMARTOBJECT_URL . 'include/scriptaculous/lib/prototype.js'); |
|
| 941 | - static::addScript(SMARTOBJECT_URL . 'include/scriptaculous/src/scriptaculous.js'); |
|
| 942 | - static::addScript(SMARTOBJECT_URL . 'include/scriptaculous/src/smart.js'); |
|
| 940 | + static::addScript(SMARTOBJECT_URL.'include/scriptaculous/lib/prototype.js'); |
|
| 941 | + static::addScript(SMARTOBJECT_URL.'include/scriptaculous/src/scriptaculous.js'); |
|
| 942 | + static::addScript(SMARTOBJECT_URL.'include/scriptaculous/src/smart.js'); |
|
| 943 | 943 | } |
| 944 | 944 | |
| 945 | 945 | /** |
@@ -999,8 +999,8 @@ discard block |
||
| 999 | 999 | public static function getHtmlnumericentities($str) |
| 1000 | 1000 | { |
| 1001 | 1001 | // return preg_replace('/[^!-%\x27-;=?-~ ]/e', '"&#".ord("$0").chr(59)', $str); |
| 1002 | - return preg_replace_callback('/[^!-%\x27-;=?-~ ]/', function ($m) { |
|
| 1003 | - return '&#' . ord($m[0]) . chr(59); |
|
| 1002 | + return preg_replace_callback('/[^!-%\x27-;=?-~ ]/', function($m) { |
|
| 1003 | + return '&#'.ord($m[0]).chr(59); |
|
| 1004 | 1004 | }, $str); |
| 1005 | 1005 | } |
| 1006 | 1006 | |
@@ -1014,16 +1014,16 @@ discard block |
||
| 1014 | 1014 | static $handlers; |
| 1015 | 1015 | $name = strtolower(trim($name)); |
| 1016 | 1016 | if (!isset($handlers[$name])) { |
| 1017 | - if (file_exists($hnd_file = XOOPS_ROOT_PATH . '/kernel/' . $name . '.php')) { |
|
| 1017 | + if (file_exists($hnd_file = XOOPS_ROOT_PATH.'/kernel/'.$name.'.php')) { |
|
| 1018 | 1018 | require_once $hnd_file; |
| 1019 | 1019 | } |
| 1020 | - $class = 'Xoops' . ucfirst($name) . 'Handler'; |
|
| 1020 | + $class = 'Xoops'.ucfirst($name).'Handler'; |
|
| 1021 | 1021 | if (class_exists($class)) { |
| 1022 | 1022 | $handlers[$name] = new $class($GLOBALS['xoopsDB'], 'xoops'); |
| 1023 | 1023 | } |
| 1024 | 1024 | } |
| 1025 | 1025 | if (!isset($handlers[$name]) && !$optional) { |
| 1026 | - trigger_error('Class <b>' . $class . '</b> does not exist<br>Handler Name: ' . $name, E_USER_ERROR); |
|
| 1026 | + trigger_error('Class <b>'.$class.'</b> does not exist<br>Handler Name: '.$name, E_USER_ERROR); |
|
| 1027 | 1027 | } |
| 1028 | 1028 | if (isset($handlers[$name])) { |
| 1029 | 1029 | return $handlers[$name]; |
@@ -1103,9 +1103,9 @@ discard block |
||
| 1103 | 1103 | { |
| 1104 | 1104 | global $xoopsConfig; |
| 1105 | 1105 | |
| 1106 | - $filename = XOOPS_ROOT_PATH . '/modules/' . $module . '/language/' . $xoopsConfig['language'] . '/' . $file . '.php'; |
|
| 1106 | + $filename = XOOPS_ROOT_PATH.'/modules/'.$module.'/language/'.$xoopsConfig['language'].'/'.$file.'.php'; |
|
| 1107 | 1107 | if (!file_exists($filename)) { |
| 1108 | - $filename = XOOPS_ROOT_PATH . '/modules/' . $module . '/language/english/' . $file . '.php'; |
|
| 1108 | + $filename = XOOPS_ROOT_PATH.'/modules/'.$module.'/language/english/'.$file.'.php'; |
|
| 1109 | 1109 | } |
| 1110 | 1110 | if (file_exists($filename)) { |
| 1111 | 1111 | require_once $filename; |
@@ -1201,7 +1201,7 @@ discard block |
||
| 1201 | 1201 | |
| 1202 | 1202 | $text = preg_replace($search, $replace, $document); |
| 1203 | 1203 | |
| 1204 | - preg_replace_callback('/&#(\d+);/', function ($matches) { |
|
| 1204 | + preg_replace_callback('/&#(\d+);/', function($matches) { |
|
| 1205 | 1205 | return chr($matches[1]); |
| 1206 | 1206 | }, $document); |
| 1207 | 1207 | |
@@ -1224,21 +1224,21 @@ discard block |
||
| 1224 | 1224 | $str = $match[0]; |
| 1225 | 1225 | if (false !== strpos($str, ',')) { |
| 1226 | 1226 | // A comma exists, that makes it easy, cos we assume it separates the decimal part. |
| 1227 | - $str = str_replace('.', '', $str); // Erase thousand seps |
|
| 1228 | - $str = str_replace(',', '.', $str); // Convert , to . for floatval command |
|
| 1227 | + $str = str_replace('.', '', $str); // Erase thousand seps |
|
| 1228 | + $str = str_replace(',', '.', $str); // Convert , to . for floatval command |
|
| 1229 | 1229 | |
| 1230 | - return (float)$str; |
|
| 1230 | + return (float) $str; |
|
| 1231 | 1231 | } else { |
| 1232 | 1232 | // No comma exists, so we have to decide, how a single dot shall be treated |
| 1233 | 1233 | if (true === preg_match("/^[0-9\-]*[\.]{1}[0-9-]+$/", $str) && true === $set['single_dot_as_decimal']) { |
| 1234 | 1234 | // Treat single dot as decimal separator |
| 1235 | - return (float)$str; |
|
| 1235 | + return (float) $str; |
|
| 1236 | 1236 | } else { |
| 1237 | 1237 | //echo "str: ".$str; echo "ret: ".str_replace('.', '', $str); echo "<br><br> "; |
| 1238 | 1238 | // Else, treat all dots as thousand seps |
| 1239 | - $str = str_replace('.', '', $str); // Erase thousand seps |
|
| 1239 | + $str = str_replace('.', '', $str); // Erase thousand seps |
|
| 1240 | 1240 | |
| 1241 | - return (float)$str; |
|
| 1241 | + return (float) $str; |
|
| 1242 | 1242 | } |
| 1243 | 1243 | } |
| 1244 | 1244 | } else { |
@@ -1270,7 +1270,7 @@ discard block |
||
| 1270 | 1270 | $ret .= '.00'; |
| 1271 | 1271 | } |
| 1272 | 1272 | if ($currencyObj) { |
| 1273 | - $ret = $ret . ' ' . $currencyObj->getCode(); |
|
| 1273 | + $ret = $ret.' '.$currencyObj->getCode(); |
|
| 1274 | 1274 | } |
| 1275 | 1275 | |
| 1276 | 1276 | return $ret; |
@@ -1297,7 +1297,7 @@ discard block |
||
| 1297 | 1297 | } |
| 1298 | 1298 | $ret = ''; |
| 1299 | 1299 | if ($moduleName) { |
| 1300 | - $ret = "<a href='" . XOOPS_URL . "/modules/$moduleName/admin/index.php'>" . _CO_SOBJECT_ADMIN_PAGE . '</a>'; |
|
| 1300 | + $ret = "<a href='".XOOPS_URL."/modules/$moduleName/admin/index.php'>"._CO_SOBJECT_ADMIN_PAGE.'</a>'; |
|
| 1301 | 1301 | } |
| 1302 | 1302 | |
| 1303 | 1303 | return $ret; |
@@ -1308,7 +1308,7 @@ discard block |
||
| 1308 | 1308 | */ |
| 1309 | 1309 | public static function getEditors() |
| 1310 | 1310 | { |
| 1311 | - $filename = XOOPS_ROOT_PATH . '/class/xoopseditor/xoopseditor.php'; |
|
| 1311 | + $filename = XOOPS_ROOT_PATH.'/class/xoopseditor/xoopseditor.php'; |
|
| 1312 | 1312 | if (!file_exists($filename)) { |
| 1313 | 1313 | return false; |
| 1314 | 1314 | } |
@@ -1332,9 +1332,9 @@ discard block |
||
| 1332 | 1332 | { |
| 1333 | 1333 | $ret = []; |
| 1334 | 1334 | foreach ($items as $item) { |
| 1335 | - $ret[] = $moduleName . '_' . $item; |
|
| 1335 | + $ret[] = $moduleName.'_'.$item; |
|
| 1336 | 1336 | } |
| 1337 | - $ret[] = $moduleName . '_meta'; |
|
| 1337 | + $ret[] = $moduleName.'_meta'; |
|
| 1338 | 1338 | |
| 1339 | 1339 | return $ret; |
| 1340 | 1340 | } |
@@ -19,11 +19,11 @@ |
||
| 19 | 19 | |
| 20 | 20 | use XoopsModules\Smartobject; |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 22 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
| 23 | 23 | //require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php'); |
| 24 | 24 | |
| 25 | 25 | //require_once __DIR__ . '/../class/Utility.php'; |
| 26 | -require_once __DIR__ . '/../include/common.php'; |
|
| 26 | +require_once __DIR__.'/../include/common.php'; |
|
| 27 | 27 | |
| 28 | 28 | $moduleDirName = basename(dirname(__DIR__)); |
| 29 | 29 | $helper = Smartobject\Helper::getInstance(); |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | -require_once __DIR__ . '/admin_header.php'; |
|
| 50 | +require_once __DIR__.'/admin_header.php'; |
|
| 51 | 51 | //require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
| 52 | -require_once SMARTOBJECT_ROOT_PATH . 'class/adsense.php'; |
|
| 52 | +require_once SMARTOBJECT_ROOT_PATH.'class/adsense.php'; |
|
| 53 | 53 | |
| 54 | 54 | //$helper = \XoopsModules\Smartobject\Helper::getInstance(); |
| 55 | 55 | //$helper = Smartobject\Helper::getInstance(); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | break; |
| 90 | 90 | |
| 91 | 91 | case 'addadsense': |
| 92 | - if (@require_once SMARTOBJECT_ROOT_PATH . 'include/captcha/captcha.php') { |
|
| 92 | + if (@require_once SMARTOBJECT_ROOT_PATH.'include/captcha/captcha.php') { |
|
| 93 | 93 | $xoopsCaptcha = XoopsCaptcha::getInstance(); |
| 94 | 94 | if (!$xoopsCaptcha->verify()) { |
| 95 | 95 | redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage()); |
@@ -164,4 +164,4 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | //Smartobject\Utility::getModFooter(); |
| 166 | 166 | //xoops_cp_footer(); |
| 167 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 167 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | -require_once __DIR__ . '/admin_header.php'; |
|
| 43 | +require_once __DIR__.'/admin_header.php'; |
|
| 44 | 44 | //require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
| 45 | 45 | //require_once SMARTOBJECT_ROOT_PATH . 'class/currency.php'; |
| 46 | 46 | $smartobjectCurrencyHandler = Smartobject\Helper::getInstance()->getHandler('Currency'); |
@@ -71,9 +71,9 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | if (isset($_POST['default_currency'])) { |
| 73 | 73 | $newDefaultCurrency = $_POST['default_currency']; |
| 74 | - $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0'; |
|
| 74 | + $sql = 'UPDATE '.$smartobjectCurrencyHandler->table.' SET default_currency=0'; |
|
| 75 | 75 | $smartobjectCurrencyHandler->query($sql); |
| 76 | - $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency; |
|
| 76 | + $sql = 'UPDATE '.$smartobjectCurrencyHandler->table.' SET default_currency=1 WHERE currencyid='.$newDefaultCurrency; |
|
| 77 | 77 | $smartobjectCurrencyHandler->query($sql); |
| 78 | 78 | } |
| 79 | 79 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | case 'addcurrency': |
| 94 | 94 | // require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
| 95 | 95 | $controller = new ObjectController($smartobjectCurrencyHandler); |
| 96 | - $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php'); |
|
| 96 | + $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL.'admin/currency.php'); |
|
| 97 | 97 | |
| 98 | 98 | break; |
| 99 | 99 | |
@@ -134,4 +134,4 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | //Smartobject\Utility::getModFooter(); |
| 136 | 136 | //xoops_cp_footer(); |
| 137 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 137 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -10,8 +10,8 @@ discard block |
||
| 10 | 10 | use XoopsModules\Wfdownloads; |
| 11 | 11 | use XoopsModules\Smartobject; |
| 12 | 12 | |
| 13 | -require_once __DIR__ . '/admin_header.php'; |
|
| 14 | -require_once SMARTCONTENT_ROOT_PATH . 'class/dbupdater.php'; |
|
| 13 | +require_once __DIR__.'/admin_header.php'; |
|
| 14 | +require_once SMARTCONTENT_ROOT_PATH.'class/dbupdater.php'; |
|
| 15 | 15 | |
| 16 | 16 | smartcontent_xoops_cp_header(); |
| 17 | 17 | |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | global $xoopsDB; |
| 220 | 220 | $helperWfdownloads = \Xmf\Module\Helper::getHelper('wfdownloads'); |
| 221 | 221 | $catHandler = $helperWfdownloads->getHandler('Category'); |
| 222 | - $result = $xoopsDB->query('SHOW COLUMNS FROM ' . $catHandler->table); |
|
| 222 | + $result = $xoopsDB->query('SHOW COLUMNS FROM '.$catHandler->table); |
|
| 223 | 223 | while (false !== ($existing_field = $xoopsDB->fetchArray($result))) { |
| 224 | 224 | $fields[$existing_field['field']] = $existing_field['type']; |
| 225 | 225 | } |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | //$xoopsDB->query("ALTER TABLE ".$table." ADD ".$field." ".$type); |
| 279 | 279 | //echo $field."(".$type.") <FONT COLOR='##22DD51'>Added</FONT><br>"; |
| 280 | 280 | } elseif ($existing_fields[$field] != $type) { |
| 281 | - $table->addAlteredField($field, $field . ' ' . $type); |
|
| 281 | + $table->addAlteredField($field, $field.' '.$type); |
|
| 282 | 282 | // check $fields[$field]['type'] for things like "int(10) unsigned" |
| 283 | 283 | //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$field." ".$type); |
| 284 | 284 | //echo $field." <FONT COLOR='#FF6600'>Changed to</FONT> ".$type."<br>"; |
@@ -299,17 +299,17 @@ discard block |
||
| 299 | 299 | function get_table_info($table, $default_fields) |
| 300 | 300 | { |
| 301 | 301 | global $xoopsDB; |
| 302 | - $result = $xoopsDB->query('SHOW COLUMNS FROM ' . $table); |
|
| 302 | + $result = $xoopsDB->query('SHOW COLUMNS FROM '.$table); |
|
| 303 | 303 | while (false !== ($existing_field = $xoopsDB->fetchArray($result))) { |
| 304 | 304 | $fields[$existing_field['Field']] = $existing_field['Type']; |
| 305 | 305 | if ('YES' !== $existing_field['Null']) { |
| 306 | 306 | $fields[$existing_field['Field']] .= ' NOT NULL'; |
| 307 | 307 | } |
| 308 | 308 | if ($existing_field['Extra']) { |
| 309 | - $fields[$existing_field['Field']] .= ' ' . $existing_field['Extra']; |
|
| 309 | + $fields[$existing_field['Field']] .= ' '.$existing_field['Extra']; |
|
| 310 | 310 | } |
| 311 | 311 | if ($default_fields[$existing_field['Field']]['Default']) { |
| 312 | - $fields[$existing_field['Field']] .= " default '" . $existing_field['Default'] . "'"; |
|
| 312 | + $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'"; |
|
| 313 | 313 | } |
| 314 | 314 | } |
| 315 | 315 | |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | if (in_array($field, array_keys($renamed_fields))) { |
| 332 | 332 | $new_field_name = $renamed_fields[$field]; |
| 333 | 333 | $new_field_type = $new_fields[$new_field_name]['Type']; |
| 334 | - $table->addAltered($field, $new_field_name . ' ' . $new_field_type); |
|
| 334 | + $table->addAltered($field, $new_field_name.' '.$new_field_type); |
|
| 335 | 335 | //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$new_field_name." ".$new_field_type); |
| 336 | 336 | //echo $field." Renamed to ".$new_field_name."<br>"; |
| 337 | 337 | $fields[$new_field_name] = $new_field_type; |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | |
| 360 | 360 | default: |
| 361 | 361 | //ask what to do |
| 362 | - include XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 362 | + include XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 363 | 363 | $form = new \XoopsThemeForm('Upgrade WF-Downloads', 'form', $_SERVER['REQUEST_URI']); |
| 364 | 364 | |
| 365 | 365 | //Is MyDownloads installed? |
@@ -384,4 +384,4 @@ discard block |
||
| 384 | 384 | } |
| 385 | 385 | //wfdownloads_modFooter(); |
| 386 | 386 | //xoops_cp_footer(); |
| 387 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 387 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | -require_once __DIR__ . '/admin_header.php'; |
|
| 48 | +require_once __DIR__.'/admin_header.php'; |
|
| 49 | 49 | Smartobject\Utility::loadLanguageFile('smartobject', 'customtag'); |
| 50 | 50 | |
| 51 | 51 | //require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
@@ -158,4 +158,4 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | //Smartobject\Utility::getModFooter(); |
| 160 | 160 | //xoops_cp_footer(); |
| 161 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 161 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | -require_once __DIR__ . '/admin_header.php'; |
|
| 59 | +require_once __DIR__.'/admin_header.php'; |
|
| 60 | 60 | //require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
| 61 | 61 | //require_once SMARTOBJECT_ROOT_PATH . 'class/rating.php'; |
| 62 | 62 | $smartobjectRatingHandler = Smartobject\Helper::getInstance()->getHandler('Rating'); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | case 'addrating': |
| 87 | 87 | // require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
| 88 | 88 | $controller = new XoopsModules\Smartobject\ObjectController($smartobjectRatingHandler); |
| 89 | - $controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php'); |
|
| 89 | + $controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL.'admin/rating.php'); |
|
| 90 | 90 | |
| 91 | 91 | break; |
| 92 | 92 | |
@@ -154,4 +154,4 @@ discard block |
||
| 154 | 154 | |
| 155 | 155 | //Smartobject\Utility::getModFooter(); |
| 156 | 156 | //xoops_cp_footer(); |
| 157 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 157 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | $titleTag = []; |
| 215 | 215 | |
| 216 | - $show_mod_name_breadcrumb = null !==($helper->getConfig('show_mod_name_breadcrumb')) ? $helper->getConfig('show_mod_name_breadcrumb') : true; |
|
| 216 | + $show_mod_name_breadcrumb = null !== ($helper->getConfig('show_mod_name_breadcrumb')) ? $helper->getConfig('show_mod_name_breadcrumb') : true; |
|
| 217 | 217 | |
| 218 | 218 | if ($moduleName && $show_mod_name_breadcrumb) { |
| 219 | 219 | $titleTag['module'] = $moduleName; |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | /** @var Smartobject\Helper $helper */ |
| 271 | 271 | $helper = Smartobject\Helper::getInstance(); |
| 272 | 272 | |
| 273 | - if (null !== ($helper->getConfig('module_meta_description'))) { |
|
| 273 | + if (null !== ($helper->getConfig('module_meta_description'))) { |
|
| 274 | 274 | $description = $helper->getConfig('module_meta_description'); |
| 275 | 275 | } |
| 276 | 276 | } |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | /** @var Smartobject\Helper $helper */ |
| 366 | 366 | $helper = Smartobject\Helper::getInstance(); |
| 367 | 367 | |
| 368 | - $keywords = $this->findMetaKeywords($this->_original_title . ' ' . $this->_description, $this->_minChar); |
|
| 368 | + $keywords = $this->findMetaKeywords($this->_original_title.' '.$this->_description, $this->_minChar); |
|
| 369 | 369 | if (null !== ($helper->getModule()) && null !== ($helper->getConfig('moduleMetaKeywords')) |
| 370 | 370 | && '' !== $helper->getConfig('moduleMetaKeywords')) { |
| 371 | 371 | $moduleKeywords = explode(',', $helper->getConfig('moduleMetaKeywords')); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
| 19 | 19 | |
| 20 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
| 20 | +require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php'; |
|
| 21 | 21 | |
| 22 | 22 | if (!defined('XOBJ_DTYPE_SIMPLE_ARRAY')) { |
| 23 | 23 | define('XOBJ_DTYPE_SIMPLE_ARRAY', 101); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | public function closeSection($section_name) |
| 118 | 118 | { |
| 119 | - $this->initVar('close_section_' . $section_name, XOBJ_DTYPE_FORM_SECTION_CLOSE, '', false, null, '', false, '', '', false, false, true); |
|
| 119 | + $this->initVar('close_section_'.$section_name, XOBJ_DTYPE_FORM_SECTION_CLOSE, '', false, null, '', false, '', '', false, false, true); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -154,13 +154,13 @@ discard block |
||
| 154 | 154 | } |
| 155 | 155 | parent::initVar($key, $data_type, $value, $required, $maxlength, $options); |
| 156 | 156 | if ($this->handler && (!$form_caption || '' === $form_caption)) { |
| 157 | - $dyn_form_caption = strtoupper('_CO_' . $this->handler->_moduleName . '_' . $this->handler->_itemname . '_' . $key); |
|
| 157 | + $dyn_form_caption = strtoupper('_CO_'.$this->handler->_moduleName.'_'.$this->handler->_itemname.'_'.$key); |
|
| 158 | 158 | if (defined($dyn_form_caption)) { |
| 159 | 159 | $form_caption = constant($dyn_form_caption); |
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | 162 | if ($this->handler && (!$form_dsc || '' === $form_dsc)) { |
| 163 | - $dyn_form_dsc = strtoupper('_CO_' . $this->handler->_moduleName . '_' . $this->handler->_itemname . '_' . $key . '_DSC'); |
|
| 163 | + $dyn_form_dsc = strtoupper('_CO_'.$this->handler->_moduleName.'_'.$this->handler->_itemname.'_'.$key.'_DSC'); |
|
| 164 | 164 | if (defined($dyn_form_dsc)) { |
| 165 | 165 | $form_dsc = constant($dyn_form_dsc); |
| 166 | 166 | } |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | public function toArray() |
| 457 | 457 | { |
| 458 | 458 | $ret = []; |
| 459 | - $vars =& $this->getVars(); |
|
| 459 | + $vars = & $this->getVars(); |
|
| 460 | 460 | foreach ($vars as $key => $var) { |
| 461 | 461 | $value = $this->getVar($key); |
| 462 | 462 | $ret[$key] = $value; |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | } |
| 506 | 506 | } else { |
| 507 | 507 | if ($prefix) { |
| 508 | - $err_str = '[' . $prefix . '] ' . $err_str; |
|
| 508 | + $err_str = '['.$prefix.'] '.$err_str; |
|
| 509 | 509 | } |
| 510 | 510 | parent::setErrors($err_str); |
| 511 | 511 | } |
@@ -789,7 +789,7 @@ discard block |
||
| 789 | 789 | /** @var Smartmedia\Helper $helper */ |
| 790 | 790 | $helper = Smartmedia\Helper::getInstance(); |
| 791 | 791 | |
| 792 | - $form_editor = null !==($helper->getConfig('default_editor')) ? $helper->getConfig('default_editor') : 'textarea'; |
|
| 792 | + $form_editor = null !== ($helper->getConfig('default_editor')) ? $helper->getConfig('default_editor') : 'textarea'; |
|
| 793 | 793 | } |
| 794 | 794 | |
| 795 | 795 | if ($editor) { |
@@ -836,8 +836,8 @@ discard block |
||
| 836 | 836 | $this->setErrors(sprintf(_XOBJ_ERR_REQUIRED, $k)); |
| 837 | 837 | continue 2; |
| 838 | 838 | } |
| 839 | - if (isset($v['maxlength']) && strlen($cleanv) > (int)$v['maxlength']) { |
|
| 840 | - $this->setErrors(sprintf(_XOBJ_ERR_SHORTERTHAN, $k, (int)$v['maxlength'])); |
|
| 839 | + if (isset($v['maxlength']) && strlen($cleanv) > (int) $v['maxlength']) { |
|
| 840 | + $this->setErrors(sprintf(_XOBJ_ERR_SHORTERTHAN, $k, (int) $v['maxlength'])); |
|
| 841 | 841 | continue 2; |
| 842 | 842 | } |
| 843 | 843 | if (!$v['not_gpc']) { |
@@ -866,7 +866,7 @@ discard block |
||
| 866 | 866 | break; |
| 867 | 867 | case XOBJ_DTYPE_INT: |
| 868 | 868 | case XOBJ_DTYPE_TIME_ONLY: |
| 869 | - $cleanv = (int)$cleanv; |
|
| 869 | + $cleanv = (int) $cleanv; |
|
| 870 | 870 | break; |
| 871 | 871 | |
| 872 | 872 | case XOBJ_DTYPE_CURRENCY: |
@@ -897,10 +897,10 @@ discard block |
||
| 897 | 897 | continue 2; |
| 898 | 898 | } |
| 899 | 899 | if ('' !== $cleanv && !preg_match("/^http[s]*:\/\//i", $cleanv)) { |
| 900 | - $cleanv = 'http://' . $cleanv; |
|
| 900 | + $cleanv = 'http://'.$cleanv; |
|
| 901 | 901 | } |
| 902 | 902 | if (!$v['not_gpc']) { |
| 903 | - $cleanv =& $ts->stripSlashesGPC($cleanv); |
|
| 903 | + $cleanv = & $ts->stripSlashesGPC($cleanv); |
|
| 904 | 904 | } |
| 905 | 905 | break; |
| 906 | 906 | case XOBJ_DTYPE_SIMPLE_ARRAY: |
@@ -912,7 +912,7 @@ discard block |
||
| 912 | 912 | case XOBJ_DTYPE_STIME: |
| 913 | 913 | case XOBJ_DTYPE_MTIME: |
| 914 | 914 | case XOBJ_DTYPE_LTIME: |
| 915 | - $cleanv = !is_string($cleanv) ? (int)$cleanv : strtotime($cleanv); |
|
| 915 | + $cleanv = !is_string($cleanv) ? (int) $cleanv : strtotime($cleanv); |
|
| 916 | 916 | if (!($cleanv > 0)) { |
| 917 | 917 | $cleanv = strtotime($cleanv); |
| 918 | 918 | } |
@@ -921,7 +921,7 @@ discard block |
||
| 921 | 921 | break; |
| 922 | 922 | } |
| 923 | 923 | } |
| 924 | - $this->cleanVars[$k] =& $cleanv; |
|
| 924 | + $this->cleanVars[$k] = & $cleanv; |
|
| 925 | 925 | unset($cleanv); |
| 926 | 926 | } |
| 927 | 927 | if (count($this->_errors) > 0) { |
@@ -1146,10 +1146,10 @@ discard block |
||
| 1146 | 1146 | } |
| 1147 | 1147 | break; |
| 1148 | 1148 | case XOBJ_DTYPE_SIMPLE_ARRAY: |
| 1149 | - $ret =& explode('|', $ret); |
|
| 1149 | + $ret = & explode('|', $ret); |
|
| 1150 | 1150 | break; |
| 1151 | 1151 | case XOBJ_DTYPE_ARRAY: |
| 1152 | - $ret =& unserialize($ret); |
|
| 1152 | + $ret = & unserialize($ret); |
|
| 1153 | 1153 | break; |
| 1154 | 1154 | case XOBJ_DTYPE_SOURCE: |
| 1155 | 1155 | switch (strtolower($format)) { |