Completed
Push — master ( 8e5652...4e30dc )
by Michael
02:28
created
language/english/common.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -21,51 +21,51 @@
 block discarded – undo
21 21
 $moduleDirName      = basename(dirname(dirname(__DIR__)));
22 22
 $moduleDirNameUpper = strtoupper($moduleDirName);
23 23
 
24
-define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: ');
25
-define('CO_' . $moduleDirNameUpper . '_GDLIBVERSION', 'GD Library version: ');
26
-define('CO_' . $moduleDirNameUpper . '_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
27
-define('CO_' . $moduleDirNameUpper . '_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
28
-define('CO_' . $moduleDirNameUpper . '_IMAGEINFO', 'Server status');
29
-define('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
30
-define('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
31
-define('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
32
-define('CO_' . $moduleDirNameUpper . '_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
33
-define('CO_' . $moduleDirNameUpper . '_OFF', "<span style='font-weight: bold;'>OFF</span>");
34
-define('CO_' . $moduleDirNameUpper . '_ON', "<span style='font-weight: bold;'>ON</span>");
35
-define('CO_' . $moduleDirNameUpper . '_SERVERPATH', 'Server path to XOOPS root: ');
36
-define('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS', 'Server uploads status: ');
37
-define('CO_' . $moduleDirNameUpper . '_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
38
-define('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
24
+define('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS', 'GD library support: ');
25
+define('CO_'.$moduleDirNameUpper.'_GDLIBVERSION', 'GD Library version: ');
26
+define('CO_'.$moduleDirNameUpper.'_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
27
+define('CO_'.$moduleDirNameUpper.'_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
28
+define('CO_'.$moduleDirNameUpper.'_IMAGEINFO', 'Server status');
29
+define('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
30
+define('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
31
+define('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
32
+define('CO_'.$moduleDirNameUpper.'_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
33
+define('CO_'.$moduleDirNameUpper.'_OFF', "<span style='font-weight: bold;'>OFF</span>");
34
+define('CO_'.$moduleDirNameUpper.'_ON', "<span style='font-weight: bold;'>ON</span>");
35
+define('CO_'.$moduleDirNameUpper.'_SERVERPATH', 'Server path to XOOPS root: ');
36
+define('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS', 'Server uploads status: ');
37
+define('CO_'.$moduleDirNameUpper.'_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
38
+define('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
39 39
 
40
-define('CO_' . $moduleDirNameUpper . '_PRINT', "<span style='font-weight: bold;'>Print</span>");
41
-define('CO_' . $moduleDirNameUpper . '_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
40
+define('CO_'.$moduleDirNameUpper.'_PRINT', "<span style='font-weight: bold;'>Print</span>");
41
+define('CO_'.$moduleDirNameUpper.'_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
42 42
 
43 43
 
44
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
45
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED1', "Update failed - couldn't add new fields");
46
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
47
-define('CO_' . $moduleDirNameUpper . '_ERROR_COLUMN', 'Could not create column in database : %s');
48
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
49
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
50
-define('CO_' . $moduleDirNameUpper . '_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
44
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
45
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED1', "Update failed - couldn't add new fields");
46
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
47
+define('CO_'.$moduleDirNameUpper.'_ERROR_COLUMN', 'Could not create column in database : %s');
48
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
49
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
50
+define('CO_'.$moduleDirNameUpper.'_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
51 51
 
52
-define('CO_' . $moduleDirNameUpper . '_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
52
+define('CO_'.$moduleDirNameUpper.'_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
53 53
 
54 54
 // Error Msgs
55
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
56
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_REMOVE', 'Could not delete %s');
57
-define('CO_' . $moduleDirNameUpper . '_ERROR_NO_PLUGIN', 'Could not load plugin');
55
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
56
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_REMOVE', 'Could not delete %s');
57
+define('CO_'.$moduleDirNameUpper.'_ERROR_NO_PLUGIN', 'Could not load plugin');
58 58
 
59 59
 
60 60
 //Help
61
-define('CO_' . $moduleDirNameUpper . '_DIRNAME', basename(dirname(dirname(__DIR__))));
62
-define('CO_' . $moduleDirNameUpper . '_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
63
-define('CO_' . $moduleDirNameUpper . '_BACK_2_ADMIN', 'Back to Administration of ');
64
-define('CO_' . $moduleDirNameUpper . '_OVERVIEW', 'Overview');
61
+define('CO_'.$moduleDirNameUpper.'_DIRNAME', basename(dirname(dirname(__DIR__))));
62
+define('CO_'.$moduleDirNameUpper.'_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
63
+define('CO_'.$moduleDirNameUpper.'_BACK_2_ADMIN', 'Back to Administration of ');
64
+define('CO_'.$moduleDirNameUpper.'_OVERVIEW', 'Overview');
65 65
 
66 66
 //define('CO_' . $moduleDirNameUpper . '_HELP_DIR', __DIR__);
67 67
 
68 68
 //help multi-page
69
-define('CO_' . $moduleDirNameUpper . '_DISCLAIMER', 'Disclaimer');
70
-define('CO_' . $moduleDirNameUpper . '_LICENSE', 'License');
71
-define('CO_' . $moduleDirNameUpper . '_SUPPORT', 'Support');
69
+define('CO_'.$moduleDirNameUpper.'_DISCLAIMER', 'Disclaimer');
70
+define('CO_'.$moduleDirNameUpper.'_LICENSE', 'License');
71
+define('CO_'.$moduleDirNameUpper.'_SUPPORT', 'Support');
Please login to merge, or discard this patch.
print.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@  discard block
 block discarded – undo
8 8
 
9 9
 use XoopsModules\Smartfaq;
10 10
 
11
-require_once __DIR__ . '/header.php';
11
+require_once __DIR__.'/header.php';
12 12
 
13
-$faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0;
13
+$faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : 0;
14 14
 
15 15
 if (0 == $faqid) {
16 16
     redirect_header('javascript:history.go(-1)', 1, _MD_SF_NOFAQSELECTED);
@@ -46,23 +46,23 @@  discard block
 block discarded – undo
46 46
 
47 47
 echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n";
48 48
 echo "<html>\n<head>\n";
49
-echo '<title>' . _MD_SF_FAQCOMEFROM . ' ' . $xoopsConfig['sitename'] . "</title>\n";
50
-echo "<meta http-equiv='Content-Type' content='text/html; charset=" . _CHARSET . "'>\n";
51
-echo "<meta name='AUTHOR' content='" . $xoopsConfig['sitename'] . "'>\n";
52
-echo "<meta name='COPYRIGHT' content='Copyright (c) 2001 by " . $xoopsConfig['sitename'] . "'>\n";
53
-echo "<meta name='DESCRIPTION' content='" . $xoopsConfig['slogan'] . "'>\n";
54
-echo "<meta name='GENERATOR' content='" . XOOPS_VERSION . "'>\n\n\n";
49
+echo '<title>'._MD_SF_FAQCOMEFROM.' '.$xoopsConfig['sitename']."</title>\n";
50
+echo "<meta http-equiv='Content-Type' content='text/html; charset="._CHARSET."'>\n";
51
+echo "<meta name='AUTHOR' content='".$xoopsConfig['sitename']."'>\n";
52
+echo "<meta name='COPYRIGHT' content='Copyright (c) 2001 by ".$xoopsConfig['sitename']."'>\n";
53
+echo "<meta name='DESCRIPTION' content='".$xoopsConfig['slogan']."'>\n";
54
+echo "<meta name='GENERATOR' content='".XOOPS_VERSION."'>\n\n\n";
55 55
 
56 56
 echo "<body bgcolor='#ffffff' text='#000000' onload='window.print()'>
57 57
      <div style='width: 650px; border: 1px solid #000; padding: 20px;'>
58
-     <div style='text-align: center; display: block; margin: 0 0 6px 0;'><img src='" . XOOPS_URL . "/modules/smartfaq/assets/images/logo_module.png' border='0' alt=''><h2 style='margin: 0;'>" . $faqObj->question() . "</h2></div>
59
-     <div align='center'>" . $who_where . "</div>
58
+     <div style='text-align: center; display: block; margin: 0 0 6px 0;'><img src='" . XOOPS_URL."/modules/smartfaq/assets/images/logo_module.png' border='0' alt=''><h2 style='margin: 0;'>".$faqObj->question()."</h2></div>
59
+     <div align='center'>" . $who_where."</div>
60 60
                 <div style='text-align: center; display: block; padding-bottom: 12px; margin: 0 0 6px 0; border-bottom: 2px solid #ccc;'></div>
61 61
                 <div></div>
62
-                <b><p>" . $faqObj->question() . '</p></b>
63
-                <p>' . $answerObj->answer() . "</p>
62
+                <b><p>" . $faqObj->question().'</p></b>
63
+                <p>' . $answerObj->answer()."</p>
64 64
                 <div style='padding-top: 12px; border-top: 2px solid #ccc;'></div>
65
-                <p>" . $comeFrom . '</p>
65
+                <p>" . $comeFrom.'</p>
66 66
             </div>
67 67
     <br>';
68 68
 
Please login to merge, or discard this patch.
request.php 2 patches
Switch Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -49,94 +49,94 @@
 block discarded – undo
49 49
 }
50 50
 
51 51
 switch ($op) {
52
-    case 'post':
52
+        case 'post':
53 53
 
54
-        global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB;
54
+            global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB;
55 55
 
56
-        $newFaqObj = $faqHandler->create();
56
+            $newFaqObj = $faqHandler->create();
57 57
 
58
-        if (!$xoopsUser) {
59
-            if (1 == $xoopsModuleConfig['anonpost']) {
60
-                $uid = 0;
58
+            if (!$xoopsUser) {
59
+                if (1 == $xoopsModuleConfig['anonpost']) {
60
+                    $uid = 0;
61
+                } else {
62
+                    redirect_header('index.php', 3, _NOPERM);
63
+                }
61 64
             } else {
62
-                redirect_header('index.php', 3, _NOPERM);
65
+                $uid = $xoopsUser->uid();
63 66
             }
64
-        } else {
65
-            $uid = $xoopsUser->uid();
66
-        }
67
-
68
-        // Putting the values about the FAQ in the FAQ object
69
-        $newFaqObj->setVar('categoryid', $_POST['categoryid']);
70
-        $newFaqObj->setVar('uid', $uid);
71
-        $newFaqObj->setVar('question', $_POST['question']);
72
-        $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0;
73
-        $newFaqObj->setVar('notifypub', $notifypub);
74
-
75
-        // Setting the status of the FAQ
76
-        if (1 == $xoopsModuleConfig['autoapprove_request']) {
77
-            $newFaqObj->setVar('status', Constants::SF_STATUS_OPENED);
78
-        } else {
79
-            $newFaqObj->setVar('status', Constants::SF_STATUS_ASKED);
80
-        }
81
-
82
-        // Storing the FAQ object in the database
83
-        if (!$newFaqObj->store()) {
84
-            redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . Smartfaq\Utility::formatErrors($newFaqObj->getErrors()));
85
-        }
86
-
87
-        // Get the cateopry object related to that FAQ
88
-        // If autoapprove_requested
89
-        if (1 == $xoopsModuleConfig['autoapprove_request']) {
90
-            // We do not not subscribe user to notification on publish since we publish it right away
91
-
92
-            // Send notifications
93
-            $newFaqObj->sendNotifications([Constants::SF_NOT_QUESTION_PUBLISHED]);
94
-
95
-            $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED;
96
-        } else {
97
-            // Subscribe the user to On Published notification, if requested
98
-            if (1 == $notifypub) {
99
-                require_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
100
-                $notificationHandler = xoops_getHandler('notification');
101
-                $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
67
+
68
+            // Putting the values about the FAQ in the FAQ object
69
+            $newFaqObj->setVar('categoryid', $_POST['categoryid']);
70
+            $newFaqObj->setVar('uid', $uid);
71
+            $newFaqObj->setVar('question', $_POST['question']);
72
+            $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0;
73
+            $newFaqObj->setVar('notifypub', $notifypub);
74
+
75
+            // Setting the status of the FAQ
76
+            if (1 == $xoopsModuleConfig['autoapprove_request']) {
77
+                $newFaqObj->setVar('status', Constants::SF_STATUS_OPENED);
78
+            } else {
79
+                $newFaqObj->setVar('status', Constants::SF_STATUS_ASKED);
80
+            }
81
+
82
+            // Storing the FAQ object in the database
83
+            if (!$newFaqObj->store()) {
84
+                redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . Smartfaq\Utility::formatErrors($newFaqObj->getErrors()));
102 85
             }
103
-            // Send notifications
104
-            $newFaqObj->sendNotifications([Constants::SF_NOT_QUESTION_SUBMITTED]);
105 86
 
106
-            $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL;
107
-        }
87
+            // Get the cateopry object related to that FAQ
88
+            // If autoapprove_requested
89
+            if (1 == $xoopsModuleConfig['autoapprove_request']) {
90
+                // We do not not subscribe user to notification on publish since we publish it right away
91
+
92
+                // Send notifications
93
+                $newFaqObj->sendNotifications([Constants::SF_NOT_QUESTION_PUBLISHED]);
94
+
95
+                $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED;
96
+            } else {
97
+                // Subscribe the user to On Published notification, if requested
98
+                if (1 == $notifypub) {
99
+                    require_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
100
+                    $notificationHandler = xoops_getHandler('notification');
101
+                    $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
102
+                }
103
+                // Send notifications
104
+                $newFaqObj->sendNotifications([Constants::SF_NOT_QUESTION_SUBMITTED]);
105
+
106
+                $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL;
107
+            }
108 108
 
109
-        //redirect_header("javascript:history.go(-2)", 3, $redirect_msg);
110
-        redirect_header('index.php', 2, $redirect_msg);
111
-        break;
109
+            //redirect_header("javascript:history.go(-2)", 3, $redirect_msg);
110
+            redirect_header('index.php', 2, $redirect_msg);
111
+            break;
112 112
 
113
-    case 'form':
114
-    default:
113
+        case 'form':
114
+        default:
115 115
 
116
-        global $xoopsUser, $myts;
116
+            global $xoopsUser, $myts;
117 117
 
118
-        $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl';
119
-        require_once XOOPS_ROOT_PATH . '/header.php';
120
-        require_once __DIR__ . '/footer.php';
118
+            $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl';
119
+            require_once XOOPS_ROOT_PATH . '/header.php';
120
+            require_once __DIR__ . '/footer.php';
121 121
 
122
-        $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
122
+            $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
123 123
 
124
-        $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
125
-        $xoopsTpl->assign('whereInSection', $moduleName);
126
-        $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST);
124
+            $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
125
+            $xoopsTpl->assign('whereInSection', $moduleName);
126
+            $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST);
127 127
 
128
-        $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST);
129
-        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg']));
128
+            $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST);
129
+            $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg']));
130 130
 
131
-        require_once __DIR__ . '/include/request.inc.php';
131
+            require_once __DIR__ . '/include/request.inc.php';
132 132
 
133
-        $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
133
+            $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
134 134
 
135
-        $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name'));
135
+            $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name'));
136 136
 
137
-        require_once __DIR__ . '/include/request.inc.php';
137
+            require_once __DIR__ . '/include/request.inc.php';
138 138
 
139
-        require_once XOOPS_ROOT_PATH . '/footer.php';
139
+            require_once XOOPS_ROOT_PATH . '/footer.php';
140 140
 
141
-        break;
141
+            break;
142 142
 }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
 use XoopsModules\Smartfaq;
10 10
 use XoopsModules\Smartfaq\Constants;
11 11
 
12
-require_once __DIR__ . '/header.php';
13
-require_once XOOPS_ROOT_PATH . '/header.php';
12
+require_once __DIR__.'/header.php';
13
+require_once XOOPS_ROOT_PATH.'/header.php';
14 14
 
15 15
 global $xoopsUser, $xoopsConfig, $xoopsModuleConfig, $xoopsModule;
16 16
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         // Storing the FAQ object in the database
83 83
         if (!$newFaqObj->store()) {
84
-            redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . Smartfaq\Utility::formatErrors($newFaqObj->getErrors()));
84
+            redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR.Smartfaq\Utility::formatErrors($newFaqObj->getErrors()));
85 85
         }
86 86
 
87 87
         // Get the cateopry object related to that FAQ
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         } else {
97 97
             // Subscribe the user to On Published notification, if requested
98 98
             if (1 == $notifypub) {
99
-                require_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
99
+                require_once XOOPS_ROOT_PATH.'/include/notification_constants.php';
100 100
                 $notificationHandler = xoops_getHandler('notification');
101 101
                 $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
102 102
             }
@@ -116,27 +116,27 @@  discard block
 block discarded – undo
116 116
         global $xoopsUser, $myts;
117 117
 
118 118
         $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl';
119
-        require_once XOOPS_ROOT_PATH . '/header.php';
120
-        require_once __DIR__ . '/footer.php';
119
+        require_once XOOPS_ROOT_PATH.'/header.php';
120
+        require_once __DIR__.'/footer.php';
121 121
 
122 122
         $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
123 123
 
124
-        $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
124
+        $moduleName = & $myts->displayTarea($xoopsModule->getVar('name'));
125 125
         $xoopsTpl->assign('whereInSection', $moduleName);
126 126
         $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST);
127 127
 
128 128
         $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST);
129
-        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg']));
129
+        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, ".$myts->displayTarea($xoopsModuleConfig['requestintromsg']));
130 130
 
131
-        require_once __DIR__ . '/include/request.inc.php';
131
+        require_once __DIR__.'/include/request.inc.php';
132 132
 
133 133
         $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
134 134
 
135 135
         $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name'));
136 136
 
137
-        require_once __DIR__ . '/include/request.inc.php';
137
+        require_once __DIR__.'/include/request.inc.php';
138 138
 
139
-        require_once XOOPS_ROOT_PATH . '/footer.php';
139
+        require_once XOOPS_ROOT_PATH.'/footer.php';
140 140
 
141 141
         break;
142 142
 }
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@  discard block
 block discarded – undo
9 9
 use XoopsModules\Smartfaq;
10 10
 use XoopsModules\Smartfaq\Constants;
11 11
 
12
-require_once __DIR__ . '/header.php';
12
+require_once __DIR__.'/header.php';
13 13
 
14 14
 // At which record shall we start for the Categories
15
-$catstart = isset($_GET['catstart']) ? (int)$_GET['catstart'] : 0;
15
+$catstart = isset($_GET['catstart']) ? (int) $_GET['catstart'] : 0;
16 16
 
17 17
 // At which record shall we start for the FAQ
18
-$start = isset($_GET['start']) ? (int)$_GET['start'] : 0;
18
+$start = isset($_GET['start']) ? (int) $_GET['start'] : 0;
19 19
 
20 20
 // Creating the category handler object
21 21
 /** @var \XoopsModules\Smartfaq\CategoryHandler $categoryHandler */
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 
43 43
 $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_index.tpl';
44 44
 
45
-require_once XOOPS_ROOT_PATH . '/header.php';
46
-require_once __DIR__ . '/footer.php';
45
+require_once XOOPS_ROOT_PATH.'/header.php';
46
+require_once __DIR__.'/footer.php';
47 47
 
48 48
 // Creating the categories objects
49
-$categoriesObj =& $categoryHandler->getCategories($xoopsModuleConfig['catperpage'], $catstart);
49
+$categoriesObj = & $categoryHandler->getCategories($xoopsModuleConfig['catperpage'], $catstart);
50 50
 // If no categories are found, exit
51 51
 $totalCategoriesOnPage = count($categoriesObj);
52 52
 if (0 == $totalCategoriesOnPage) {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     // Get the last smartfaq in each category
67 67
     $last_qnaObj = $faqHandler->getLastPublishedByCat();
68 68
 }
69
-$lastfaqsize = (int)$xoopsModuleConfig['lastfaqsize'];
69
+$lastfaqsize = (int) $xoopsModuleConfig['lastfaqsize'];
70 70
 $categories  = [];
71 71
 foreach ($categoriesObj as $cat_id => $category) {
72 72
     $total = 0;
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) {
77 77
                 if (isset($last_qnaObj[$subcat_id])) {
78 78
                     $subcat->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid'));
79
-                    $subcat->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question($lastfaqsize) . '</a>');
79
+                    $subcat->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question($lastfaqsize).'</a>');
80 80
                 }
81 81
                 $subcat->setVar('faqcount', $totalQnas[$subcat_id]);
82 82
                 if ($xoopsModuleConfig['displaysubcatonindex']) {
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     if ($total > 0) {
95 95
         if (isset($last_qnaObj[$cat_id])) {
96 96
             $category->setVar('last_faqid', $last_qnaObj[$cat_id]->getVar('faqid'));
97
-            $category->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$cat_id]->getVar('faqid') . "'>" . $last_qnaObj[$cat_id]->question($lastfaqsize) . '</a>');
97
+            $category->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$cat_id]->getVar('faqid')."'>".$last_qnaObj[$cat_id]->question($lastfaqsize).'</a>');
98 98
         }
99 99
         $category->setVar('faqcount', $total);
100 100
         if (!isset($categories[$cat_id])) {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         }
134 134
 
135 135
         $memberHandler = xoops_getHandler('member');
136
-        $users         = $memberHandler->getUsers(new \Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true);
136
+        $users         = $memberHandler->getUsers(new \Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true);
137 137
         for ($i = 0; $i < $totalQnasOnPage; ++$i) {
138 138
             $faq = $faqsObj[$i]->toArray(null, $allcategories);
139 139
 
@@ -159,14 +159,14 @@  discard block
 block discarded – undo
159 159
 }
160 160
 
161 161
 // Language constants
162
-$moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
162
+$moduleName = & $myts->displayTarea($xoopsModule->getVar('name'));
163 163
 $xoopsTpl->assign('whereInSection', $moduleName);
164 164
 $xoopsTpl->assign('displaysubcatonindex', $xoopsModuleConfig['displaysubcatonindex']);
165 165
 $xoopsTpl->assign('displaylastfaqs', $xoopsModuleConfig['displaylastfaqs']);
166 166
 $xoopsTpl->assign('display_categoryname', true);
167 167
 $xoopsTpl->assign('displayFull', 'full' === $xoopsModuleConfig['displaytype']);
168 168
 
169
-$xoopsTpl->assign('lang_mainhead', _MD_SF_MAINHEAD . ' ' . $moduleName);
169
+$xoopsTpl->assign('lang_mainhead', _MD_SF_MAINHEAD.' '.$moduleName);
170 170
 $xoopsTpl->assign('lang_mainintro', $myts->displayTarea($xoopsModuleConfig['indexwelcomemsg'], 1));
171 171
 $xoopsTpl->assign('lang_total', _MD_SF_TOTAL_SMARTFAQS);
172 172
 $xoopsTpl->assign('lang_home', _MD_SF_HOME);
@@ -185,20 +185,20 @@  discard block
 block discarded – undo
185 185
 $xoopsTpl->assign('lang_comments', _MD_SF_COMMENTS);
186 186
 
187 187
 // Category Navigation Bar
188
-require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
188
+require_once XOOPS_ROOT_PATH.'/class/pagenav.php';
189 189
 $pagenav = new \XoopsPageNav($totalCategories, $xoopsModuleConfig['catperpage'], $catstart, 'catstart', '');
190 190
 if (1 == $xoopsModuleConfig['useimagenavpage']) {
191
-    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>');
191
+    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>');
192 192
 } else {
193
-    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>');
193
+    $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>');
194 194
 }
195 195
 
196 196
 // FAQ Navigation Bar
197 197
 $pagenav = new \XoopsPageNav($totalFaqs, $xoopsModuleConfig['indexperpage'], $start, 'start', '');
198 198
 if (1 == $xoopsModuleConfig['useimagenavpage']) {
199
-    $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>');
199
+    $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>');
200 200
 } else {
201
-    $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>');
201
+    $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>');
202 202
 }
203 203
 
204 204
 // Page Title Hack by marcan
@@ -206,4 +206,4 @@  discard block
 block discarded – undo
206 206
 $xoopsTpl->assign('xoops_pagetitle', $module_name);
207 207
 // End Page Title Hack by marcan
208 208
 
209
-require_once XOOPS_ROOT_PATH . '/footer.php';
209
+require_once XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
admin/admin_header.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Smartfaq;
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';
@@ -28,18 +28,18 @@  discard block
 block discarded – undo
28 28
 $moduleDirName = basename(dirname(__DIR__));
29 29
 
30 30
 $path = dirname(dirname(dirname(__DIR__)));
31
-require_once $path . '/kernel/module.php';
32
-require_once $path . '/class/xoopstree.php';
33
-require_once $path . '/class/xoopslists.php';
34
-require_once $path . '/class/pagenav.php';
35
-require_once $path . '/class/xoopsformloader.php';
31
+require_once $path.'/kernel/module.php';
32
+require_once $path.'/class/xoopstree.php';
33
+require_once $path.'/class/xoopslists.php';
34
+require_once $path.'/class/pagenav.php';
35
+require_once $path.'/class/xoopsformloader.php';
36 36
 
37 37
 //require_once __DIR__ . '/../include/functions.php';
38 38
 // require_once __DIR__ . '/../class/category.php';
39 39
 // require_once __DIR__ . '/../class/faq.php';
40 40
 // require_once __DIR__ . '/../class/answer.php';
41 41
 // require_once __DIR__ . '/../class/Utility.php';
42
-require_once __DIR__ . '/../include/common.php';
42
+require_once __DIR__.'/../include/common.php';
43 43
 /** @var Smartfaq\Helper $helper */
44 44
 $helper      = Smartfaq\Helper::getInstance();
45 45
 $adminObject = \Xmf\Module\Admin::getInstance();
Please login to merge, or discard this patch.