Completed
Push — master ( aa4794...6b7a6d )
by Gino
19s
created
class/files/user/UserXoopsVersion.php 2 patches
Doc Comments   +30 added lines, -18 removed lines patch added patch discarded remove patch
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
     *  @param $filename
68 68
     */
69 69
     /**
70
-     * @param $module
70
+     * @param string $module
71 71
      * @param $table
72 72
      * @param $tables
73
-     * @param $filename
73
+     * @param string $filename
74 74
      */
75 75
     public function write($module, $table, $tables, $filename)
76 76
     {
@@ -119,6 +119,10 @@  discard block
 block discarded – undo
119 119
      *
120 120
      * @return string
121 121
      */
122
+
123
+    /**
124
+     * @param string $language
125
+     */
122 126
     private function getXoopsVersionHeader($module, $language)
123 127
     {
124 128
         $xCodeVHeader = TDMCreateXoopsCode::getInstance();
@@ -357,7 +361,7 @@  discard block
 block discarded – undo
357 361
     *  @param $language
358 362
     */
359 363
     /**
360
-     * @param $language
364
+     * @param string $language
361 365
      *
362 366
      * @return string
363 367
      */
@@ -395,7 +399,7 @@  discard block
 block discarded – undo
395 399
     */
396 400
     /**
397 401
      * @param $moduleDirname
398
-     * @param $language
402
+     * @param string $language
399 403
      *
400 404
      * @return string
401 405
      */
@@ -433,6 +437,7 @@  discard block
 block discarded – undo
433 437
     /**
434 438
      * @param $moduleDirname
435 439
      * @param $language
440
+     * @param string $stuTableSoleName
436 441
      *
437 442
      * @return string
438 443
      */
@@ -460,7 +465,7 @@  discard block
 block discarded – undo
460 465
     /**
461 466
      * @param $module
462 467
      * @param $table
463
-     * @param $language
468
+     * @param string $language
464 469
      *
465 470
      * @return string
466 471
      */
@@ -660,7 +665,7 @@  discard block
 block discarded – undo
660 665
     */
661 666
     /**
662 667
      * @param $moduleDirname
663
-     * @param $language
668
+     * @param string $language
664 669
      *
665 670
      * @return string
666 671
      */
@@ -753,10 +758,11 @@  discard block
 block discarded – undo
753 758
     */
754 759
     /**
755 760
      * @param $language
756
-     * @param $type
757
-     * @param $name
758
-     * @param $title
761
+     * @param string $type
762
+     * @param string $name
763
+     * @param string $title
759 764
      * @param $from
765
+     * @param integer $num
760 766
      *
761 767
      * @return string
762 768
      */
@@ -779,10 +785,12 @@  discard block
 block discarded – undo
779 785
     */
780 786
     /**
781 787
      * @param $language
782
-     * @param $type
783
-     * @param $name
784
-     * @param $title
788
+     * @param string $type
789
+     * @param string $name
790
+     * @param string $title
785 791
      * @param $from
792
+     * @param string $allow
793
+     * @param integer $num
786 794
      *
787 795
      * @return string
788 796
      */
@@ -805,12 +813,13 @@  discard block
 block discarded – undo
805 813
     */
806 814
     /**
807 815
      * @param $language
808
-     * @param $type
816
+     * @param string $type
809 817
      * @param $name
810 818
      * @param $title
811 819
      * @param $file
812 820
      * @param $item
813
-     * @param $allow
821
+     * @param integer $allow
822
+     * @param integer $num
814 823
      *
815 824
      * @return string
816 825
      */
@@ -833,12 +842,15 @@  discard block
 block discarded – undo
833 842
     */
834 843
     /**
835 844
      * @param $language
836
-     * @param $type
837
-     * @param $name
845
+     * @param string $type
846
+     * @param string $name
838 847
      * @param $title
839 848
      * @param $from
840 849
      * @param $item
841
-     * @param $mail
850
+     * @param string $mail
851
+     * @param integer $admin
852
+     * @param string $table
853
+     * @param integer $num
842 854
      *
843 855
      * @return string
844 856
      */
@@ -863,7 +875,7 @@  discard block
 block discarded – undo
863 875
     *  @param null
864 876
     */
865 877
     /**
866
-     * @return bool|string
878
+     * @return null|string
867 879
      */
868 880
     public function render()
869 881
     {
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                             'demo_site_url' => "'{$module->getVar('mod_demo_site_url')}'", 'demo_site_name' => "'{$module->getVar('mod_demo_site_name')}'", 'support_url' => "'{$module->getVar('mod_support_url')}'",
145 145
                             'support_name' => "'{$module->getVar('mod_support_name')}'", 'module_website_url' => "'{$module->getVar('mod_website_url')}'", 'module_website_name' => "'{$module->getVar('mod_website_name')}'", 'release' => "'{$module->getVar('mod_release')}'", 'module_status' => "'{$module->getVar('mod_status')}'",
146 146
                             'system_menu' => '1', 'hasAdmin' => $ha, 'hasMain' => $hm, 'adminindex' => "'admin/index.php'", 'adminmenu' => "'admin/menu.php'",
147
-                            'onInstall' => "'include/install.php'", 'onUpdate' => "'include/update.php'", );
147
+                            'onInstall' => "'include/install.php'", 'onUpdate' => "'include/update.php'",);
148 148
 
149 149
         $ret .= $uCodeVHeader->getUserModVersion(1, $descriptions);
150 150
 
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
         $ret = $phpCodeVTBlocks->getPhpCodeCommentLine("{$ucfTableName}");
446 446
         $blocks = array('file' => "'{$tableName}.php'", 'name' => "{$language}{$stuTableName}_BLOCK_{$stuTableSoleName}", 'description' => "{$language}{$stuTableName}_BLOCK_{$stuTableSoleName}_DESC",
447 447
                         'show_func' => "'b_{$moduleDirname}_{$tableName}_show'", 'edit_func' => "'b_{$moduleDirname}_{$tableName}_edit'",
448
-                        'template' => "'{$moduleDirname}_block_{$tableName}.tpl'", 'options' => "'{$type}|5|25|0'", );
448
+                        'template' => "'{$moduleDirname}_block_{$tableName}.tpl'", 'options' => "'{$type}|5|25|0'",);
449 449
         $ret .= $uCodeVTBlocks->getUserModVersion(3, $blocks, 'blocks', '$b');
