Completed
Push — master ( 1b2f30...7ddb60 )
by Michael
05:43 queued 01:48
created
admin/mygrouppermform.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
      * Add appendix
121 121
      *
122 122
      * @access public
123
-     * @param $permName
123
+     * @param string $permName
124 124
      * @param $itemId
125
-     * @param $itemName
125
+     * @param string $itemName
126 126
      */
127 127
     public function addAppendix($permName, $itemId, $itemName)
128 128
     {
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     /**
257 257
      * Constructor
258 258
      * @param      $caption
259
-     * @param      $name
259
+     * @param      string $name
260 260
      * @param      $groupId
261 261
      * @param null $values
262 262
      */
Please login to merge, or discard this patch.
admin/question.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 $startfaq = isset($_GET['startfaq']) ? (int)$_GET['startfaq'] : 0;
27 27
 
28 28
 /**
29
- * @param bool $showmenu
29
+ * @param string $showmenu
30 30
  * @param int  $faqid
31 31
  */
32 32
 function editfaq($showmenu = false, $faqid = -1)
Please login to merge, or discard this patch.
class/answer.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
     /**
29 29
      * constructor
30
-     * @param null $id
30
+     * @param integer $id
31 31
      */
32 32
     public function __construct($id = null)
33 33
     {
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
      * create a new answer
369 369
      *
370 370
      * @param  bool $isNew flag the new objects as "new"?
371
-     * @return object sfAnswer
371
+     * @return sfAnswer sfAnswer
372 372
      */
373 373
     public function create($isNew = true)
374 374
     {
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
     /**
411 411
      * insert a new answer in the database
412 412
      *
413
-     * @param  XoopsObject $answerObj reference to the <a href='psi_element://sfAnswer'>sfAnswer</a> object
413
+     * @param  sfAnswer $answerObj reference to the <a href='psi_element://sfAnswer'>sfAnswer</a> object
414 414
      * @param  bool        $force
415 415
      * @return bool        FALSE if failed, TRUE if already present and unchanged or successful
416 416
      */
Please login to merge, or discard this patch.
class/category.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
      * create a new category
270 270
      *
271 271
      * @param  bool $isNew flag the new objects as "new"?
272
-     * @return object sfCategory
272
+     * @return sfCategory sfCategory
273 273
      */
274 274
     public function &create($isNew = true)
275 275
     {
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
     /**
312 312
      * insert a new category in the database
313 313
      *
314
-     * @param  XoopsObject $category reference to the {@link sfCategory} object
314
+     * @param  sfCategory $category reference to the {@link sfCategory} object
315 315
      * @param  bool        $force
316 316
      * @return bool        FALSE if failed, TRUE if already present and unchanged or successful
317 317
      */
Please login to merge, or discard this patch.
class/faq.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     }
244 244
 
245 245
     /**
246
-     * @return mixed
246
+     * @return integer
247 247
      */
248 248
     public function uid()
249 249
     {
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
     /**
745 745
      * insert a new faq in the database
746 746
      *
747
-     * @param  XoopsObject $faq reference to the {@link sfFaq} object
747
+     * @param  sfFaq $faq reference to the {@link sfFaq} object
748 748
      * @param  bool        $force
749 749
      * @return bool        FALSE if failed, TRUE if already present and unchanged or successful
750 750
      */
@@ -1121,7 +1121,7 @@  discard block
 block discarded – undo
1121 1121
      * @param  string $order
1122 1122
      * @param  string $notNullFields
1123 1123
      * @param  bool   $asobject
1124
-     * @param  null   $otherCriteria
1124
+     * @param  null|CriteriaCompo   $otherCriteria
1125 1125
      * @return array
1126 1126
      */
1127 1127
     public function getFaqs($limit = 0, $start = 0, $status = '', $categoryid = -1, $sort = 'datesub', $order = 'DESC', $notNullFields = '', $asobject = true, $otherCriteria = null)
Please login to merge, or discard this patch.
class/smartdbupdater.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     }
168 168
 
169 169
     /**
170
-     * @param $field
170
+     * @param string $field
171 171
      * @return bool
172 172
      */
173 173
     public function fieldExists($field)
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
     /**
629 629
      * Use to update a table
630 630
      *
631
-     * @param object $table {@link SmartDbTable} that will be updated
631
+     * @param SmartDbTable $table {@link SmartDbTable} that will be updated
632 632
      *
633 633
      * @see SmartDbTable
634 634
      *
Please login to merge, or discard this patch.
class/uploader.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      * Constructor
26 26
      *
27 27
      * @param string    $uploadDir
28
-     * @param array|int $allowedMimeTypes
28
+     * @param integer $allowedMimeTypes
29 29
      * @param int       $maxFileSize
30 30
      * @param int       $maxWidth
31 31
      * @param int       $maxHeight
Please login to merge, or discard this patch.
include/functions.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 
510 510
 /**
511 511
  * @param  string $url
512
- * @return mixed|string
512
+ * @return string
513 513
  */
514 514
 function sf_getxoopslink($url = '')
515 515
 {
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
 }
583 583
 
584 584
 /**
585
- * @param       $name
585
+ * @param       string $name
586 586
  * @param  bool $optional
587 587
  * @return bool
588 588
  */
Please login to merge, or discard this patch.
request.php 1 patch
Switch Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -41,94 +41,94 @@
 block discarded – undo
41 41
 }
42 42
 
43 43
 switch ($op) {
44
-    case 'post':
44
+        case 'post':
45 45
 
46
-        global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB;
46
+            global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB;
47 47
 
48
-        $newFaqObj = $faqHandler->create();
48
+            $newFaqObj = $faqHandler->create();
49 49
 
50
-        if (!$xoopsUser) {
51
-            if ($xoopsModuleConfig['anonpost'] == 1) {
52
-                $uid = 0;
50
+            if (!$xoopsUser) {
51
+                if ($xoopsModuleConfig['anonpost'] == 1) {
52
+                    $uid = 0;
53
+                } else {
54
+                    redirect_header('index.php', 3, _NOPERM);
55
+                }
53 56
             } else {
54
-                redirect_header('index.php', 3, _NOPERM);
57
+                $uid = $xoopsUser->uid();
55 58
             }
56
-        } else {
57
-            $uid = $xoopsUser->uid();
58
-        }
59
-
60
-        // Putting the values about the FAQ in the FAQ object
61
-        $newFaqObj->setVar('categoryid', $_POST['categoryid']);
62
-        $newFaqObj->setVar('uid', $uid);
63
-        $newFaqObj->setVar('question', $_POST['question']);
64
-        $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0;
65
-        $newFaqObj->setVar('notifypub', $notifypub);
66
-
67
-        // Setting the status of the FAQ
68
-        if ($xoopsModuleConfig['autoapprove_request'] == 1) {
69
-            $newFaqObj->setVar('status', _SF_STATUS_OPENED);
70
-        } else {
71
-            $newFaqObj->setVar('status', _SF_STATUS_ASKED);
72
-        }
73
-
74
-        // Storing the FAQ object in the database
75
-        if (!$newFaqObj->store()) {
76
-            redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors()));
77
-        }
78
-
79
-        // Get the cateopry object related to that FAQ
80
-        // If autoapprove_requested
81
-        if ($xoopsModuleConfig['autoapprove_request'] == 1) {
82
-            // We do not not subscribe user to notification on publish since we publish it right away
83
-
84
-            // Send notifications
85
-            $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_PUBLISHED));
86
-
87
-            $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED;
88
-        } else {
89
-            // Subscribe the user to On Published notification, if requested
90
-            if ($notifypub == 1) {
91
-                include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
92
-                $notificationHandler = xoops_getHandler('notification');
93
-                $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
59
+
60
+            // Putting the values about the FAQ in the FAQ object
61
+            $newFaqObj->setVar('categoryid', $_POST['categoryid']);
62
+            $newFaqObj->setVar('uid', $uid);
63
+            $newFaqObj->setVar('question', $_POST['question']);
64
+            $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0;
65
+            $newFaqObj->setVar('notifypub', $notifypub);
66
+
67
+            // Setting the status of the FAQ
68
+            if ($xoopsModuleConfig['autoapprove_request'] == 1) {
69
+                $newFaqObj->setVar('status', _SF_STATUS_OPENED);
70
+            } else {
71
+                $newFaqObj->setVar('status', _SF_STATUS_ASKED);
72
+            }
73
+
74
+            // Storing the FAQ object in the database
75
+            if (!$newFaqObj->store()) {
76
+                redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . sf_formatErrors($newFaqObj->getErrors()));
94 77
             }
95
-            // Send notifications
96
-            $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_SUBMITTED));
97 78
 
