Completed
Push — master ( c004c3...65a58d )
by Michael
04:32
created
smartfaq/admin/mygrouppermform.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -85,6 +85,10 @@  discard block
 block discarded – undo
85 85
 
86 86
     /**
87 87
      * Constructor
88
+     * @param string $title
89
+     * @param integer $modid
90
+     * @param string $permname
91
+     * @param string $permdesc
88 92
      */
89 93
     function MyXoopsGroupPermForm($title, $modid, $permname, $permdesc)
90 94
     {
@@ -117,6 +121,8 @@  discard block
 block discarded – undo
117 121
      * Add appendix
118 122
      *
119 123
      * @access public
124
+     * @param string $permName
125
+     * @param string $itemName
120 126
      */
121 127
     function addAppendix($permName,$itemId,$itemName)
122 128
     {
@@ -249,6 +255,7 @@  discard block
 block discarded – undo
249 255
 
250 256
     /**
251 257
      * Constructor
258
+     * @param string $name
252 259
      */
253 260
     function MyXoopsGroupFormCheckBox($caption, $name, $groupId, $values = null)
254 261
     {
Please login to merge, or discard this patch.
smartfaq/class/answer.php 2 patches
Doc Comments   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,6 +24,7 @@  discard block
 block discarded – undo
24 24
     var $attachment_array = array();
25 25
     /**
26 26
     * constructor
27
+    * @param integer $id
27 28
     */
28 29
     function __construct ($id = null)
29 30
     {
@@ -297,7 +298,7 @@  discard block
 block discarded – undo
297 298
     * create a new answer
298 299
     *
299 300
     * @param bool $isNew flag the new objects as "new"?
300
-    * @return object sfAnswer
301
+    * @return sfAnswer sfAnswer
301 302
     */
302 303
     function &create($isNew = true)
303 304
     {
@@ -338,7 +339,7 @@  discard block
 block discarded – undo
338 339
     /**
339 340
     * insert a new answer in the database
340 341
     *
341
-    * @param object $answer reference to the {@link sfAnswer} object
342
+    * @param sfAnswer $answerObj reference to the {@link sfAnswer} object
342 343
     * @param bool $force
343 344
     * @return bool FALSE if failed, TRUE if already present and unchanged or successful
344 345
     */
@@ -414,8 +415,6 @@  discard block
 block discarded – undo
414 415
     /**
415 416
     * delete an answer from the database
416 417
     *
417
-    * @param object $answer reference to the answer to delete
418
-    * @param bool $force
419 418
     * @return bool FALSE if failed.
420 419
     */
421 420
     function deleteFaqAnswers(&$faqObj)
@@ -476,7 +475,6 @@  discard block
 block discarded – undo
476 475
     /**
477 476
     * retrieve 1 official answer (for now SmartFAQ only allow 1 official answer...)
478 477
     *
479
-    * @param object $criteria {@link CriteriaElement} conditions to be met
480 478
     * @param int $faqid
481 479
     * @return mixed reference to the {@link sfAnswer} object, FALSE if failed
482 480
     */
@@ -495,7 +493,6 @@  discard block
 block discarded – undo
495 493
     /**
496 494
     * retrieve all answers
497 495
     *
498
-    * @param object $criteria {@link CriteriaElement} conditions to be met
499 496
     * @param int $faqid
500 497
     * @return array array of {@link sfAnswer} objects
501 498
     */
Please login to merge, or discard this patch.
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 {
24 24
     var $attachment_array = array();
25 25
     /**
26
-    * constructor
27
-    */
26
+     * constructor
27
+     */
28 28
     function __construct ($id = null)
29 29
     {
30 30
         $this->db =& XoopsDatabaseFactory::getDatabaseConnection();
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                 }
185 185
                 $post_attachment .= '<br />';
186 186
             }
187
-       }
187
+        }
188 188
 
189 189
         return $post_attachment;
190 190
     }
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 
241 241
     function notLoaded()
242 242
     {
243
-       return ($this->getVar('answerid')== -1);
243
+        return ($this->getVar('answerid')== -1);
244 244
     }
245 245
 
246 246
     function sendNotifications($notifications=array())
@@ -294,11 +294,11 @@  discard block
 block discarded – undo
294 294
 {
295 295
 
296 296
     /**
297
-    * create a new answer
298
-    *
299
-    * @param bool $isNew flag the new objects as "new"?
300
-    * @return object sfAnswer
301
-    */
297
+     * create a new answer
298
+     *
299
+     * @param bool $isNew flag the new objects as "new"?
300
+     * @return object sfAnswer
301
+     */
302 302
     function &create($isNew = true)
303 303
     {
304 304
         $answer = new sfAnswer();
@@ -310,11 +310,11 @@  discard block
 block discarded – undo
310 310
     }
311 311
 
312 312
     /**
313
-    * retrieve an answer
314
-    *
315
-    * @param int $id answerid of the answer
316
-    * @return mixed reference to the {@link sfAnswer} object, FALSE if failed
317
-    */
313
+     * retrieve an answer
314
+     *
315
+     * @param int $id answerid of the answer
316
+     * @return mixed reference to the {@link sfAnswer} object, FALSE if failed
317
+     */
318 318
     function &get($id)
319 319
     {
320 320
         if (intval($id) > 0) {
@@ -336,12 +336,12 @@  discard block
 block discarded – undo
336 336
     }
337 337
 
338 338
     /**
339
-    * insert a new answer in the database
340
-    *
341
-    * @param object $answer reference to the {@link sfAnswer} object
342
-    * @param bool $force
343
-    * @return bool FALSE if failed, TRUE if already present and unchanged or successful
344
-    */
339
+     * insert a new answer in the database
340
+     *
341
+     * @param object $answer reference to the {@link sfAnswer} object
342
+     * @param bool $force
343
+     * @return bool FALSE if failed, TRUE if already present and unchanged or successful
344
+     */
345 345
     function insert(&$answerObj, $force = false)
346 346
     {
347 347
         if (strtolower(get_class($answerObj)) != 'sfanswer') {
@@ -384,12 +384,12 @@  discard block
 block discarded – undo
384 384
     }
385 385
 
386 386
     /**
387
-    * delete an answer from the database
388
-    *
389
-    * @param object $answer reference to the answer to delete
390
-    * @param bool $force
391
-    * @return bool FALSE if failed.
392
-    */
387
+     * delete an answer from the database
388
+     *
389
+     * @param object $answer reference to the answer to delete
390
+     * @param bool $force
391
+     * @return bool FALSE if failed.
392
+     */
393 393
     function delete(&$answer, $force = false)
394 394
     {
395 395
         if (strtolower(get_class($answer)) != 'sfanswer') {
@@ -412,12 +412,12 @@  discard block
 block discarded – undo
412 412
     }
413 413
 
414 414
     /**
415
-    * delete an answer from the database
416
-    *
417
-    * @param object $answer reference to the answer to delete
418
-    * @param bool $force
419
-    * @return bool FALSE if failed.
420
-    */
415
+     * delete an answer from the database
416
+     *
417
+     * @param object $answer reference to the answer to delete
418
+     * @param bool $force
419
+     * @return bool FALSE if failed.
420
+     */
421 421
     function deleteFaqAnswers(&$faqObj)
422 422
     {
423 423
         if (strtolower(get_class($faqObj)) != 'sffaq') {
@@ -435,12 +435,12 @@  discard block
 block discarded – undo
435 435
     }
436 436
 
437 437
     /**
438
-    * retrieve answers from the database
439
-    *
440
-    * @param object $criteria {@link CriteriaElement} conditions to be met
441
-    * @param bool $id_as_key use the answerid as key for the array?
442
-    * @return array array of {@link sfAnswer} objects
443
-    */
438
+     * retrieve answers from the database
439
+     *
440
+     * @param object $criteria {@link CriteriaElement} conditions to be met
441
+     * @param bool $id_as_key use the answerid as key for the array?
442
+     * @return array array of {@link sfAnswer} objects
443
+     */
444 444
     function &getObjects($criteria = null, $id_as_key = false)
445 445
     {
446 446
         $ret = array();
@@ -474,12 +474,12 @@  discard block
 block discarded – undo
474 474
     }
475 475
 
476 476
     /**
477
-    * retrieve 1 official answer (for now SmartFAQ only allow 1 official answer...)
478
-    *
479
-    * @param object $criteria {@link CriteriaElement} conditions to be met
480
-    * @param int $faqid
481
-    * @return mixed reference to the {@link sfAnswer} object, FALSE if failed
482
-    */
477
+     * retrieve 1 official answer (for now SmartFAQ only allow 1 official answer...)
478
+     *
479
+     * @param object $criteria {@link CriteriaElement} conditions to be met
480
+     * @param int $faqid
481
+     * @return mixed reference to the {@link sfAnswer} object, FALSE if failed
482
+     */
483 483
     function &getOfficialAnswer($faqid=0)
484 484
     {
485 485
         $theaAnswers =& $this->getAllAnswers($faqid, _SF_AN_STATUS_APPROVED, 1, 0);
@@ -493,12 +493,12 @@  discard block
 block discarded – undo
493 493
     }
494 494
 
495 495
     /**
496
-    * retrieve all answers
497
-    *
498
-    * @param object $criteria {@link CriteriaElement} conditions to be met
499
-    * @param int $faqid
500
-    * @return array array of {@link sfAnswer} objects
501
-    */
496
+     * retrieve all answers
497
+     *
498
+     * @param object $criteria {@link CriteriaElement} conditions to be met
499
+     * @param int $faqid
500
+     * @return array array of {@link sfAnswer} objects
501
+     */
502 502
     function &getAllAnswers($faqid=0, $status = -1, $limit = 0, $start = 0, $sort = 'datesub', $order = 'DESC')
503 503
     {
504 504
         $hasStatusCriteria = false;
@@ -531,11 +531,11 @@  discard block
 block discarded – undo
531 531
     }
532 532
 
533 533
     /**
534
-    * count answers matching a condition
535
-    *
536
-    * @param object $criteria {@link CriteriaElement} to match
537
-    * @return int count of answers
538
-    */
534
+     * count answers matching a condition
535
+     *
536
+     * @param object $criteria {@link CriteriaElement} to match
537
+     * @return int count of answers
538
+     */
539 539
     function getCount($criteria = null)
540 540
     {
541 541
         $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('smartfaq_answers');
@@ -552,11 +552,11 @@  discard block
 block discarded – undo
552 552
     }
553 553
 
554 554
     /**
555
-    * count answers matching a condition and group by faq ID
556
-    *
557
-    * @param object $criteria {@link CriteriaElement} to match
558
-    * @return array
559
-    */
555
+     * count answers matching a condition and group by faq ID
556
+     *
557
+     * @param object $criteria {@link CriteriaElement} to match
558
+     * @return array
559
+     */
560 560
     function getCountByFAQ($criteria = null)
561 561
     {
562 562
         $sql = 'SELECT faqid, COUNT(*) FROM '.$this->db->prefix('smartfaq_answers');
@@ -580,11 +580,11 @@  discard block
 block discarded – undo
580 580
     }
581 581
 
582 582
     /**
583
-    * delete answers matching a set of conditions
584
-    *
585
-    * @param object $criteria {@link CriteriaElement}
586
-    * @return bool FALSE if deletion failed
587
-    */
583
+     * delete answers matching a set of conditions
584
+     *
585
+     * @param object $criteria {@link CriteriaElement}
586
+     * @return bool FALSE if deletion failed
587
+     */
588 588
     function deleteAll($criteria = null)
589 589
     {
590 590
         $sql = 'DELETE FROM '.$this->db->prefix('smartfaq_answers');
@@ -599,14 +599,14 @@  discard block
 block discarded – undo
599 599
     }
600 600
 
601 601
     /**
602
-    * Change a value for answers with a certain criteria
603
-    *
604
-    * @param   string  $fieldname  Name of the field
605
-    * @param   string  $fieldvalue Value to write
606
-    * @param   object  $criteria   {@link CriteriaElement}
607
-    *
608
-    * @return  bool
609
-    **/
602
+     * Change a value for answers with a certain criteria
603
+     *
604
+     * @param   string  $fieldname  Name of the field
605
+     * @param   string  $fieldvalue Value to write
606
+     * @param   object  $criteria   {@link CriteriaElement}
607
+     *
608
+     * @return  bool
609
+     **/
610 610
     function updateAll($fieldname, $fieldvalue, $criteria = null)
611 611
     {
612 612
         $set_clause = is_numeric($fieldvalue)? $fieldname.' = '.$fieldvalue : $fieldname.' = '.$this->db->quoteString($fieldvalue);
Please login to merge, or discard this patch.
smartfaq/class/category.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     * create a new category
229 229
     *
230 230
     * @param bool $isNew flag the new objects as "new"?
231
-    * @return object sfCategory
231
+    * @return sfCategory sfCategory
232 232
     */
233 233
     function &create($isNew = true)
234 234
     {
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     /**
271 271
     * insert a new category in the database
272 272
     *
273
-    * @param object $category reference to the {@link sfCategory} object
273
+    * @param sfCategory $category reference to the {@link sfCategory} object
274 274
     * @param bool $force
275 275
     * @return bool FALSE if failed, TRUE if already present and unchanged or successful
276 276
     */
Please login to merge, or discard this patch.
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
     var $_groups_admin = null;
25 25
 
26 26
     /**
27
-    * constructor
28
-    */
27
+     * constructor
28
+     */
29 29
     function __construct($id = null)
30 30
     {
31 31
         $this->db =& XoopsDatabaseFactory::getDatabaseConnection();
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     function notLoaded()
61 61
     {
62
-       return ($this->getVar('categoryid')== -1);
62
+        return ($this->getVar('categoryid')== -1);
63 63
     }
64 64
 
65 65
     function assignOtherProperties()
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
     function setGroups_read($groups_read = array('0'))
162 162
     {
163
-      $this->_groups_read = $groups_read;
163
+        $this->_groups_read = $groups_read;
164 164
     }
165 165
 
166 166
     function store($sendNotifications = true, $force = true )
@@ -225,11 +225,11 @@  discard block
 block discarded – undo
225 225
 class sfCategoryHandler extends XoopsObjectHandler
226 226
 {
227 227
     /**
228
-    * create a new category
229
-    *
230
-    * @param bool $isNew flag the new objects as "new"?
231
-    * @return object sfCategory
232
-    */
228
+     * create a new category
229
+     *
230
+     * @param bool $isNew flag the new objects as "new"?
231
+     * @return object sfCategory
232
+     */
233 233
     function &create($isNew = true)
234 234
     {
235 235
         $category = new sfCategory();
@@ -241,11 +241,11 @@  discard block
 block discarded – undo
241 241
     }
242 242
 
243 243
     /**
244
-    * retrieve a category
245
-    *
246
-    * @param int $id categoryid of the category
247
-    * @return mixed reference to the {@link sfCategory} object, FALSE if failed
248
-    */
244
+     * retrieve a category
245
+     *
246
+     * @param int $id categoryid of the category
247
+     * @return mixed reference to the {@link sfCategory} object, FALSE if failed
248
+     */
249 249
     function &get($id)
250 250
     {
251 251
         $false = false;
@@ -268,12 +268,12 @@  discard block
 block discarded – undo
268 268
     }
269 269
 
270 270
     /**
271
-    * insert a new category in the database
272
-    *
273
-    * @param object $category reference to the {@link sfCategory} object
274
-    * @param bool $force
275
-    * @return bool FALSE if failed, TRUE if already present and unchanged or successful
276
-    */
271
+     * insert a new category in the database
272
+     *
273
+     * @param object $category reference to the {@link sfCategory} object
274
+     * @param bool $force
275
+     * @return bool FALSE if failed, TRUE if already present and unchanged or successful
276
+     */
277 277
     function insert(&$category, $force = false)
278 278
     {
279 279
         if (strtolower(get_class($category)) != 'sfcategory') {
@@ -313,12 +313,12 @@  discard block
 block discarded – undo
313 313
     }
314 314
 
315 315
     /**
316
-    * delete a category from the database
317
-    *
318
-    * @param object $category reference to the category to delete
319
-    * @param bool $force
320
-    * @return bool FALSE if failed.
321
-    */
316
+     * delete a category from the database
317
+     *
318
+     * @param object $category reference to the category to delete
319
+     * @param bool $force
320
+     * @return bool FALSE if failed.
321
+     */
322 322
     function delete(&$category, $force = false)
323 323
     {
324 324
 
@@ -360,12 +360,12 @@  discard block
 block discarded – undo
360 360
     }
361 361
 
362 362
     /**
363
-    * retrieve categories from the database
364
-    *
365
-    * @param object $criteria {@link CriteriaElement} conditions to be met
366
-    * @param bool $id_as_key use the categoryid as key for the array?
367
-    * @return array array of {@link XoopsFaq} objects
368
-    */
363
+     * retrieve categories from the database
364
+     *
365
+     * @param object $criteria {@link CriteriaElement} conditions to be met
366
+     * @param bool $id_as_key use the categoryid as key for the array?
367
+     * @return array array of {@link XoopsFaq} objects
368
+     */
369 369
     function &getObjects($criteria = null, $id_as_key = false)
370 370
     {
371 371
         $ret = array();
@@ -476,11 +476,11 @@  discard block
 block discarded – undo
476 476
     }
477 477
 
478 478
     /**
479
-    * count Categories matching a condition
480
-    *
481
-    * @param object $criteria {@link CriteriaElement} to match
482
-    * @return int count of categories
483
-    */
479
+     * count Categories matching a condition
480
+     *
481
+     * @param object $criteria {@link CriteriaElement} to match
482
+     * @return int count of categories
483
+     */
484 484
     function getCount($criteria = null)
485 485
     {
486 486
         $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('smartfaq_categories');
@@ -569,11 +569,11 @@  discard block
 block discarded – undo
569 569
     }
570 570
 
571 571
     /**
572
-    * delete categories matching a set of conditions
573
-    *
574
-    * @param object $criteria {@link CriteriaElement}
575
-    * @return bool FALSE if deletion failed
576
-    */
572
+     * delete categories matching a set of conditions
573
+     *
574
+     * @param object $criteria {@link CriteriaElement}
575
+     * @return bool FALSE if deletion failed
576
+     */
577 577
     function deleteAll($criteria = null)
578 578
     {
579 579
         $sql = 'DELETE FROM '.$this->db->prefix('smartfaq_categories');
@@ -590,14 +590,14 @@  discard block
 block discarded – undo
590 590
     }
591 591
 
592 592
     /**
593
-    * Change a value for categories with a certain criteria
594
-    *
595
-    * @param   string  $fieldname  Name of the field
596
-    * @param   string  $fieldvalue Value to write
597
-    * @param   object  $criteria   {@link CriteriaElement}
598
-    *
599
-    * @return  bool
600
-    **/
593
+     * Change a value for categories with a certain criteria
594
+     *
595
+     * @param   string  $fieldname  Name of the field
596
+     * @param   string  $fieldvalue Value to write
597
+     * @param   object  $criteria   {@link CriteriaElement}
598
+     *
599
+     * @return  bool
600
+     **/
601 601
     function updateAll($fieldname, $fieldvalue, $criteria = null)
602 602
     {
603 603
         $set_clause = is_numeric($fieldvalue)? $fieldname.' = '.$fieldvalue : $fieldname.' = '.$this->db->quoteString($fieldvalue);
Please login to merge, or discard this patch.
smartfaq/class/faq.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,6 +207,9 @@  discard block
 block discarded – undo
207 207
         return $ret;
208 208
     }
209 209
 
210
+    /**
211
+     * @return integer
212
+     */
210 213
     function uid()
211 214
     {
212 215
         return $this->getVar("uid");
@@ -619,7 +622,7 @@  discard block
 block discarded – undo
619 622
     /**
620 623
     * insert a new faq in the database
621 624
     *
622
-    * @param object $faq reference to the {@link sfFaq} object
625
+    * @param sfFaq $faq reference to the {@link sfFaq} object
623 626
     * @param bool $force
624 627
     * @return bool FALSE if failed, TRUE if already present and unchanged or successful
625 628
     */
Please login to merge, or discard this patch.
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
     var $_smartModule= null;
71 71
     var $_smartModuleConfig;
72 72
     /**
73
-    * constructor
74
-    */
73
+     * constructor
74
+     */
75 75
     function __construct($id= null)
76 76
     {
77 77
         $this->db= & XoopsDatabaseFactory::getDatabaseConnection();
@@ -591,11 +591,11 @@  discard block
 block discarded – undo
591 591
     }
592 592
 
593 593
     /**
594
-    * retrieve an FAQ
595
-    *
596
-    * @param int $id faqid of the user
597
-    * @return mixed reference to the {@link sfFaq} object, FALSE if failed
598
-    */
594
+     * retrieve an FAQ
595
+     *
596
+     * @param int $id faqid of the user
597
+     * @return mixed reference to the {@link sfFaq} object, FALSE if failed
598
+     */
599 599
     function & get($id)
600 600
     {
601 601
         if (intval($id) > 0) {
@@ -617,12 +617,12 @@  discard block
 block discarded – undo
617 617
     }
618 618
 
619 619
     /**
620
-    * insert a new faq in the database
621
-    *
622
-    * @param object $faq reference to the {@link sfFaq} object
623
-    * @param bool $force
624
-    * @return bool FALSE if failed, TRUE if already present and unchanged or successful
625
-    */
620
+     * insert a new faq in the database
621
+     *
622
+     * @param object $faq reference to the {@link sfFaq} object
623
+     * @param bool $force
624
+     * @return bool FALSE if failed, TRUE if already present and unchanged or successful
625
+     */
626 626
     function insert(& $faq, $force= false)
627 627
     {
628 628
 
@@ -668,12 +668,12 @@  discard block
 block discarded – undo
668 668
     }
669 669
 
670 670
     /**
671
-    * delete an FAQ from the database
672
-    *
673
-    * @param object $faq reference to the FAQ to delete
674
-    * @param bool $force
675
-    * @return bool FALSE if failed.
676
-    */
671
+     * delete an FAQ from the database
672
+     *
673
+     * @param object $faq reference to the FAQ to delete
674
+     * @param bool $force
675
+     * @return bool FALSE if failed.
676
+     */
677 677
     function delete(& $faq, $force= false)
678 678
     {
679 679
         $smartModule= & sf_getModuleInfo();
@@ -707,12 +707,12 @@  discard block
 block discarded – undo
707 707
     }
708 708
 
709 709
     /**
710
-    * retrieve FAQs from the database
711
-    *
712
-    * @param object $criteria {@link CriteriaElement} conditions to be met
713
-    * @param bool $id_as_key use the faqid as key for the array?
714
-    * @return array array of {@link sfFaq} objects
715
-    */
710
+     * retrieve FAQs from the database
711
+     *
712
+     * @param object $criteria {@link CriteriaElement} conditions to be met
713
+     * @param bool $id_as_key use the faqid as key for the array?
714
+     * @return array array of {@link sfFaq} objects
715
+     */
716 716
     function & getObjects($criteria= null, $id_as_key= false, $notNullFields= '')
717 717
     {
718 718
         $ret= array();
@@ -851,11 +851,11 @@  discard block
 block discarded – undo
851 851
     }
852 852
 
853 853
     /**
854
-    * count FAQs matching a condition
855
-    *
856
-    * @param object $criteria {@link CriteriaElement} to match
857
-    * @return int count of FAQs
858
-    */
854
+     * count FAQs matching a condition
855
+     *
856
+     * @param object $criteria {@link CriteriaElement} to match
857
+     * @return int count of FAQs
858
+     */
859 859
     function getCount($criteria= null, $notNullFields= '')
860 860
     {
861 861
         $sql= 'SELECT COUNT(*) FROM '.$this->db->prefix('smartfaq_faq');
@@ -1224,11 +1224,11 @@  discard block
 block discarded – undo
1224 1224
     }
1225 1225
 
1226 1226
     /**
1227
-    * delete FAQs matching a set of conditions
1228
-    *
1229
-    * @param object $criteria {@link CriteriaElement}
1230
-    * @return bool FALSE if deletion failed
1231
-    */
1227
+     * delete FAQs matching a set of conditions
1228
+     *
1229
+     * @param object $criteria {@link CriteriaElement}
1230
+     * @return bool FALSE if deletion failed
1231
+     */
1232 1232
     function deleteAll($criteria= null)
1233 1233
     {
1234 1234
         $sql= 'DELETE FROM '.$this->db->prefix('smartfaq_faq');
@@ -1244,14 +1244,14 @@  discard block
 block discarded – undo
1244 1244
     }
1245 1245
 
1246 1246
     /**
1247
-    * Change a value for FAQ with a certain criteria
1248
-    *
1249
-    * @param   string  $fieldname  Name of the field
1250
-    * @param   string  $fieldvalue Value to write
1251
-    * @param   object  $criteria   {@link CriteriaElement}
1252
-    *
1253
-    * @return  bool
1254
-    **/
1247
+     * Change a value for FAQ with a certain criteria
1248
+     *
1249
+     * @param   string  $fieldname  Name of the field
1250
+     * @param   string  $fieldvalue Value to write
1251
+     * @param   object  $criteria   {@link CriteriaElement}
1252
+     *
1253
+     * @return  bool
1254
+     **/
1255 1255
     function updateAll($fieldname, $fieldvalue, $criteria= null)
1256 1256
     {
1257 1257
         $set_clause= is_numeric($fieldvalue) ? $fieldname.' = '.$fieldvalue : $fieldname.' = '.$this->db->quoteString($fieldvalue);
Please login to merge, or discard this patch.
smartfaq/class/smartdbupdater.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,6 +164,9 @@  discard block
 block discarded – undo
164 164
         return $fields;
165 165
     }
166 166
 
167
+    /**
168
+     * @param string $field
169
+     */
167 170
     function fieldExists($field)
168 171
     {
169 172
         $existingFields = $this->getExistingFieldsArray();
@@ -620,7 +623,7 @@  discard block
 block discarded – undo
620 623
    /**
621 624
     * Use to update a table
622 625
     *
623
-    * @param object $table {@link SmartDbTable} that will be updated
626
+    * @param SmartDbTable $table {@link SmartDbTable} that will be updated
624 627
     *
625 628
     * @see SmartDbTable
626 629
     *
Please login to merge, or discard this patch.
Indentation   +196 added lines, -196 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     var $_flagForDrop = false;
103 103
 
104 104
     /**
105
- * @var array $_updatedFields containing fields which values will be updated
105
+     * @var array $_updatedFields containing fields which values will be updated
106 106
      */
107 107
     var $_updatedFields;
108 108
 
@@ -111,24 +111,24 @@  discard block
 block discarded – undo
111 111
      */    //felix
112 112
     var $_updatedWhere;
113 113
 
114
-   /**
115
-    * Constructor
116
-    *
117
-    * @param string $name name of the table
118
-    *
119
-    */
114
+    /**
115
+     * Constructor
116
+     *
117
+     * @param string $name name of the table
118
+     *
119
+     */
120 120
     function __construct($name)
121 121
     {
122 122
         $this->_name = $name;
123 123
         $this->_data = array();
124 124
     }
125 125
 
126
-   /**
127
-    * Return the table name, prefixed with site table prefix
128
-    *
129
-    * @return string table name
130
-    *
131
-    */
126
+    /**
127
+     * Return the table name, prefixed with site table prefix
128
+     *
129
+     * @return string table name
130
+     *
131
+     */
132 132
     function name()
133 133
     {
134 134
         global $xoopsDB;
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
         return $xoopsDB->prefix($this->_name);
137 137
     }
138 138
 
139
-   /**
140
-    * Checks if the table already exists in the database
141
-    *
142
-    * @return bool TRUE if it exists, FALSE if not
143
-    *
144
-    */
139
+    /**
140
+     * Checks if the table already exists in the database
141
+     *
142
+     * @return bool TRUE if it exists, FALSE if not
143
+     *
144
+     */
145 145
     function exists()
146 146
     {
147 147
         return smart_TableExists($this->_name);
@@ -152,13 +152,13 @@  discard block
 block discarded – undo
152 152
         global $xoopsDB;
153 153
         $result = $xoopsDB->query("SHOW COLUMNS FROM ".$this->name());
154 154
         while ($existing_field = $xoopsDB->fetchArray($result)) {
155
-             $fields[$existing_field['Field']] = $existing_field['Type'];
156
-             if ($existing_field['Null'] != "YES") {
157
-                 $fields[$existing_field['Field']] .= " NOT NULL";
158
-             }
159
-             if ($existing_field['Extra']) {
160
-                 $fields[$existing_field['Field']] .= " ".$existing_field['Extra'];
161
-             }
155
+                $fields[$existing_field['Field']] = $existing_field['Type'];
156
+                if ($existing_field['Null'] != "YES") {
157
+                    $fields[$existing_field['Field']] .= " NOT NULL";
158
+                }
159
+                if ($existing_field['Extra']) {
160
+                    $fields[$existing_field['Field']] .= " ".$existing_field['Extra'];
161
+                }
162 162
         }
163 163
 
164 164
         return $fields;
@@ -171,56 +171,56 @@  discard block
 block discarded – undo
171 171
         return isset($existingFields[$field]);
172 172
     }
173 173
 
174
-   /**
175
-    * Set the table structure
176
-    *
177
-    * @param  string $structure table structure
178
-    *
179
-    */
174
+    /**
175
+     * Set the table structure
176
+     *
177
+     * @param  string $structure table structure
178
+     *
179
+     */
180 180
     function setStructure($structure)
181 181
     {
182 182
         $this->_structure = $structure;
183 183
     }
184 184
 
185 185
     /**
186
-    * Return the table structure
187
-    *
188
-    * @return string table structure
189
-    *
190
-    */
186
+     * Return the table structure
187
+     *
188
+     * @return string table structure
189
+     *
190
+     */
191 191
     function getStructure()
192 192
     {
193 193
         return sprintf($this->_structure, $this->name());
194 194
     }
195 195
 
196
-   /**
197
-    * Add values of a record to be added
198
-    *
199
-    * @param string $data values of a record
200
-    *
201
-    */
196
+    /**
197
+     * Add values of a record to be added
198
+     *
199
+     * @param string $data values of a record
200
+     *
201
+     */
202 202
     function setData($data)
203 203
     {
204 204
         $this->_data[] = $data;
205 205
     }
206 206
 
207
-   /**
208
-    * Get the data array
209
-    *
210
-    * @return array containing the records values to be added
211
-    *
212
-    */
207
+    /**
208
+     * Get the data array
209
+     *
210
+     * @return array containing the records values to be added
211
+     *
212
+     */
213 213
     function getData()
214 214
     {
215 215
         return $this->_data;
216 216
     }
217 217
 
218
-   /**
219
-    * Use to insert data in a table
220
-    *
221
-    * @return bool true if success, false if an error occured
222
-    *
223
-    */
218
+    /**
219
+     * Use to insert data in a table
220
+     *
221
+     * @return bool true if success, false if an error occured
222
+     *
223
+     */
224 224
     function addData()
225 225
     {
226 226
         global $xoopsDB;
@@ -239,13 +239,13 @@  discard block
 block discarded – undo
239 239
 
240 240
     }
241 241
 
242
-   /**
243
-    * Add a field to be added
244
-    *
245
-    * @param string $name name of the field
246
-    * @param string $properties properties of the field
247
-    *
248
-    */
242
+    /**
243
+     * Add a field to be added
244
+     *
245
+     * @param string $name name of the field
246
+     * @param string $properties properties of the field
247
+     *
248
+     */
249 249
     function addAlteredField($name, $properties, $showerror=true)
250 250
     {
251 251
         $field['name'] = $name;
@@ -255,13 +255,13 @@  discard block
 block discarded – undo
255 255
     }
256 256
 
257 257
     /**
258
-    * Invert values 0 to 1 and 1 to 0
259
-    *
260
-    * @param string $name name of the field
261
-    * @param string $old old propertie
262
-    * @param string $new new propertie
263
-    *
264
-    */    //felix
258
+     * Invert values 0 to 1 and 1 to 0
259
+     *
260
+     * @param string $name name of the field
261
+     * @param string $old old propertie
262
+     * @param string $new new propertie
263
+     *
264
+     */    //felix
265 265
     function addUpdatedWhere($name, $newValue, $oldValue)
266 266
     {
267 267
         $field['name'] = $name;
@@ -270,13 +270,13 @@  discard block
 block discarded – undo
270 270
         $this->_updatedWhere[] = $field;
271 271
     }
272 272
 
273
-   /**
274
-    * Add new field of a record to be added
275
-    *
276
-    * @param string $name name of the field
277
-    * @param string $properties properties of the field
278
-    *
279
-    */
273
+    /**
274
+     * Add new field of a record to be added
275
+     *
276
+     * @param string $name name of the field
277
+     * @param string $properties properties of the field
278
+     *
279
+     */
280 280
     function addNewField($name, $properties)
281 281
     {
282 282
         $field['name'] = $name;
@@ -284,24 +284,24 @@  discard block
 block discarded – undo
284 284
         $this->_newFields[] = $field;
285 285
     }
286 286
 
287
-   /**
288
-    * Get fields that need to be altered
289
-    *
290
-    * @return array fields that need to be altered
291
-    *
292
-    */
287
+    /**
288
+     * Get fields that need to be altered
289
+     *
290
+     * @return array fields that need to be altered
291
+     *
292
+     */
293 293
     function getAlteredFields()
294 294
     {
295 295
         return $this->_alteredFields;
296 296
     }
297 297
 
298
-   /**
299
-    * Add field for which the value will be updated
300
-    *
301
-    * @param string $name name of the field
302
-    * @param string $value value to be set
303
-    *
304
-    */
298
+    /**
299
+     * Add field for which the value will be updated
300
+     *
301
+     * @param string $name name of the field
302
+     * @param string $value value to be set
303
+     *
304
+     */
305 305
     function addUpdatedField($name, $value)
306 306
     {
307 307
         $field['name'] = $name;
@@ -309,76 +309,76 @@  discard block
 block discarded – undo
309 309
         $this->_updatedFields[] = $field;
310 310
     }
311 311
 
312
-   /**
313
-    * Get new fields to be added
314
-    *
315
-    * @return array fields to be added
316
-    *
317
-    */
312
+    /**
313
+     * Get new fields to be added
314
+     *
315
+     * @return array fields to be added
316
+     *
317
+     */
318 318
     function getNewFields()
319 319
     {
320 320
         return $this->_newFields;
321 321
     }
322 322
 
323
-   /**
324
-    * Get fields which values need to be updated
325
-    *
326
-    * @return array fields which values need to be updated
327
-    *
328
-    */
323
+    /**
324
+     * Get fields which values need to be updated
325
+     *
326
+     * @return array fields which values need to be updated
327
+     *
328
+     */
329 329
     function getUpdatedFields()
330 330
     {
331 331
         return $this->_updatedFields;
332 332
     }
333 333
 
334
-     /**
335
-    * Get fields which values need to be updated
336
-    *
337
-    * @return array fields which values need to be updated
338
-    *
339
-    */    //felix
334
+        /**
335
+         * Get fields which values need to be updated
336
+         *
337
+         * @return array fields which values need to be updated
338
+         *
339
+         */    //felix
340 340
     function getUpdatedWhere()
341 341
     {
342 342
         return $this->_updatedWhere;
343 343
     }
344 344
 
345
-   /**
346
-    * Add values of a record to be added
347
-    *
348
-    * @param string $name name of the field
349
-    *
350
-    */
345
+    /**
346
+     * Add values of a record to be added
347
+     *
348
+     * @param string $name name of the field
349
+     *
350
+     */
351 351
     function addDropedField($name)
352 352
     {
353 353
         $this->_dropedFields[] = $name;
354 354
     }
355 355
 
356
-   /**
357
-    * Get fields that need to be droped
358
-    *
359
-    * @return array fields that need to be droped
360
-    *
361
-    */
356
+    /**
357
+     * Get fields that need to be droped
358
+     *
359
+     * @return array fields that need to be droped
360
+     *
361
+     */
362 362
     function getDropedFields()
363 363
     {
364 364
         return $this->_dropedFields;
365 365
     }
366 366
 
367
-   /**
368
-    * Set the flag to drop the table
369
-    *
370
-    */
367
+    /**
368
+     * Set the flag to drop the table
369
+     *
370
+     */
371 371
     function setFlagForDrop()
372 372
     {
373 373
         $this->_flagForDrop = true;
374 374
     }
375 375
 
376
-   /**
377
-    * Use to create a table
378
-    *
379
-    * @return bool true if success, false if an error occured
380
-    *
381
-    */
376
+    /**
377
+     * Use to create a table
378
+     *
379
+     * @return bool true if success, false if an error occured
380
+     *
381
+     */
382 382
     function createTable()
383 383
     {
384 384
         global $xoopsDB;
@@ -395,12 +395,12 @@  discard block
 block discarded – undo
395 395
         return $ret;
396 396
     }
397 397
 
398
-   /**
399
-    * Use to drop a table
400
-    *
401
-    * @return bool true if success, false if an error occured
402
-    *
403
-    */
398
+    /**
399
+     * Use to drop a table
400
+     *
401
+     * @return bool true if success, false if an error occured
402
+     *
403
+     */
404 404
     function dropTable()
405 405
     {
406 406
         global $xoopsDB;
@@ -418,12 +418,12 @@  discard block
 block discarded – undo
418 418
         }
419 419
     }
420 420
 
421
-   /**
422
-    * Use to alter a table
423
-    *
424
-    * @return bool true if success, false if an error occured
425
-    *
426
-    */
421
+    /**
422
+     * Use to alter a table
423
+     *
424
+     * @return bool true if success, false if an error occured
425
+     *
426
+     */
427 427
     function alterTable()
428 428
     {
429 429
         global $xoopsDB;
@@ -446,12 +446,12 @@  discard block
 block discarded – undo
446 446
         return $ret;
447 447
     }
448 448
 
449
-   /**
450
-    * Use to add new fileds in the table
451
-    *
452
-    * @return bool true if success, false if an error occured
453
-    *
454
-    */
449
+    /**
450
+     * Use to add new fileds in the table
451
+     *
452
+     * @return bool true if success, false if an error occured
453
+     *
454
+     */
455 455
     function addNewFields()
456 456
     {
457 457
         global $xoopsDB;
@@ -471,12 +471,12 @@  discard block
 block discarded – undo
471 471
         return $ret;
472 472
     }
473 473
 
474
-   /**
475
-    * Use to update fields values
476
-    *
477
-    * @return bool true if success, false if an error occured
478
-    *
479
-    */
474
+    /**
475
+     * Use to update fields values
476
+     *
477
+     * @return bool true if success, false if an error occured
478
+     *
479
+     */
480 480
     function updateFieldsValues()
481 481
     {
482 482
         global $xoopsDB;
@@ -491,16 +491,16 @@  discard block
 block discarded – undo
491 491
             } else {
492 492
                 echo "&nbsp;&nbsp;" . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . "<br />";
493 493
             }
494
-         }
494
+            }
495 495
 
496
-         return $ret;
496
+            return $ret;
497 497
     }
498
-       /**
499
-    * Use to update fields values
500
-    *
501
-    * @return bool true if success, false if an error occured
502
-    *
503
-    */        //felix
498
+        /**
499
+         * Use to update fields values
500
+         *
501
+         * @return bool true if success, false if an error occured
502
+         *
503
+         */        //felix
504 504
     function updateWhereValues()
505 505
     {
506 506
         global $xoopsDB;
@@ -516,16 +516,16 @@  discard block
 block discarded – undo
516 516
             } else {
517 517
                 echo "&nbsp;&nbsp;" . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . "<br />";
518 518
             }
519
-         }
519
+            }
520 520
 
521
-         return $ret;
521
+            return $ret;
522 522
     }
523
-   /**
524
-    * Use to drop fields
525
-    *
526
-    * @return bool true if success, false if an error occured
527
-    *
528
-    */
523
+    /**
524
+     * Use to drop fields
525
+     *
526
+     * @return bool true if success, false if an error occured
527
+     *
528
+     */
529 529
     function dropFields()
530 530
     {
531 531
         global $xoopsDB;
@@ -564,16 +564,16 @@  discard block
 block discarded – undo
564 564
 
565 565
     }
566 566
 
567
-   /**
568
-    * Use to execute a general query
569
-    *
570
-    * @param string $query query that will be executed
571
-    * @param string $goodmsg message displayed on success
572
-    * @param string $badmsg message displayed on error
573
-    *
574
-    * @return bool true if success, false if an error occured
575
-    *
576
-    */
567
+    /**
568
+     * Use to execute a general query
569
+     *
570
+     * @param string $query query that will be executed
571
+     * @param string $goodmsg message displayed on success
572
+     * @param string $badmsg message displayed on error
573
+     *
574
+     * @return bool true if success, false if an error occured
575
+     *
576
+     */
577 577
     function runQuery($query, $goodmsg, $badmsg)
578 578
     {
579 579
         global $xoopsDB;
@@ -589,14 +589,14 @@  discard block
 block discarded – undo
589 589
         }
590 590
     }
591 591
 
592
-   /**
593
-    * Use to rename a table
594
-    *
595
-    * @param string $from name of the table to rename
596
-    * @param string $to new name of the renamed table
597
-    *
598
-    * @return bool true if success, false if an error occured
599
-    */
592
+    /**
593
+     * Use to rename a table
594
+     *
595
+     * @param string $from name of the table to rename
596
+     * @param string $to new name of the renamed table
597
+     *
598
+     * @return bool true if success, false if an error occured
599
+     */
600 600
     function renameTable($from, $to)
601 601
     {
602 602
         global $xoopsDB;
@@ -617,15 +617,15 @@  discard block
 block discarded – undo
617 617
         }
618 618
     }
619 619
 
620
-   /**
621
-    * Use to update a table
622
-    *
623
-    * @param object $table {@link SmartDbTable} that will be updated
624
-    *
625
-    * @see SmartDbTable
626
-    *
627
-    * @return bool true if success, false if an error occured
628
-    */
620
+    /**
621
+     * Use to update a table
622
+     *
623
+     * @param object $table {@link SmartDbTable} that will be updated
624
+     *
625
+     * @see SmartDbTable
626
+     *
627
+     * @return bool true if success, false if an error occured
628
+     */
629 629
     function updateTable($table)
630 630
     {
631 631
         global $xoopsDB;
Please login to merge, or discard this patch.
smartfaq/class/uploader.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      * Constructor
24 24
      *
25 25
      * @param string $uploadDir
26
-     * @param array  $allowedMimeTypes
26
+     * @param integer  $allowedMimeTypes
27 27
      * @param int    $maxFileSize
28 28
      * @param int    $maxWidth
29 29
      * @param int    $maxHeight
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * CBB, XOOPS forum module
4
- *
5
- * @copyright	The XOOPS Project http://xoops.sf.net
6
- * @license		http://www.fsf.org/copyleft/gpl.html GNU public license
7
- * @author		Taiwen Jiang (phppp or D.J.) <[email protected]>
8
- * @since		4.00
9
- * @version		$Id $
10
- * @package		module::newbb
11
- */
3
+     * CBB, XOOPS forum module
4
+     *
5
+     * @copyright	The XOOPS Project http://xoops.sf.net
6
+     * @license		http://www.fsf.org/copyleft/gpl.html GNU public license
7
+     * @author		Taiwen Jiang (phppp or D.J.) <[email protected]>
8
+     * @since		4.00
9
+     * @version		$Id $
10
+     * @package		module::newbb
11
+     */
12 12
 
13 13
 // defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined");
14 14
 
Please login to merge, or discard this patch.
smartfaq/include/functions.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -581,6 +581,9 @@
 block discarded – undo
581 581
     echo "<h3 style=\"color: #2F5376; margin: 6px 0 0 0; \"><a href='#' onClick=\"toggle('" . $tablename . "'); toggleIcon('" . $iconname . "');\">";
582 582
 }
583 583
 
584
+/**
585
+ * @param string $name
586
+ */
584 587
 function sf_gethandler($name, $optional = false )
585 588
 {
586 589
     static $handlers;
Please login to merge, or discard this patch.
Indentation   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -287,8 +287,7 @@  discard block
 block discarded – undo
287 287
 * @param array $groups : group with granted permission
288 288
 * @param integer $itemID : faqid on which we are setting permissions
289 289
 * @return boolean : TRUE if the no errors occured
290
-
291
-*/
290
+ */
292 291
 function sf_saveItemPermissions($groups, $itemID)
293 292
 {
294 293
     $result = true;
@@ -536,7 +535,7 @@  discard block
 block discarded – undo
536 535
 function sf_collapsableBar($tablename = '', $iconname = '')
537 536
 {
538 537
 
539
-   ?>
538
+    ?>
540 539
     <script type="text/javascript"><!--
541 540
     function goto_URL(object)
542 541
     {
Please login to merge, or discard this patch.
smartfaq/include/functions.render.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,6 @@
 block discarded – undo
68 68
 /**
69 69
  * Display forrum button
70 70
  *
71
- * @param	string	$image		image/button name, without extension
72 71
  * @param	string	$alt		alt message
73 72
  * @param	boolean	$asImage	true for image mode; false for text mode
74 73
  * @param	string	$extra		extra attribute for the button
Please login to merge, or discard this patch.
smartfaq/answer.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
     }
185 185
 
186 186
     //redirect_header("javascript:history.go(-1)", 3, $redirect_msg);
187
-     redirect_header("index.php", 3, $redirect_msg);
187
+        redirect_header("index.php", 3, $redirect_msg);
188 188
     exit;
189 189
 
190 190
     break;
Please login to merge, or discard this patch.