450 450
         $ret .= $this->getSimpleString('++$b;');
451 451
 
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
                 $ret .= $xCodeVConfig->getXcLoad('xoopseditorhandler');
486 486
                 $ret .= $xCodeVConfig->getXcEqualsOperator('$editorHandler'.$ucfFieldName, 'XoopsEditorHandler::getInstance()');
487 487
                 $editor = array('name' => "'{$moduleDirname}_editor_{$rpFieldName}'", 'title' => "'{$language}EDITOR_{$stuFieldName}'", 'description' => "'{$language}EDITOR_{$stuFieldName}_DESC'",
488
-                        'formtype' => "'select'", 'valuetype' => "'text'", 'default' => "'dhtml'", 'options' => 'array_flip($editorHandler'.$ucfFieldName.'->getList())', );
488
+                        'formtype' => "'select'", 'valuetype' => "'text'", 'default' => "'dhtml'", 'options' => 'array_flip($editorHandler'.$ucfFieldName.'->getList())',);
489 489
                 $ret .= $uCodeVConfig->getUserModVersion(3, $editor, 'config', '$c');
490 490
                 $ret .= $this->getSimpleString('++$c;');
491 491
             }
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
             $group = $xCodeVConfig->getXcEqualsOperator('$groups[$group] ', '$key');
499 499
             $ret .= $phpCodeVConfig->getPhpCodeForeach('xoopsGroups', false, 'key', 'group', $group);
500 500
             $groups = array('name' => "'groups'", 'title' => "'{$language}GROUPS'", 'description' => "'{$language}GROUPS_DESC'",
501
-                        'formtype' => "'select_multi'", 'valuetype' => "'array'", 'default' => '$groups', 'options' => '$groups', );
501
+                        'formtype' => "'select_multi'", 'valuetype' => "'array'", 'default' => '$groups', 'options' => '$groups',);
502 502
             $ret .= $uCodeVConfig->getUserModVersion(3, $groups, 'config', '$c');