98
-            $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL;
99
-        }
79
+            // Get the cateopry object related to that FAQ
80
+            // If autoapprove_requested
81
+            if ($xoopsModuleConfig['autoapprove_request'] == 1) {
82
+                // We do not not subscribe user to notification on publish since we publish it right away
83
+
84
+                // Send notifications
85
+                $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_PUBLISHED));
86
+
87
+                $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED;
88
+            } else {
89
+                // Subscribe the user to On Published notification, if requested
90
+                if ($notifypub == 1) {
91
+                    include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
92
+                    $notificationHandler = xoops_getHandler('notification');
93
+                    $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
94
+                }
95
+                // Send notifications
96
+                $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_SUBMITTED));
97
+
98
+                $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL;
99
+            }
100 100
 
101
-        //redirect_header("javascript:history.go(-2)", 3, $redirect_msg);
102
-        redirect_header('index.php', 2, $redirect_msg);
103
-        break;
101
+            //redirect_header("javascript:history.go(-2)", 3, $redirect_msg);
102
+            redirect_header('index.php', 2, $redirect_msg);
103
+            break;
104 104
 
105
-    case 'form':
106
-    default:
105
+        case 'form':
106
+        default:
107 107
 
108
-        global $xoopsUser, $myts;
108
+            global $xoopsUser, $myts;
109 109
 
