Completed
Push — master ( 88111b...b3fce7 )
by Michael
05:58
created
sendlink.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@  discard block
 block discarded – undo
9 9
 
10 10
 use XoopsModules\Smartobject\ObjectController;
11 11
 
12
-require_once __DIR__ . '/header.php';
12
+require_once __DIR__.'/header.php';
13 13
 //require_once SMARTOBJECT_ROOT_PATH . 'class/smartloader.php';
14 14
 //require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectlink.php';
15
-require_once XOOPS_ROOT_PATH . '/class/template.php';
15
+require_once XOOPS_ROOT_PATH.'/class/template.php';
16 16
 
17 17
 $xoopsTpl                = new \XoopsTpl();
18 18
 $myts                    = \MyTextSanitizer::getInstance();
19 19
 $xoopsConfig['sitename'] = $myts->displayTarea($xoopsConfig['sitename']);
20 20
 
21 21
 xoops_header(false);
22
-echo Smartobject\Utility::getCssLink(SMARTOBJECT_URL . 'assets/css/module.css');
22
+echo Smartobject\Utility::getCssLink(SMARTOBJECT_URL.'assets/css/module.css');
23 23
 echo '</head><body>';
24 24
 
25 25
 $smartobjectLinkHandler = Smartobject\Helper::getInstance()->getHandler('link', 'smartobject');
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 
43 43
         $xoopsMailer = xoops_getMailer();
44 44
         $xoopsMailer->useMail();
45
-        $xoopsMailer->setTemplateDir('language/' . $xoopsConfig['language'] . '/mail_template');
45
+        $xoopsMailer->setTemplateDir('language/'.$xoopsConfig['language'].'/mail_template');
46 46
 
47 47
         $xoopsMailer->setTemplate('sendlink.tpl');
48 48
         $xoopsMailer->assign('X_SITENAME', $xoopsConfig['sitename']);
49 49
         $xoopsMailer->assign('TO_NAME', $linkObj->getVar('to_name'));
50 50
         $xoopsMailer->assign('FROM_NAME', $linkObj->getVar('from_name'));
51
-        $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
51
+        $xoopsMailer->assign('SITEURL', XOOPS_URL.'/');
52 52
         $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
53 53
         $xoopsMailer->assign('MESSAGE', $_POST['body']);
54 54
         $xoopsMailer->setToEmails($linkObj->getVar('to_email'));
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $xoopsMailer->setSubject(sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $myts->oopsStripSlashesGPC($xoopsConfig['sitename'])));
58 58
 
59 59
         if (!$xoopsMailer->send(true)) {
60
-            $xoopsTpl->assign('send_error', sprintf(_CO_SOBJECT_SEND_ERROR, $xoopsConfig['adminmail']) . '<br>' . $xoopsMailer->getErrors(true));
60
+            $xoopsTpl->assign('send_error', sprintf(_CO_SOBJECT_SEND_ERROR, $xoopsConfig['adminmail']).'<br>'.$xoopsMailer->getErrors(true));
61 61
         } else {
62 62
             $xoopsTpl->assign('send_success', _CO_SOBJECT_SEND_SUCCESS);
63 63
         }
Please login to merge, or discard this patch.
class/Utility.php 1 patch
Spacing   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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>&nbsp;" . $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>&nbsp;".$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
 block discarded – undo
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>&nbsp;" . $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>&nbsp;".$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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
880 880
     {
881 881
         global $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
class/Dbupdater.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -38,15 +38,15 @@  discard block
 block discarded – undo
38 38
  */
39 39
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
40 40
 if (!defined('SMARTOBJECT_ROOT_PATH')) {
41
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
41
+    require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
42 42
 }
43 43
 /**
44 44
  * Include the language constants for the SmartObjectDBUpdater
45 45
  */
46 46
 global $xoopsConfig;
47
-$common_file = SMARTOBJECT_ROOT_PATH . 'language/' . $xoopsConfig['language'] . '/smartdbupdater.php';
47
+$common_file = SMARTOBJECT_ROOT_PATH.'language/'.$xoopsConfig['language'].'/smartdbupdater.php';
48 48
 if (!file_exists($common_file)) {
49
-    $common_file = SMARTOBJECT_ROOT_PATH . 'language/english/smartdbupdater.php';
49
+    $common_file = SMARTOBJECT_ROOT_PATH.'language/english/smartdbupdater.php';
50 50
 }
51 51
 include $common_file;
52 52
 
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
         $query = sprintf('ALTER TABLE %s RENAME %s', $from, $to);
131 131
         $ret   = $xoopsDB->query($query);
132 132
         if (!$ret) {
133
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from) . '<br>';
133
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from).'<br>';
134 134
 
135 135
             return false;
136 136
         } else {
137
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_RENAME_TABLE, $from, $to) . '<br>';
137
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_RENAME_TABLE, $from, $to).'<br>';
138 138
 
139 139
             return true;
140 140
         }
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             return false;
255 255
         }
256 256
 
257
-        $table      = new DbTable($module . '_' . $item);
257
+        $table      = new DbTable($module.'_'.$item);
258 258
         $object     = $moduleHandler->create();
259 259
         $objectVars = $object->getVars();
260 260
 
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 ";
276 276
                 }
277 277
             }
278
-            $structure .= 'PRIMARY KEY  (`' . $moduleHandler->keyName . '`)
278
+            $structure .= 'PRIMARY KEY  (`'.$moduleHandler->keyName.'`)
279 279
 ';
280 280
             $table->setStructure($structure);