503 503
             $ret .= $this->getSimpleString('++$c;');
504 504
             $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Get Admin groups');
@@ -509,14 +509,14 @@  discard block
 block discarded – undo
509 509
             $adminGroup = $xCodeVConfig->getXcEqualsOperator('$adminGroups[$adminGroup] ', '$key');
510 510
             $ret .= $phpCodeVConfig->getPhpCodeForeach('adminXoopsGroups', false, 'key', 'adminGroup', $adminGroup);
511 511
             $adminGroups = array('name' => "'admin_groups'", 'title' => "'{$language}GROUPS'", 'description' => "'{$language}GROUPS_DESC'",
512
-                        'formtype' => "'select_multi'", 'valuetype' => "'array'", 'default' => '$adminGroups', 'options' => '$adminGroups', );
512
+                        'formtype' => "'select_multi'", 'valuetype' => "'array'", 'default' => '$adminGroups', 'options' => '$adminGroups',);
513 513
             $ret .= $uCodeVConfig->getUserModVersion(3, $adminGroups, 'config', '$c');
514 514
             $ret .= $this->getSimpleString('++$c;');
515 515
         }
516 516
         $keyword = implode(', ', $this->getKeywords());
517 517
         $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Keywords');
518 518
         $arrayKeyword = array('name' => "'keywords'", 'title' => "'{$language}KEYWORDS'", 'description' => "'{$language}KEYWORDS_DESC'",
519
-                        'formtype' => "'textbox'", 'valuetype' => "'text'", 'default' => "'{$moduleDirname}, {$keyword}'", );
519
+                        'formtype' => "'textbox'", 'valuetype' => "'text'", 'default' => "'{$moduleDirname}, {$keyword}'",);
520 520
         $ret .= $uCodeVConfig->getUserModVersion(3, $arrayKeyword, 'config', '$c');
521 521
         $ret .= $this->getSimpleString('++$c;');
522 522
         unset($this->keywords);
@@ -527,80 +527,80 @@  discard block
 block discarded – undo
527 527
         if (in_array(10, $fieldElement) || in_array(11, $fieldElement) || in_array(12, $fieldElement) || in_array(13, $fieldElement) || in_array(14, $fieldElement)) {
528 528
             $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Uploads : maxsize of image');
529 529
             $maxsize = array('name' => "'maxsize'", 'title' => "'{$language}MAXSIZE'", 'description' => "'{$language}MAXSIZE_DESC'",
530
-                'formtype' => "'textbox'", 'valuetype' => "'int'", 'default' => '5000000', );
530
+                'formtype' => "'textbox'", 'valuetype' => "'int'", 'default' => '5000000',);
531 531
             $ret .= $uCodeVConfig->getUserModVersion(3, $maxsize, 'config', '$c');
532 532
             $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Uploads : mimetypes of image');
533 533
             $ret .= $this->getSimpleString('++$c;');
534 534
             $mimetypes = array('name' => "'mimetypes'", 'title' => "'{$language}MIMETYPES'", 'description' => "'{$language}MIMETYPES_DESC'",
535 535
                 'formtype' => "'select_multi'", 'valuetype' => "'array'", 'default' => "array('image/gif', 'image/jpeg', 'image/png')",
536
-                'options' => "array('bmp' => 'image/bmp','gif' => 'image/gif','pjpeg' => 'image/pjpeg', 'jpeg' => 'image/jpeg','jpg' => 'image/jpg','jpe' => 'image/jpe', 'png' => 'image/png')", );
536
+                'options' => "array('bmp' => 'image/bmp','gif' => 'image/gif','pjpeg' => 'image/pjpeg', 'jpeg' => 'image/jpeg','jpg' => 'image/jpg','jpe' => 'image/jpe', 'png' => 'image/png')",);
537 537
             $ret .= $uCodeVConfig->getUserModVersion(3, $mimetypes, 'config', '$c');
538 538
             $ret .= $this->getSimpleString('++$c;');
539 539
         }