110
-        $xoopsOption['template_main'] = 'smartfaq_submit.tpl';
111
-        include_once(XOOPS_ROOT_PATH . '/header.php');
112
-        include_once __DIR__ . '/footer.php';
110
+            $xoopsOption['template_main'] = 'smartfaq_submit.tpl';
111
+            include_once(XOOPS_ROOT_PATH . '/header.php');
112
+            include_once __DIR__ . '/footer.php';
113 113
 
114
-        $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
114
+            $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
115 115
 
116
-        $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
117
-        $xoopsTpl->assign('whereInSection', $moduleName);
118
-        $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST);
116
+            $moduleName =& $myts->displayTarea($xoopsModule->getVar('name'));
117
+            $xoopsTpl->assign('whereInSection', $moduleName);
118
+            $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST);
119 119
 
120
-        $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST);
121
-        $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg']));
120
+            $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST);
121
+            $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg']));
122 122
 
123
-        include_once 'include/request.inc.php';
123
+            include_once 'include/request.inc.php';
124 124
 
125
-        $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
125
+            $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous';
126 126
 
127
-        $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name'));
127
+            $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name'));
128 128
 
129
-        include_once 'include/request.inc.php';
129
+            include_once 'include/request.inc.php';
130 130
 
131
-        include_once XOOPS_ROOT_PATH . '/footer.php';
131
+            include_once XOOPS_ROOT_PATH . '/footer.php';
132 132
 
133
-        break;
133
+            break;
134 134
 }
Please login to merge, or discard this patch.