281 281
             if (!$this->updateTable($table)) {
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 
336 336
         ob_start();
337 337
 
338
-        $table = new DbTable($dirname . '_meta');
338
+        $table = new DbTable($dirname.'_meta');
339 339
         if (!$table->exists()) {
340 340
             $table->setStructure("
341 341
               `metakey` varchar(50) NOT NULL default '',
@@ -353,20 +353,20 @@  discard block
 block discarded – undo
353 353
         if (!$dbVersion) {
354 354
             $dbVersion = 0;
355 355
         }
356
-        $newDbVersion = constant(strtoupper($dirname . '_db_version')) ?: 0;
357
-        echo 'Database version: ' . $dbVersion . '<br>';
358
-        echo 'New database version: ' . $newDbVersion . '<br>';
356
+        $newDbVersion = constant(strtoupper($dirname.'_db_version')) ?: 0;
357
+        echo 'Database version: '.$dbVersion.'<br>';
358
+        echo 'New database version: '.$newDbVersion.'<br>';
359 359
 
360 360
         if ($newDbVersion > $dbVersion) {
361 361
             for ($i = $dbVersion + 1; $i <= $newDbVersion; ++$i) {
362
-                $upgrade_function = $dirname . '_db_upgrade_' . $i;
362
+                $upgrade_function = $dirname.'_db_upgrade_'.$i;
363 363
                 if (function_exists($upgrade_function)) {
364 364
                     $upgrade_function();
365 365
                 }
366 366
             }
367 367
         }
368 368
 
369
-        echo '<code>' . _SDU_UPDATE_UPDATING_DATABASE . '<br>';
369
+        echo '<code>'._SDU_UPDATE_UPDATING_DATABASE.'<br>';
370 370
 
371 371
         // if there is a function to execute for this DB version, let's do it
372 372
         //$function_
Please login to merge, or discard this patch.
class/BaseSmartObject.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
17 17
 
18
-require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
18
+require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
19 19
 
20 20
 if (!defined('XOBJ_DTYPE_SIMPLE_ARRAY')) {
21 21
     define('XOBJ_DTYPE_SIMPLE_ARRAY', 101);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function closeSection($section_name)
116 116
     {
117
-        $this->initVar('close_section_' . $section_name, XOBJ_DTYPE_FORM_SECTION_CLOSE, '', false, null, '', false, '', '', false, false, true);
117
+        $this->initVar('close_section_'.$section_name, XOBJ_DTYPE_FORM_SECTION_CLOSE, '', false, null, '', false, '', '', false, false, true);
118 118
     }
119 119
 
120 120
     /**
@@ -152,13 +152,13 @@  discard block
 block discarded – undo
152 152
         }
153 153
         parent::initVar($key, $data_type, $value, $required, $maxlength, $options);
154 154
         if ($this->handler && (!$form_caption || '' === $form_caption)) {
155
-            $dyn_form_caption = strtoupper('_CO_' . $this->handler->_moduleName . '_' . $this->handler->_itemname . '_' . $key);
155
+            $dyn_form_caption = strtoupper('_CO_'.$this->handler->_moduleName.'_'.$this->handler->_itemname.'_'.$key);
156 156
             if (defined($dyn_form_caption)) {
157 157
                 $form_caption = constant($dyn_form_caption);
158 158
             }
159 159
         }
160 160
         if ($this->handler && (!$form_dsc || '' === $form_dsc)) {
161
-            $dyn_form_dsc = strtoupper('_CO_' . $this->handler->_moduleName . '_' . $this->handler->_itemname . '_' . $key . '_DSC');
161
+            $dyn_form_dsc = strtoupper('_CO_'.$this->handler->_moduleName.'_'.$this->handler->_itemname.'_'.$key.'_DSC');
162 162
             if (defined($dyn_form_dsc)) {
163 163
                 $form_dsc = constant($dyn_form_dsc);
164 164
             }
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
     public function toArray()
455 455
     {
456 456
         $ret  = [];
457
-        $vars =& $this->getVars();
457
+        $vars = & $this->getVars();
458 458
         foreach ($vars as $key => $var) {
459 459
             $value     = $this->getVar($key);
460 460
             $ret[$key] = $value;
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
             }
504 504
         } else {
505 505
             if ($prefix) {
506
-                $err_str = '[' . $prefix . '] ' . $err_str;
506
+                $err_str = '['.$prefix.'] '.$err_str;
507 507
             }
508 508
             parent::setErrors($err_str);
509 509
         }
@@ -831,8 +831,8 @@  discard block
 block discarded – undo
831 831
                             $this->setErrors(sprintf(_XOBJ_ERR_REQUIRED, $k));
832 832
                             continue 2;
833 833
                         }
834
-                        if (isset($v['maxlength']) && strlen($cleanv) > (int)$v['maxlength']) {
835
-                            $this->setErrors(sprintf(_XOBJ_ERR_SHORTERTHAN, $k, (int)$v['maxlength']));
834
+                        if (isset($v['maxlength']) && strlen($cleanv) > (int) $v['maxlength']) {
835
+                            $this->setErrors(sprintf(_XOBJ_ERR_SHORTERTHAN, $k, (int) $v['maxlength']));
836 836
                             continue 2;
837 837
                         }
838 838
                         if (!$v['not_gpc']) {
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
                         break;
862 862
                     case XOBJ_DTYPE_INT:
863 863
                     case XOBJ_DTYPE_TIME_ONLY:
864
-                        $cleanv = (int)$cleanv;
864
+                        $cleanv = (int) $cleanv;
865 865
                         break;
866 866
 
867 867
                     case XOBJ_DTYPE_CURRENCY:
@@ -892,10 +892,10 @@  discard block
 block discarded – undo
892 892
                             continue 2;
893 893
                         }
894 894
                         if ('' !== $cleanv && !preg_match("/^http[s]*:\/\//i", $cleanv)) {
895
-                            $cleanv = 'http://' . $cleanv;
895
+                            $cleanv = 'http://'.$cleanv;
896 896
                         }
897 897
                         if (!$v['not_gpc']) {
898
-                            $cleanv =& $ts->stripSlashesGPC($cleanv);
898
+                            $cleanv = & $ts->stripSlashesGPC($cleanv);
899 899
                         }
900 900
                         break;
901 901
                     case XOBJ_DTYPE_SIMPLE_ARRAY:
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
                     case XOBJ_DTYPE_STIME:
908 908
                     case XOBJ_DTYPE_MTIME:
909 909
                     case XOBJ_DTYPE_LTIME:
910
-                        $cleanv = !is_string($cleanv) ? (int)$cleanv : strtotime($cleanv);
910
+                        $cleanv = !is_string($cleanv) ? (int) $cleanv : strtotime($cleanv);
911 911
                         if (!($cleanv > 0)) {
912 912
                             $cleanv = strtotime($cleanv);
913 913
                         }
@@ -916,7 +916,7 @@  discard block
 block discarded – undo
916 916
                         break;
917 917
                 }
918 918
             }
919
-            $this->cleanVars[$k] =& $cleanv;
919
+            $this->cleanVars[$k] = & $cleanv;
920 920
             unset($cleanv);
921 921
         }
922 922
         if (count($this->_errors) > 0) {
@@ -1141,10 +1141,10 @@  discard block
 block discarded – undo
1141 1141
                 }
1142 1142
                 break;
1143 1143
             case XOBJ_DTYPE_SIMPLE_ARRAY:
1144
-                $ret =& explode('|', $ret);
1144
+                $ret = & explode('|', $ret);
1145 1145
                 break;
1146 1146
             case XOBJ_DTYPE_ARRAY:
1147
-                $ret =& unserialize($ret);
1147
+                $ret = & unserialize($ret);
1148 1148
                 break;
1149 1149
             case XOBJ_DTYPE_SOURCE:
1150 1150
                 switch (strtolower($format)) {
Please login to merge, or discard this patch.
class/PersistableObjectHandler.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -150,18 +150,18 @@  discard block
 block discarded – undo
150 150
 
151 151
         $this->_itemname      = $itemname;
152 152
         $this->_moduleName    = $modulename;
153
-        $this->table          = $db->prefix($modulename . '_' . $itemname);
153
+        $this->table          = $db->prefix($modulename.'_'.$itemname);
154 154
         $this->keyName        = $keyname;
155 155
 //        $this->className      = ucfirst($modulename) . ucfirst($itemname);
156 156
         $this->className      = $itemname;
157 157
 
158 158
         $this->identifierName = $idenfierName;
159 159
         $this->summaryName    = $summaryName;
160
-        $this->_page          = $itemname . '.php';
161
-        $this->_modulePath    = XOOPS_ROOT_PATH . '/modules/' . $this->_moduleName . '/';
162
-        $this->_moduleUrl     = XOOPS_URL . '/modules/' . $this->_moduleName . '/';
163
-        $this->_uploadPath    = XOOPS_UPLOAD_PATH . '/' . $this->_moduleName . '/';
164
-        $this->_uploadUrl     = XOOPS_UPLOAD_URL . '/' . $this->_moduleName . '/';
160
+        $this->_page          = $itemname.'.php';
161
+        $this->_modulePath    = XOOPS_ROOT_PATH.'/modules/'.$this->_moduleName.'/';
162
+        $this->_moduleUrl     = XOOPS_URL.'/modules/'.$this->_moduleName.'/';
163
+        $this->_uploadPath    = XOOPS_UPLOAD_PATH.'/'.$this->_moduleName.'/';
164
+        $this->_uploadUrl     = XOOPS_UPLOAD_URL.'/'.$this->_moduleName.'/';
165 165
     }
166 166
 
167 167
     /**
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         $smartPermissionsHandler = new PermissionHandler($this);
204 204
         $grantedItems            = $smartPermissionsHandler->getGrantedItems($perm_name);
205 205
         if (count($grantedItems) > 0) {
206
-            $criteria->add(new \Criteria($this->keyName, '(' . implode(', ', $grantedItems) . ')', 'IN'));
206
+            $criteria->add(new \Criteria($this->keyName, '('.implode(', ', $grantedItems).')', 'IN'));
207 207
 
208 208
             return true;
209 209
         } else {
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     {
244 244
 //        $obj0 = new $this->className($this);
245 245
 
246
-        $obj =  new $this->className;
246
+        $obj = new $this->className;
247 247
 
248 248
         $obj->setImageDir($this->getImageUrl(), $this->getImagePath());
249 249
         if (!$obj->handler) {
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      */
263 263
     public function getImageUrl()
264 264
     {
265
-        return $this->_uploadUrl . $this->_itemname . '/';
265
+        return $this->_uploadUrl.$this->_itemname.'/';
266 266
     }
267 267
 
268 268
     /**
@@ -270,12 +270,12 @@  discard block
 block discarded – undo
270 270
      */
271 271
     public function getImagePath()
272 272
     {
273
-        $dir = $this->_uploadPath . $this->_itemname;
273
+        $dir = $this->_uploadPath.$this->_itemname;
274 274
         if (!file_exists($dir)) {
275 275
             Smartobject\Utility::mkdirAsAdmin($dir);
276 276
         }
277 277
 
278
-        return $dir . '/';
278
+        return $dir.'/';
279 279
     }
280 280
 
281 281
     /**
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         if ($debug) {
315 315
             $obj_array = $this->getObjectsD($criteria, false, $as_object);
316 316
         } else {
317
-            $obj_array =& $this->getObjects($criteria, false, $as_object);
317
+            $obj_array = & $this->getObjects($criteria, false, $as_object);
318 318
             //patch: weird bug of indexing by id even if id_as_key = false;
319 319
             if (!isset($obj_array[0]) && is_object($obj_array[$id])) {
320 320
                 $obj_array[0] = $obj_array[$id];
@@ -368,13 +368,13 @@  discard block
 block discarded – undo
368 368
         if ($this->generalSQL) {
369 369
             $sql = $this->generalSQL;
370 370
         } elseif (!$sql) {
371
-            $sql = 'SELECT * FROM ' . $this->table . ' AS ' . $this->_itemname;
371
+            $sql = 'SELECT * FROM '.$this->table.' AS '.$this->_itemname;
372 372
         }
373 373
 
374 374
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
375
-            $sql .= ' ' . $criteria->renderWhere();
375
+            $sql .= ' '.$criteria->renderWhere();
376 376
             if ('' !== $criteria->getSort()) {
377
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
377
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
378 378
             }
379 379
             $limit = $criteria->getLimit();
380 380
             $start = $criteria->getStart();
@@ -403,12 +403,12 @@  discard block
 block discarded – undo
403 403
         $ret = [];
404 404
 
405 405
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
406
-            $sql .= ' ' . $criteria->renderWhere();
406
+            $sql .= ' '.$criteria->renderWhere();
407 407
             if ($criteria->groupby) {
408 408
                 $sql .= $criteria->getGroupby();
409 409
             }
410 410
             if ('' !== $criteria->getSort()) {
411
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
411
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
412 412
             }
413 413
         }
414 414
         if ($debug) {
@@ -481,18 +481,18 @@  discard block
 block discarded – undo
481 481
             $obj->assignVars($myrow);
482 482
             if (!$id_as_key) {
483 483
                 if ($as_object) {
484
-                    $ret[] =& $obj;
484
+                    $ret[] = & $obj;
485 485
                 } else {
486 486
                     $ret[] = $obj->toArray();
487 487
                 }
488 488
             } else {
489 489
                 if ($as_object) {
490
-                    $value =& $obj;
490
+                    $value = & $obj;
491 491
                 } else {
492 492
                     $value = $obj->toArray();
493 493
                 }
494 494
                 if ('parentid' === $id_as_key) {
495
-                    $ret[$obj->getVar('parentid', 'e')][$obj->getVar($this->keyName)] =& $value;
495
+                    $ret[$obj->getVar('parentid', 'e')][$obj->getVar($this->keyName)] = & $value;
496 496
                 } else {
497 497
                     $ret[$obj->getVar($this->keyName)] = $value;
498 498
                 }
@@ -535,15 +535,15 @@  discard block
 block discarded – undo
535 535
             $criteria->setSort($this->getIdentifierName());
536 536
         }
537 537
 
538
-        $sql = 'SELECT ' . (is_array($this->keyName) ? implode(', ', $this->keyName) : $this->keyName);
538
+        $sql = 'SELECT '.(is_array($this->keyName) ? implode(', ', $this->keyName) : $this->keyName);
539 539
         if (!empty($this->identifierName)) {
540
-            $sql .= ', ' . $this->getIdentifierName();
540
+            $sql .= ', '.$this->getIdentifierName();
541 541
         }
542
-        $sql .= ' FROM ' . $this->table . ' AS ' . $this->_itemname;
542
+        $sql .= ' FROM '.$this->table.' AS '.$this->_itemname;
543 543
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
544
-            $sql .= ' ' . $criteria->renderWhere();
544
+            $sql .= ' '.$criteria->renderWhere();
545 545
             if ('' !== $criteria->getSort()) {
546
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
546
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
547 547
             }
548 548
             $limit = $criteria->getLimit();
549 549
             $start = $criteria->getStart();
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
581 581
             if ('' !== $criteria->groupby) {
582 582
                 $groupby = true;
583
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
583
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
584 584
             }
585 585
         }
586 586
         /**
@@ -591,10 +591,10 @@  discard block
 block discarded – undo
591 591
             $sql = $this->generalSQL;
592 592
             $sql = str_replace('SELECT *', 'SELECT COUNT(*)', $sql);
593 593
         } else {
594
-            $sql = 'SELECT ' . $field . 'COUNT(*) FROM ' . $this->table . ' AS ' . $this->_itemname;
594
+            $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table.' AS '.$this->_itemname;
595 595
         }
596 596
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
597
-            $sql .= ' ' . $criteria->renderWhere();
597
+            $sql .= ' '.$criteria->renderWhere();
598 598
             if ('' !== $criteria->groupby) {
599 599
                 $sql .= $criteria->getGroupby();
600 600
             }
@@ -637,13 +637,13 @@  discard block
 block discarded – undo
637 637
         if (is_array($this->keyName)) {
638 638
             $clause = [];
639 639
             for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) {
640
-                $clause[] = $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]);
640
+                $clause[] = $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]);
641 641
             }
642 642
             $whereclause = implode(' AND ', $clause);
643 643
         } else {
644
-            $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName);
644
+            $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName);
645 645
         }
646
-        $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause;
646
+        $sql = 'DELETE FROM '.$this->table.' WHERE '.$whereclause;
647 647
         if (false !== $force) {
648 648
             $result = $this->db->queryF($sql);
649 649
         } else {
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
              * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
705 705
              */
706 706
             if (!is_a($obj, $this->className)) {
707
-                $obj->setError(get_class($obj) . ' Differs from ' . $this->className);
707
+                $obj->setError(get_class($obj).' Differs from '.$this->className);
708 708
 
709 709
                 return false;
710 710
             }
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
         $fieldsToStoreInDB = [];
766 766
         foreach ($obj->cleanVars as $k => $v) {
767 767
             if (XOBJ_DTYPE_INT == $obj->vars[$k]['data_type']) {
768
-                $cleanvars[$k] = (int)$v;
768
+                $cleanvars[$k] = (int) $v;
769 769
             } elseif (is_array($v)) {
770 770
                 $cleanvars[$k] = $this->db->quoteString(implode(',', $v));
771 771
             } else {
@@ -778,13 +778,13 @@  discard block
 block discarded – undo
778 778
         if ($obj->isNew()) {
779 779
             if (!is_array($this->keyName)) {
780 780
                 if ($cleanvars[$this->keyName] < 1) {
781
-                    $cleanvars[$this->keyName] = $this->db->genId($this->table . '_' . $this->keyName . '_seq');
781
+                    $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq');
782 782
                 }
783 783
             }
784 784
 
785
-            $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', array_keys($fieldsToStoreInDB)) . ') VALUES (' . implode(',', array_values($fieldsToStoreInDB)) . ')';
785
+            $sql = 'INSERT INTO '.$this->table.' ('.implode(',', array_keys($fieldsToStoreInDB)).') VALUES ('.implode(',', array_values($fieldsToStoreInDB)).')';
786 786
         } else {
787
-            $sql = 'UPDATE ' . $this->table . ' SET';
787
+            $sql = 'UPDATE '.$this->table.' SET';
788 788
             foreach ($fieldsToStoreInDB as $key => $value) {
789 789
                 if ((!is_array($this->keyName) && $key == $this->keyName)
790 790
                     || (is_array($this->keyName)
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
                 if (isset($notfirst)) {
795 795
                     $sql .= ',';
796 796
                 }
797
-                $sql      .= ' ' . $key . ' = ' . $value;
797
+                $sql .= ' '.$key.' = '.$value;
798 798
                 $notfirst = true;
799 799
             }
800 800
             if (is_array($this->keyName)) {
@@ -803,12 +803,12 @@  discard block
 block discarded – undo
803 803
                     if ($i > 0) {
804 804
                         $whereclause .= ' AND ';
805 805
                     }
806
-                    $whereclause .= $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]);
806
+                    $whereclause .= $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]);
807 807
                 }
808 808
             } else {
809
-                $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName);
809
+                $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName);
810 810
             }
811
-            $sql .= ' WHERE ' . $whereclause;
811
+            $sql .= ' WHERE '.$whereclause;
812 812
         }