540 540
         if (1 == $table->getVar('table_admin')) {
541 541
             $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Admin pager');
542 542
             $adminPager = array('name' => "'adminpager'", 'title' => "'{$language}ADMIN_PAGER'", 'description' => "'{$language}ADMIN_PAGER_DESC'",
543
-                    'formtype' => "'textbox'", 'valuetype' => "'int'", 'default' => '10', );
543
+                    'formtype' => "'textbox'", 'valuetype' => "'int'", 'default' => '10',);
544 544
             $ret .= $uCodeVConfig->getUserModVersion(3, $adminPager, 'config', '$c');
545 545
             $ret .= $this->getSimpleString('++$c;');
546 546
         }
547 547
         if (1 == $table->getVar('table_user')) {
548 548
             $ret .= $phpCodeVConfig->getPhpCodeCommentLine('User pager');
549 549
             $userPager = array('name' => "'userpager'", 'title' => "'{$language}USER_PAGER'", 'description' => "'{$language}USER_PAGER_DESC'",
550
-                    'formtype' => "'textbox'", 'valuetype' => "'int'", 'default' => '10', );
550
+                    'formtype' => "'textbox'", 'valuetype' => "'int'", 'default' => '10',);
551 551
             $ret .= $uCodeVConfig->getUserModVersion(3, $userPager, 'config', '$c');
552 552
             $ret .= $this->getSimpleString('++$c;');
553 553
         }
554 554
         if (1 == $table->getVar('table_tag')) {
555 555
             $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Use tag');
556 556
             $useTag = array('name' => "'usetag'", 'title' => "'{$language}USE_TAG'", 'description' => "'{$language}USE_TAG_DESC'",
557
-                    'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0', );
557
+                    'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0',);
558 558
             $ret .= $uCodeVConfig->getUserModVersion(3, $useTag, 'config', '$c');
559 559
             $ret .= $this->getSimpleString('++$c;');
560 560
         }
561 561
         $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Number column');
562 562
         $numbCol = array('name' => "'numb_col'", 'title' => "'{$language}NUMB_COL'", 'description' => "'{$language}NUMB_COL_DESC'",
563
-                        'formtype' => "'select'", 'valuetype' => "'int'", 'default' => '1', 'options' => "array(1 => '1', 2 => '2', 3 => '3', 4 => '4')", );
563
+                        'formtype' => "'select'", 'valuetype' => "'int'", 'default' => '1', 'options' => "array(1 => '1', 2 => '2', 3 => '3', 4 => '4')",);
564 564
         $ret .= $uCodeVConfig->getUserModVersion(3, $numbCol, 'config', '$c');
565 565
         $ret .= $this->getSimpleString('++$c;');
566 566
         $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Divide by');
567 567
         $divideby = array('name' => "'divideby'", 'title' => "'{$language}DIVIDEBY'", 'description' => "'{$language}DIVIDEBY_DESC'",
568
-                        'formtype' => "'select'", 'valuetype' => "'int'", 'default' => '1', 'options' => "array(1 => '1', 2 => '2', 3 => '3', 4 => '4')", );
568
+                        'formtype' => "'select'", 'valuetype' => "'int'", 'default' => '1', 'options' => "array(1 => '1', 2 => '2', 3 => '3', 4 => '4')",);
569 569
         $ret .= $uCodeVConfig->getUserModVersion(3, $divideby, 'config', '$c');
570 570
         $ret .= $this->getSimpleString('++$c;');
571 571
         $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Table type');
572 572
         $tableType = array('name' => "'table_type'", 'title' => "'{$language}TABLE_TYPE'", 'description' => "'{$language}DIVIDEBY_DESC'",
573
-                        'formtype' => "'select'", 'valuetype' => "'int'", 'default' => "'bordered'", 'options' => "array('bordered' => 'bordered', 'striped' => 'striped', 'hover' => 'hover', 'condensed' => 'condensed')", );
573
+                        'formtype' => "'select'", 'valuetype' => "'int'", 'default' => "'bordered'", 'options' => "array('bordered' => 'bordered', 'striped' => 'striped', 'hover' => 'hover', 'condensed' => 'condensed')",);
574 574
         $ret .= $uCodeVConfig->getUserModVersion(3, $tableType, 'config', '$c');
575 575
         $ret .= $this->getSimpleString('++$c;');
576 576
         $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Panel by');
577 577
         $panelType = array('name' => "'panel_type'", 'title' => "'{$language}PANEL_TYPE'", 'description' => "'{$language}PANEL_TYPE_DESC'",
578
-                        'formtype' => "'select'", 'valuetype' => "'text'", 'default' => "'default'", 'options' => "array('default' => 'default', 'primary' => 'primary', 'success' => 'success', 'info' => 'info', 'warning' => 'warning', 'danger' => 'danger')", );
578
+                        'formtype' => "'select'", 'valuetype' => "'text'", 'default' => "'default'", 'options' => "array('default' => 'default', 'primary' => 'primary', 'success' => 'success', 'info' => 'info', 'warning' => 'warning', 'danger' => 'danger')",);
579 579
         $ret .= $uCodeVConfig->getUserModVersion(3, $panelType, 'config', '$c');
580 580
         $ret .= $this->getSimpleString('++$c;');
581 581
         $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Advertise');
582 582
         $advertise = array('name' => "'advertise'", 'title' => "'{$language}ADVERTISE'", 'description' => "'{$language}ADVERTISE_DESC'",
583
-                        'formtype' => "'textarea'", 'valuetype' => "'text'", 'default' => "''", );
583
+                        'formtype' => "'textarea'", 'valuetype' => "'text'", 'default' => "''",);
584 584
         $ret .= $uCodeVConfig->getUserModVersion(3, $advertise, 'config', '$c');
585 585
         $ret .= $this->getSimpleString('++$c;');
586 586
         $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Bookmarks');
587 587
         $bookmarks = array('name' => "'bookmarks'", 'title' => "'{$language}BOOKMARKS'", 'description' => "'{$language}BOOKMARKS_DESC'",
588
-                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0', );
588
+                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0',);
589 589
         $ret .= $uCodeVConfig->getUserModVersion(3, $bookmarks, 'config', '$c');
590 590
         $ret .= $this->getSimpleString('++$c;');
591 591
         $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Facebook Comments');
592 592
         $facebookComments = array('name' => "'facebook_comments'", 'title' => "'{$language}FACEBOOK_COMMENTS'", 'description' => "'{$language}FACEBOOK_COMMENTS_DESC'",
593
-                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0', );
593
+                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0',);
594 594
         $ret .= $uCodeVConfig->getUserModVersion(3, $facebookComments, 'config', '$c');
595 595
         $ret .= $this->getSimpleString('++$c;');
596 596
         $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Disqus Comments');
597 597
         $disqusComments = array('name' => "'disqus_comments'", 'title' => "'{$language}DISQUS_COMMENTS'", 'description' => "'{$language}DISQUS_COMMENTS_DESC'",
598
-                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0', );
598
+                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0',);
599 599
         $ret .= $uCodeVConfig->getUserModVersion(3, $disqusComments, 'config', '$c');
600 600
         $ret .= $this->getSimpleString('++$c;');
601 601
         $ret .= $phpCodeVConfig->getPhpCodeCommentLine('Maintained by');
602 602
         $maintainedby = array('name' => "'maintainedby'", 'title' => "'{$language}MAINTAINEDBY'", 'description' => "'{$language}MAINTAINEDBY_DESC'",
603
-                        'formtype' => "'textbox'", 'valuetype' => "'text'", 'default' => "'{$module->getVar('mod_support_url')}'", );
603
+                        'formtype' => "'textbox'", 'valuetype' => "'text'", 'default' => "'{$module->getVar('mod_support_url')}'",);
604 604
         $ret .= $uCodeVConfig->getUserModVersion(3, $maintainedby, 'config', '$c');
605 605
         $ret .= $this->getSimpleString('unset($c);');
606 606
 
@@ -638,14 +638,14 @@  discard block
 block discarded – undo
638 638
             case 'category':
639 639
                 $ret .= $phpCodeNType->getPhpCodeCommentLine('Category Notify');
640 640
                 $category = array('name' => "'category'", 'title' => "'{$language}{$stuTableName}_NOTIFY'", 'description' => "'{$language}{$stuTableName}_NOTIFY_DESC'",
641
-                                    'subscribe_from' => "array('index.php',{$notifyFile})", 'item_name' => "'{$item}'", "'allow_bookmark'" => '1', );
641
+                                    'subscribe_from' => "array('index.php',{$notifyFile})", 'item_name' => "'{$item}'", "'allow_bookmark'" => '1',);
642 642
                 $ret .= $uCodeNType->getUserModVersion(3, $category, 'notification', "'{$type}'");
643 643
                 break;
644 644
             case 'event':
645 645
                 $ret .= $phpCodeNType->getPhpCodeCommentLine('Event Notify');
646 646
                 $event = array('name' => "'{$typeOfNotify}'", 'category' => "'{$tableName}'", 'admin_only' => '1', "'title'" => "'{$language}{$stuTableName}_{$stuTypeOfNotify}_NOTIFY'",
647 647
                                 'caption' => "'{$language}{$stuTableName}_{$stuTypeOfNotify}_NOTIFY_CAPTION'", 'description' => "'{$language}{$stuTableName}_{$stuTypeOfNotify}_NOTIFY_DESC'",
648
-                                'mail_template' => "'{$tableName}_{$typeOfNotify}_notify'", 'mail_subject' => "'{$language}{$stuTableName}_{$stuTypeOfNotify}_NOTIFY_SUBJECT'", );
648
+                                'mail_template' => "'{$tableName}_{$typeOfNotify}_notify'", 'mail_subject' => "'{$language}{$stuTableName}_{$stuTypeOfNotify}_NOTIFY_SUBJECT'",);
649 649
                 $ret .= $uCodeNType->getUserModVersion(3, $event, 'notification', "'{$type}'");