813 813
 
814 814
         if ($debug) {
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
      */
882 882
     public function updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = null, $force = false)
883 883
     {
884
-        $set_clause = $fieldname . ' = ';
884
+        $set_clause = $fieldname.' = ';
885 885
         if (is_numeric($fieldvalue)) {
886 886
             $set_clause .= $fieldvalue;
887 887
         } elseif (is_array($fieldvalue)) {
@@ -889,9 +889,9 @@  discard block
 block discarded – undo
889 889
         } else {
890 890
             $set_clause .= $this->db->quoteString($fieldvalue);
891 891
         }
892
-        $sql = 'UPDATE ' . $this->table . ' SET ' . $set_clause;
892
+        $sql = 'UPDATE '.$this->table.' SET '.$set_clause;
893 893
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
894
-            $sql .= ' ' . $criteria->renderWhere();
894
+            $sql .= ' '.$criteria->renderWhere();
895 895
         }
896 896
         if (false !== $force) {
897 897
             $result = $this->db->queryF($sql);
@@ -915,8 +915,8 @@  discard block
 block discarded – undo
915 915
     public function deleteAll(CriteriaElement $criteria = null)
916 916
     {
917 917
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
918
-            $sql = 'DELETE FROM ' . $this->table;
919
-            $sql .= ' ' . $criteria->renderWhere();
918
+            $sql = 'DELETE FROM '.$this->table;
919
+            $sql .= ' '.$criteria->renderWhere();
920 920
             if (!$this->db->query($sql)) {
921 921
                 return false;
922 922
             }
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
      */
950 950
     public function getModuleItemString()
951 951
     {
952
-        $ret = $this->_moduleName . '_' . $this->_itemname;
952
+        $ret = $this->_moduleName.'_'.$this->_itemname;
953 953
 
954 954
         return $ret;
955 955
     }
@@ -961,7 +961,7 @@  discard block
 block discarded – undo
961 961
     {
962 962
         if (isset($object->vars['counter'])) {
963 963
             $new_counter = $object->getVar('counter') + 1;
964
-            $sql         = 'UPDATE ' . $this->table . ' SET counter=' . $new_counter . ' WHERE ' . $this->keyName . '=' . $object->id();
964
+            $sql         = 'UPDATE '.$this->table.' SET counter='.$new_counter.' WHERE '.$this->keyName.'='.$object->id();
965 965
             $this->query($sql, null, true);
966 966
         }
967 967
     }
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
     public function getIdentifierName($withprefix = true)
1006 1006
     {
1007 1007
         if ($withprefix) {
1008
-            return $this->_itemname . '.' . $this->identifierName;
1008
+            return $this->_itemname.'.'.$this->identifierName;
1009 1009
         } else {
1010 1010
             return $this->identifierName;
1011 1011
         }
Please login to merge, or discard this patch.
class/Category.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         global $myts;
98 98
         $objectArray = parent::toArray();
99 99
         if ($objectArray['image']) {
100
-            $objectArray['image'] = $this->getImageDir() . $objectArray['image'];
100
+            $objectArray['image'] = $this->getImageDir().$objectArray['image'];
101 101
         }
102 102
 
103 103
         return $objectArray;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                     exit;
131 131
                 }
132 132
                 $parentid = $parentObj->getVar('parentid');
133
-                $ret      = $parentObj->getCategoryPath($withAllLink, $currentCategory) . ' > ' . $ret;
133
+                $ret      = $parentObj->getCategoryPath($withAllLink, $currentCategory).' > '.$ret;
134 134
             }
135 135
             $this->_categoryPath = $ret;
136 136
         }