650 650
                 break;
651 651
         }
@@ -768,7 +768,7 @@  discard block
 block discarded – undo
768 768
         $implodeFrom = implode(".php', '", $from);
769 769
         $ret = $phpCodeVNG->getPhpCodeCommentLine('Global Notify');
770 770
         $global = array('name' => "'{$name}'", 'title' => "{$language}{$title}_NOTIFY", 'description' => "{$language}{$title}_NOTIFY_DESC",
771
-                        'subscribe_from' => "array('index.php', '{$implodeFrom}.php')", );
771
+                        'subscribe_from' => "array('index.php', '{$implodeFrom}.php')",);
772 772
         $ret .= $uCodeVNG->getUserModVersion(4, $global, 'notification', "'{$type}'", $num);
773 773
 
774 774
         return $ret;
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
         $impFile = implode(".php', '", $file);
795 795
         $ret = $phpCodeVNC->getPhpCodeCommentLine('Category Notify');
796 796
         $global = array('name' => "'{$name}'", 'title' => "{$language}{$title}_NOTIFY", 'description' => "{$language}{$title}_NOTIFY_DESC",
797
-                        'subscribe_from' => "array('{$impFile}.php')", 'item_name' => "'{$item}'", 'allow_bookmark' => "{$allow}", );
797
+                        'subscribe_from' => "array('{$impFile}.php')", 'item_name' => "'{$item}'", 'allow_bookmark' => "{$allow}",);
798 798
         $ret .= $uCodeVNC->getUserModVersion(4, $global, 'notification', "'{$type}'", $num);
799 799
 
800 800
         return $ret;
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
         $ucfTitle = ucfirst($title);
823 823
         $ret = $phpCodeVNTN->getPhpCodeCommentLine($ucfTitle.' Notify');
824 824
         $table = array('name' => "'{$name}'", 'title' => "{$language}{$stuTitle}_NOTIFY", 'description' => "{$language}{$stuTitle}_NOTIFY_DESC",
825
-                        'subscribe_from' => "'{$file}.php'", 'item_name' => "'{$item}'", 'allow_bookmark' => "{$allow}", );
825
+                        'subscribe_from' => "'{$file}.php'", 'item_name' => "'{$item}'", 'allow_bookmark' => "{$allow}",);
826 826
         $ret .= $uCodeVNTN->getUserModVersion(4, $table, 'notification', "'{$type}'", $num);
827 827
 
828 828
         return $ret;
@@ -852,7 +852,7 @@  discard block
 block discarded – undo
852 852
         $ret = $phpCodeVNCC->getPhpCodeCommentLine($ucfTitle.' Notify');
853 853
         $event = array('name' => "'{$name}'", 'category' => "'{$category}'", 'admin_only' => "{$admin}", 'title' => "{$language}{$title}_{$table}_NOTIFY",
854 854
                         'caption' => "{$language}{$title}_{$table}_NOTIFY_CAPTION", 'description' => "{$language}{$title}_{$table}_NOTIFY_DESC",
855
-                        'mail_template' => "'{$mail}'", 'mail_subject' => "{$language}{$title}_{$table}_NOTIFY_SUBJECT", );
855
+                        'mail_template' => "'{$mail}'", 'mail_subject' => "{$language}{$title}_{$table}_NOTIFY_SUBJECT",);
856 856
         $ret .= $uCodeVNCC->getUserModVersion(4, $event, 'notification', "'{$type}'", $num);
857 857
 
858 858
         return $ret;
Please login to merge, or discard this patch.
class/files/sql/SqlFile.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
         // Header Sql Comments
85 85
         $ret = null;
86 86
         $arrayServerInfo = array("# SQL Dump for {$moduleName} module", '# PhpMyAdmin Version: 4.0.4',
87
-                                 '# http://www.phpmyadmin.net', '#', "# Host: {$serverName}",
88
-                                 "# Generated on: {$date} to {$time}", "# Server version: {$serverVersion}",
89
-                                 "# PHP Version: {$phpVersion}\n", );
87
+                                    '# http://www.phpmyadmin.net', '#', "# Host: {$serverName}",
88
+                                    "# Generated on: {$date} to {$time}", "# Server version: {$serverVersion}",
89
+                                    "# PHP Version: {$phpVersion}\n", );
90 90
         foreach ($arrayServerInfo as $serverInfo) {
91 91
             $ret .= $this->getSimpleString($serverInfo);
92 92
         }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     {
109 109
         $ret = null;
110 110
         $arrayDbTable = array('#', "# Structure table for `{$moduleDirname}_{$tableName}` {$fieldsNumb}",
111
-                              '#', "\nCREATE TABLE `{$moduleDirname}_{$tableName}` (", );
111
+                                '#', "\nCREATE TABLE `{$moduleDirname}_{$tableName}` (", );
112 112
         foreach ($arrayDbTable as $dbTable) {
113 113
             $ret .= $this->getSimpleString($dbTable);
114 114
         }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $arrayServerInfo = array("# SQL Dump for {$moduleName} module", '# PhpMyAdmin Version: 4.0.4',
87 87
                                  '# http://www.phpmyadmin.net', '#', "# Host: {$serverName}",
88 88
                                  "# Generated on: {$date} to {$time}", "# Server version: {$serverVersion}",
89
-                                 "# PHP Version: {$phpVersion}\n", );
89
+                                 "# PHP Version: {$phpVersion}\n",);
90 90
         foreach ($arrayServerInfo as $serverInfo) {
91 91
             $ret .= $this->getSimpleString($serverInfo);
92 92
         }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     {
109 109
         $ret = null;
110 110
         $arrayDbTable = array('#', "# Structure table for `{$moduleDirname}_{$tableName}` {$fieldsNumb}",
111
-                              '#', "\nCREATE TABLE `{$moduleDirname}_{$tableName}` (", );
111
+                              '#', "\nCREATE TABLE `{$moduleDirname}_{$tableName}` (",);
112 112
         foreach ($arrayDbTable as $dbTable) {
113 113
             $ret .= $this->getSimpleString($dbTable);
114 114
         }
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
         }
305 305
         // ================= COMMA ================= //