Please login to merge, or discard this patch.
class/RatingHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function __construct(\XoopsDatabase $db)
43 43
     {
44 44
         parent::__construct($db, Rating::class, 'ratingid', 'rate', '', 'smartobject');
45
-        $this->generalSQL = 'SELECT * FROM ' . $this->table . ' AS ' . $this->_itemname . ' INNER JOIN ' . $this->db->prefix('users') . ' AS user ON ' . $this->_itemname . '.uid=user.uid';
45
+        $this->generalSQL = 'SELECT * FROM '.$this->table.' AS '.$this->_itemname.' INNER JOIN '.$this->db->prefix('users').' AS user ON '.$this->_itemname.'.uid=user.uid';
46 46
 
47 47
         $this->_rateOptions[1] = 1;
48 48
         $this->_rateOptions[2] = 2;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function getRatingAverageByItemId($itemid, $dirname, $item)
87 87
     {
88
-        $sql    = 'SELECT AVG(rate), COUNT(ratingid) FROM ' . $this->table . " WHERE itemid=$itemid AND dirname='$dirname' AND item='$item' GROUP BY itemid";
88
+        $sql    = 'SELECT AVG(rate), COUNT(ratingid) FROM '.$this->table." WHERE itemid=$itemid AND dirname='$dirname' AND item='$item' GROUP BY itemid";
89 89
         $result = $this->db->query($sql);
90 90
         if (!$result) {
91 91
             return 0;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $criteria->add(new \Criteria('dirname', $dirname));
113 113
         $criteria->add(new \Criteria('user.uid', $uid));
114 114
 
115
-        $ret =& $this->getObjects($criteria);
115
+        $ret = & $this->getObjects($criteria);
116 116
 
117 117
         if (!$ret) {
118 118
             return false;
Please login to merge, or discard this patch.
class/PluginHandler.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function getPlugin($dirname)
37 37
     {
38
-        $pluginName = SMARTOBJECT_ROOT_PATH . 'plugins/' . $dirname . '.php';
38
+        $pluginName = SMARTOBJECT_ROOT_PATH.'plugins/'.$dirname.'.php';
39 39
         if (file_exists($pluginName)) {
40 40
             require_once $pluginName;
41
-            $function = 'smartobject_plugin_' . $dirname;
41
+            $function = 'smartobject_plugin_'.$dirname;
42 42
             if (function_exists($function)) {
43 43
                 $array = $function();
44 44
                 $ret   = new Plugin($array);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function getPluginsArray()
57 57
     {
58
-        require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
58
+        require_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
59 59
 
60 60
         $moduleHandler = xoops_getHandler('module');
61 61
         $criteria      = new \CriteriaCompo();
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
             $modulesObj[$moduleObj->getVar('dirname')] = $moduleObj;
67 67
         }
68 68
 
69
-        $aFiles = XoopsLists::getFileListAsArray(SMARTOBJECT_ROOT_PATH . 'plugins/');
69
+        $aFiles = XoopsLists::getFileListAsArray(SMARTOBJECT_ROOT_PATH.'plugins/');
70 70
         $ret    = [];
71 71
         foreach ($aFiles as $file) {
72 72
             if ('.php' === substr($file, strlen($file) - 4, 4)) {
73 73
                 $pluginName                = str_replace('.php', '', $file);
74
-                $module_xoops_version_file = XOOPS_ROOT_PATH . "/modules/$pluginName/xoops_version.php";
74
+                $module_xoops_version_file = XOOPS_ROOT_PATH."/modules/$pluginName/xoops_version.php";
75 75
                 if (file_exists($module_xoops_version_file) && isset($modulesObj[$pluginName])) {
76 76
                     $ret[$pluginName] = $modulesObj[$pluginName]->getVar('name');
77 77
                 }
Please login to merge, or discard this patch.
class/ObjectController.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
         foreach (array_keys($smartObj->vars) as $key) {
53 53
             switch ($smartObj->vars[$key]['data_type']) {
54 54
                 case XOBJ_DTYPE_IMAGE:
55
-                    if (isset($_POST['url_' . $key]) && '' !== $_POST['url_' . $key]) {
56
-                        $oldFile = $smartObj->getUploadDir(true) . $smartObj->getVar($key, 'e');
57
-                        $smartObj->setVar($key, $_POST['url_' . $key]);
55
+                    if (isset($_POST['url_'.$key]) && '' !== $_POST['url_'.$key]) {
56
+                        $oldFile = $smartObj->getUploadDir(true).$smartObj->getVar($key, 'e');
57
+                        $smartObj->setVar($key, $_POST['url_'.$key]);
58 58
                         if (file_exists($oldFile)) {
59 59
                             unlink($oldFile);
60 60
                         }
61 61
                     }
62
-                    if (isset($_POST['delete_' . $key]) && '1' == $_POST['delete_' . $key]) {
63
-                        $oldFile = $smartObj->getUploadDir(true) . $smartObj->getVar($key, 'e');
62
+                    if (isset($_POST['delete_'.$key]) && '1' == $_POST['delete_'.$key]) {
63
+                        $oldFile = $smartObj->getUploadDir(true).$smartObj->getVar($key, 'e');
64 64
                         $smartObj->setVar($key, '');
65 65
                         if (file_exists($oldFile)) {
66 66
                             unlink($oldFile);
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
 
71 71
                 case XOBJ_DTYPE_URLLINK:
72 72
                     $linkObj = $smartObj->getUrlLinkObj($key);
73
-                    $linkObj->setVar('caption', $_POST['caption_' . $key]);
74
-                    $linkObj->setVar('description', $_POST['desc_' . $key]);
75
-                    $linkObj->setVar('target', $_POST['target_' . $key]);
76
-                    $linkObj->setVar('url', $_POST['url_' . $key]);
73
+                    $linkObj->setVar('caption', $_POST['caption_'.$key]);
74
+                    $linkObj->setVar('description', $_POST['desc_'.$key]);
75
+                    $linkObj->setVar('target', $_POST['target_'.$key]);
76
+                    $linkObj->setVar('url', $_POST['url_'.$key]);
77 77
                     if ('' !== $linkObj->getVar('url')) {
78 78
                         $smartObj->storeUrlLinkObj($linkObj);
79 79
                     }
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
                     break;
83 83
 
84 84
                 case XOBJ_DTYPE_FILE:
85
-                    if (!isset($_FILES['upload_' . $key]['name']) || '' === $_FILES['upload_' . $key]['name']) {
85
+                    if (!isset($_FILES['upload_'.$key]['name']) || '' === $_FILES['upload_'.$key]['name']) {
86 86
                         $fileObj = $smartObj->getFileObj($key);
87
-                        $fileObj->setVar('caption', $_POST['caption_' . $key]);
88
-                        $fileObj->setVar('description', $_POST['desc_' . $key]);
89
-                        $fileObj->setVar('url', $_POST['url_' . $key]);
87
+                        $fileObj->setVar('caption', $_POST['caption_'.$key]);
88
+                        $fileObj->setVar('description', $_POST['desc_'.$key]);
89
+                        $fileObj->setVar('url', $_POST['url_'.$key]);
90 90
                         if (!('' === $fileObj->getVar('url') && '' === $fileObj->getVar('url')
91 91
                               && '' === $fileObj->getVar('url'))) {
92 92
                             $res = $smartObj->storeFileObj($fileObj);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                         $value = strtotime($_POST[$key]);
111 111
                         //if strtotime returns false, the value is already a time stamp
112 112
                         if (!$value) {
113
-                            $value = (int)$_POST[$key];
113
+                            $value = (int) $_POST[$key];
114 114
                         }
115 115
                     }
116 116
                     $smartObj->setVar($key, $value);
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                 if (isset($file_array['name']) && '' !== $file_array['name']
160 160
                     && in_array(str_replace('upload_', '', $name), array_keys($smartObj->vars))) {
161 161
                     if ($uploaderObj->fetchMedia($name)) {
162
-                        $uploaderObj->setTargetFileName(time() . '_' . $uploaderObj->getMediaName());
162
+                        $uploaderObj->setTargetFileName(time().'_'.$uploaderObj->getMediaName());
163 163
                         if ($uploaderObj->upload()) {
164 164
                             // Find the related field in the SmartObject
165 165
                             $related_field   = str_replace('upload_', '', $name);
@@ -168,14 +168,14 @@  discard block
 block discarded – undo
168 168
                             if (XOBJ_DTYPE_FILE === $smartObj->vars[$related_field]['data_type']) {
169 169
                                 $object_fileurl = $smartObj->getUploadDir();
170 170
                                 $fileObj        = $smartObj->getFileObj($related_field);
171
-                                $fileObj->setVar('url', $object_fileurl . $uploaderObj->getSavedFileName());
172
-                                $fileObj->setVar('caption', $_POST['caption_' . $related_field]);
173
-                                $fileObj->setVar('description', $_POST['desc_' . $related_field]);
171
+                                $fileObj->setVar('url', $object_fileurl.$uploaderObj->getSavedFileName());
172
+                                $fileObj->setVar('caption', $_POST['caption_'.$related_field]);
173
+                                $fileObj->setVar('description', $_POST['desc_'.$related_field]);
174 174
                                 $smartObj->storeFileObj($fileObj);
175 175
                                 //todo: catch errors
176 176
                                 $smartObj->setVar($related_field, $fileObj->getVar('fileid'));
177 177
                             } else {
178
-                                $old_file = $smartObj->getUploadDir(true) . $smartObj->getVar($related_field);
178
+                                $old_file = $smartObj->getUploadDir(true).$smartObj->getVar($related_field);
179 179
                                 unlink($old_file);
180 180
                                 $smartObj->setVar($related_field, $uploaderObj->getSavedFileName());
181 181
                             }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             return $smartObj;
207 207
         } else {
208 208
             if (!$storeResult) {
209
-                redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $smartObj->getHtmlErrors());
209
+                redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR.$smartObj->getHtmlErrors());
210 210
             }
211 211
 
212 212
             $redirect_page = $redirect_page ?: Smartobject\Utility::getPageBeforeForm();
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
         $debug = false,
236 236
         $x_param = false
237 237
     ) {
238
-        $objectid = isset($_POST[$this->handler->keyName]) ? (int)$_POST[$this->handler->keyName] : 0;
238
+        $objectid = isset($_POST[$this->handler->keyName]) ? (int) $_POST[$this->handler->keyName] : 0;
239 239
         if ($debug) {
240 240
             if ($x_param) {
241 241
                 $smartObj = $this->handler->getD($objectid, true, $x_param);
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
     {
312 312
         global $smart_previous_page;
313 313
 
314
-        $objectid = isset($_REQUEST[$this->handler->keyName]) ? (int)$_REQUEST[$this->handler->keyName] : 0;
314
+        $objectid = isset($_REQUEST[$this->handler->keyName]) ? (int) $_REQUEST[$this->handler->keyName] : 0;
315 315
         $smartObj = $this->handler->get($objectid);
316 316
 
317 317
         if ($smartObj->isNew()) {
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
         $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0;
322 322
         if ($confirm) {
323 323
             if (!$this->handler->delete($smartObj)) {
324
-                redirect_header($_POST['redirect_page'], 3, _CO_SOBJECT_DELETE_ERROR . $smartObj->getHtmlErrors());
324
+                redirect_header($_POST['redirect_page'], 3, _CO_SOBJECT_DELETE_ERROR.$smartObj->getHtmlErrors());
325 325
             }
326 326
 
327 327
             redirect_header($_POST['redirect_page'], 3, _CO_SOBJECT_DELETE_SUCCESS);
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
     {
355 355
         global $smart_previous_page, $xoopsTpl;
356 356
 
357
-        $objectid = isset($_REQUEST[$this->handler->keyName]) ? (int)$_REQUEST[$this->handler->keyName] : 0;
357
+        $objectid = isset($_REQUEST[$this->handler->keyName]) ? (int) $_REQUEST[$this->handler->keyName] : 0;
358 358
         $smartObj = $this->handler->get($objectid);
359 359
 
360 360
         if ($smartObj->isNew()) {
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0;
365 365
         if ($confirm) {
366 366
             if (!$this->handler->delete($smartObj)) {
367
-                redirect_header($_POST['redirect_page'], 3, _CO_SOBJECT_DELETE_ERROR . $smartObj->getHtmlErrors());
367
+                redirect_header($_POST['redirect_page'], 3, _CO_SOBJECT_DELETE_ERROR.$smartObj->getHtmlErrors());
368 368
             }
369 369
 
370 370
             redirect_header($_POST['redirect_page'], 3, _CO_SOBJECT_DELETE_SUCCESS);
@@ -396,14 +396,14 @@  discard block
 block discarded – undo
396 396
      */
397 397
     public function getAdminViewItemLink(SmartObject $smartObj, $onlyUrl = false, $withimage = false)
398 398
     {
399
-        $ret = $this->handler->_moduleUrl . 'admin/' . $this->handler->_page . '?op=view&' . $this->handler->keyName . '=' . $smartObj->getVar($this->handler->keyName);
399
+        $ret = $this->handler->_moduleUrl.'admin/'.$this->handler->_page.'?op=view&'.$this->handler->keyName.'='.$smartObj->getVar($this->handler->keyName);
400 400
         if ($onlyUrl) {
401 401
             return $ret;
402 402
         } elseif ($withimage) {
403
-            return "<a href='" . $ret . "'><img src='" . SMARTOBJECT_IMAGES_ACTIONS_URL . "viewmag.png' style='vertical-align: middle;' alt='" . _CO_SOBJECT_ADMIN_VIEW . "'  title='" . _CO_SOBJECT_ADMIN_VIEW . "'></a>";
403
+            return "<a href='".$ret."'><img src='".SMARTOBJECT_IMAGES_ACTIONS_URL."viewmag.png' style='vertical-align: middle;' alt='"._CO_SOBJECT_ADMIN_VIEW."'  title='"._CO_SOBJECT_ADMIN_VIEW."'></a>";
404 404
         }
405 405
 
406
-        return "<a href='" . $ret . "'>" . $smartObj->getVar($this->handler->identifierName) . '</a>';
406
+        return "<a href='".$ret."'>".$smartObj->getVar($this->handler->identifierName).'</a>';
407 407
     }
408 408
 
409 409
     /**
@@ -425,15 +425,15 @@  discard block
 block discarded – undo
425 425
         $seoIncludeId = true;
426 426
 
427 427
         if ('rewrite' === $seoMode) {
428
-            $ret = XOOPS_URL . '/' . $seoModuleName . '.' . $this->handler->_itemname . ($seoIncludeId ? '.' . $smartObj->getVar($this->handler->keyName) : '') . '/' . $smartObj->getVar('short_url') . '.html';
428
+            $ret = XOOPS_URL.'/'.$seoModuleName.'.'.$this->handler->_itemname.($seoIncludeId ? '.'.$smartObj->getVar($this->handler->keyName) : '').'/'.$smartObj->getVar('short_url').'.html';
429 429
         } elseif ('pathinfo' === $seoMode) {
430
-            $ret = SMARTOBJECT_URL . 'seo.php/' . $seoModuleName . '.' . $this->handler->_itemname . ($seoIncludeId ? '.' . $smartObj->getVar($this->handler->keyName) : '') . '/' . $smartObj->getVar('short_url') . '.html';
430
+            $ret = SMARTOBJECT_URL.'seo.php/'.$seoModuleName.'.'.$this->handler->_itemname.($seoIncludeId ? '.'.$smartObj->getVar($this->handler->keyName) : '').'/'.$smartObj->getVar('short_url').'.html';
431 431
         } else {
432
-            $ret = $this->handler->_moduleUrl . $this->handler->_page . '?' . $this->handler->keyName . '=' . $smartObj->getVar($this->handler->keyName);
432
+            $ret = $this->handler->_moduleUrl.$this->handler->_page.'?'.$this->handler->keyName.'='.$smartObj->getVar($this->handler->keyName);
433 433
         }
434 434
 
435 435
         if (!$onlyUrl) {
436
-            $ret = "<a href='" . $ret . "'>" . $smartObj->getVar($this->handler->identifierName) . '</a>';
436
+            $ret = "<a href='".$ret."'>".$smartObj->getVar($this->handler->identifierName).'</a>';
437 437
         }
438 438
 
439 439
         return $ret;
@@ -447,14 +447,14 @@  discard block
 block discarded – undo
447 447
      */
448 448
     public function getEditLanguageLink($smartObj, $onlyUrl = false, $withimage = true)
449 449
     {
450
-        $ret = $this->handler->_moduleUrl . 'admin/' . $this->handler->_page . '?op=mod&' . $this->handler->keyName . '=' . $smartObj->getVar($this->handler->keyName) . '&language=' . $smartObj->getVar('language');
450
+        $ret = $this->handler->_moduleUrl.'admin/'.$this->handler->_page.'?op=mod&'.$this->handler->keyName.'='.$smartObj->getVar($this->handler->keyName).'&language='.$smartObj->getVar('language');
451 451
         if ($onlyUrl) {
452 452
             return $ret;
453 453
         } elseif ($withimage) {
454
-            return "<a href='" . $ret . "'><img src='" . SMARTOBJECT_IMAGES_ACTIONS_URL . "wizard.png' style='vertical-align: middle;' alt='" . _CO_SOBJECT_LANGUAGE_MODIFY . "'  title='" . _CO_SOBJECT_LANGUAGE_MODIFY . "'></a>";
454
+            return "<a href='".$ret."'><img src='".SMARTOBJECT_IMAGES_ACTIONS_URL."wizard.png' style='vertical-align: middle;' alt='"._CO_SOBJECT_LANGUAGE_MODIFY."'  title='"._CO_SOBJECT_LANGUAGE_MODIFY."'></a>";
455 455
         }
456 456
 
457
-        return "<a href='" . $ret . "'>" . $smartObj->getVar($this->handler->identifierName) . '</a>';
457
+        return "<a href='".$ret."'>".$smartObj->getVar($this->handler->identifierName).'</a>';
458 458
     }
459 459
 
460 460
     /**
@@ -467,14 +467,14 @@  discard block
 block discarded – undo
467 467
     public function getEditItemLink($smartObj, $onlyUrl = false, $withimage = true, $userSide = false)
468 468
     {
469 469
         $admin_side = $userSide ? '' : 'admin/';
470
-        $ret        = $this->handler->_moduleUrl . $admin_side . $this->handler->_page . '?op=mod&' . $this->handler->keyName . '=' . $smartObj->getVar($this->handler->keyName);
470
+        $ret        = $this->handler->_moduleUrl.$admin_side.$this->handler->_page.'?op=mod&'.$this->handler->keyName.'='.$smartObj->getVar($this->handler->keyName);
471 471
         if ($onlyUrl) {
472 472
             return $ret;
473 473
         } elseif ($withimage) {
474
-            return "<a href='" . $ret . "'><img src='" . SMARTOBJECT_IMAGES_ACTIONS_URL . "edit.png' style='vertical-align: middle;' alt='" . _CO_SOBJECT_MODIFY . "'  title='" . _CO_SOBJECT_MODIFY . "'></a>";
474
+            return "<a href='".$ret."'><img src='".SMARTOBJECT_IMAGES_ACTIONS_URL."edit.png' style='vertical-align: middle;' alt='"._CO_SOBJECT_MODIFY."'  title='"._CO_SOBJECT_MODIFY."'></a>";
475 475
         }
476 476
 
477
-        return "<a href='" . $ret . "'>" . $smartObj->getVar($this->handler->identifierName) . '</a>';
477
+        return "<a href='".$ret."'>".$smartObj->getVar($this->handler->identifierName).'</a>';
478 478
     }
479 479
 
480 480
     /**
@@ -487,14 +487,14 @@  discard block
 block discarded – undo
487 487
     public function getDeleteItemLink($smartObj, $onlyUrl = false, $withimage = true, $userSide = false)
488 488
     {
489 489
         $admin_side = $userSide ? '' : 'admin/';
490
-        $ret        = $this->handler->_moduleUrl . $admin_side . $this->handler->_page . '?op=del&' . $this->handler->keyName . '=' . $smartObj->getVar($this->handler->keyName);
490
+        $ret        = $this->handler->_moduleUrl.$admin_side.$this->handler->_page.'?op=del&'.$this->handler->keyName.'='.$smartObj->getVar($this->handler->keyName);
491 491
         if ($onlyUrl) {
492 492
             return $ret;
493 493
         } elseif ($withimage) {
494
-            return "<a href='" . $ret . "'><img src='" . SMARTOBJECT_IMAGES_ACTIONS_URL . "editdelete.png' style='vertical-align: middle;' alt='" . _CO_SOBJECT_DELETE . "'  title='" . _CO_SOBJECT_DELETE . "'></a>";
494
+            return "<a href='".$ret."'><img src='".SMARTOBJECT_IMAGES_ACTIONS_URL."editdelete.png' style='vertical-align: middle;' alt='"._CO_SOBJECT_DELETE."'  title='"._CO_SOBJECT_DELETE."'></a>";
495 495
         }
496 496
 
497
-        return "<a href='" . $ret . "'>" . $smartObj->getVar($this->handler->identifierName) . '</a>';
497
+        return "<a href='".$ret."'>".$smartObj->getVar($this->handler->identifierName).'</a>';
498 498
     }
499 499
 
500 500
     /**
@@ -505,9 +505,9 @@  discard block
 block discarded – undo
505 505
     {
506 506
         global $xoopsConfig;
507 507
 
508
-        $printlink = $this->handler->_moduleUrl . 'print.php?' . $this->handler->keyName . '=' . $smartObj->getVar($this->handler->keyName);
509
-        $js        = "javascript:openWithSelfMain('" . $printlink . "', 'smartpopup', 700, 519);";
510
-        $printlink = '<a href="' . $js . '"><img  src="' . SMARTOBJECT_IMAGES_ACTIONS_URL . 'fileprint.png" alt="" style="vertical-align: middle;"></a>';
508
+        $printlink = $this->handler->_moduleUrl.'print.php?'.$this->handler->keyName.'='.$smartObj->getVar($this->handler->keyName);
509
+        $js        = "javascript:openWithSelfMain('".$printlink."', 'smartpopup', 700, 519);";
510
+        $printlink = '<a href="'.$js.'"><img  src="'.SMARTOBJECT_IMAGES_ACTIONS_URL.'fileprint.png" alt="" style="vertical-align: middle;"></a>';
511 511
 
512 512
         $smartModule = Smartobject\Utility::getModuleInfo($smartObj->handler->_moduleName);
513 513
         $link        = Smartobject\Utility::getCurrentPage();
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
                        . _CO_SOBJECT_EMAIL
527 527
                        . '" style="vertical-align: middle;"></a>';
528 528
 
529
-        $ret = '<span id="smartobject_print_button">' . $printlink . '&nbsp;</span>' . '<span id="smartobject_mail_button">' . $friendlink . '</span>';
529
+        $ret = '<span id="smartobject_print_button">'.$printlink.'&nbsp;</span>'.'<span id="smartobject_mail_button">'.$friendlink.'</span>';
530 530
 
531 531
         return $ret;
532 532
     }
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
      */
537 537
     public function getModuleItemString()
538 538
     {
539
-        $ret = $this->handler->_moduleName . '_' . $this->handler->_itemname;
539
+        $ret = $this->handler->_moduleName.'_'.$this->handler->_itemname;
540 540
 
541 541
         return $ret;
542 542
     }
Please login to merge, or discard this patch.