306 306
         for ($i = 0; $i < $j; ++$i) {
307
-            if ($i != $j - 1) {
307
+            if ($i != $j-1) {
308 308
                 $row[] = $comma[$i].',';
309 309
             } else {
310 310
                 $row[] = $comma[$i];
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
         $ret = null;
417 417
         // Comma issue
418 418
         for ($i = 1; $i <= $index; ++$i) {
419
-            if ($i != $index - 1) {
419
+            if ($i != $index-1) {
420 420
                 $ret = $this->getComma(isset($comma[$i]), ',')."\n";
421 421
             } else {
422 422
                 $ret = $this->getComma(isset($comma[$i]))."\n";
Please login to merge, or discard this patch.
class/files/TDMCreateArchitecture.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
         // Creation of 'module_author_logo.gif' file
123 123
         $this->copyFile('assets/images', $copyNewFile, $logoPng);
124 124
         $docs = array('/credits.txt' => 'credits.txt', '/install.txt' => 'install.txt',
125
-                    '/lang.diff' => 'lang.diff', '/license.txt' => 'license.txt', '/readme.txt' => 'readme.txt', );
125
+                    '/lang.diff' => 'lang.diff', '/license.txt' => 'license.txt', '/readme.txt' => 'readme.txt',);
126 126
         foreach ($docs as $k => $v) {
127 127
             // Creation of folder docs and .txt files
128 128
             $this->makeDirAndCopyFile('docs', TDMC_DOCS_PATH.$k, $v);
Please login to merge, or discard this patch.
include/functions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,26 +41,26 @@
 block discarded – undo
41 41
 var hasSelected = false; var selectBox = myform.item[A][amount];for (i = 0; i < selectBox.options.length; i++ ) { if (selectBox.options[i].selected == true && selectBox.options[i].value != \'\') { hasSelected = true; break; } }if (!hasSelected) { window.alert("Please enter Donation Amount"); selectBox.focus(); return false; }return true;
42 42
 }
43 43
 //--></script>
44
-<!-- End Form Validation JavaScript //-->', );
44
+<!-- End Form Validation JavaScript //-->',);
45 45
     $paypalform = array(0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">',
46 46
                                 1 => '<input name="cmd" value="_s-xclick" type="hidden">',
47 47
                                 2 => '<input name="hosted_button_id" value="%s" type="hidden">',
48 48
                                 3 => '<img alt="" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" height="1" border="0" width="1">',
49 49
                                 4 => '<input src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" border="0" type="image">',
50
-                                5 => '</form>', );
50
+                                5 => '</form>',);
51 51
     for ($key = 0; $key <= 4; ++$key) {
52 52
         switch ($key) {
53 53
             case 2:
54
-                $donationform[$key] = sprintf($donationform[$key], $GLOBALS['xoopsConfig']['sitename'].' - '.(strlen($GLOBALS['xoopsUser']->getVar('name')) > 0 ? $GLOBALS['xoopsUser']->getVar('name').' ['.$GLOBALS['xoopsUser']->getVar('uname').']' : $GLOBALS['xoopsUser']->getVar('uname')), $GLOBALS['xoopsUser']->getVar('email'), XOOPS_LICENSE_KEY, strtoupper($GLOBALS['xoopsModule']->getVar('dirname')),  strtoupper($GLOBALS['xoopsModule']->getVar('dirname')).' '.$GLOBALS['xoopsModule']->getVar('name'));
54
+                $donationform[$key] = sprintf($donationform[$key], $GLOBALS['xoopsConfig']['sitename'].' - '.(strlen($GLOBALS['xoopsUser']->getVar('name')) > 0 ? $GLOBALS['xoopsUser']->getVar('name').' ['.$GLOBALS['xoopsUser']->getVar('uname').']' : $GLOBALS['xoopsUser']->getVar('uname')), $GLOBALS['xoopsUser']->getVar('email'), XOOPS_LICENSE_KEY, strtoupper($GLOBALS['xoopsModule']->getVar('dirname')), strtoupper($GLOBALS['xoopsModule']->getVar('dirname')).' '.$GLOBALS['xoopsModule']->getVar('name'));
55 55
                 break;
56 56
         }
57 57
     }
58 58
     $aboutRes = '';
59 59
     $istart = strpos($about, $paypalform[0], 1);
60
-    $iend = strpos($about, $paypalform[5], $istart + 1) + strlen($paypalform[5]) - 1;
61
-    $aboutRes .= substr($about, 0, $istart - 1);
60
+    $iend = strpos($about, $paypalform[5], $istart+1)+strlen($paypalform[5])-1;
61
+    $aboutRes .= substr($about, 0, $istart-1);
62 62
     $aboutRes .= implode("\n", $donationform);
63
-    $aboutRes .= substr($about, $iend + 1, strlen($about) - $iend - 1);
63
+    $aboutRes .= substr($about, $iend+1, strlen($about)-$iend-1);
64 64
 
65 65
     return $aboutRes;
66 66
 }
Please login to merge, or discard this patch.