Passed
Push — master ( e5334d...a8ea98 )
by Gino
06:21 queued 02:59
created
class/files/user/UserXoopsVersion.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
         $descriptions = array('name' => "{$language}NAME", 'version' => "{$module->getVar('mod_version')}", 'description' => "{$language}DESC",
148 148
                             'author' => "'{$module->getVar('mod_author')}'", 'author_mail' => "'{$module->getVar('mod_author_mail')}'", 'author_website_url' => "'{$module->getVar('mod_author_website_url')}'",
149
-                            'author_website_name' => "'{$module->getVar('mod_author_website_name')}'",'credits' => "'{$module->getVar('mod_credits')}'",'license' => "'{$module->getVar('mod_license')}'",
149
+                            'author_website_name' => "'{$module->getVar('mod_author_website_name')}'", 'credits' => "'{$module->getVar('mod_credits')}'", 'license' => "'{$module->getVar('mod_license')}'",
150 150
                             'license_url' => "'www.gnu.org/licenses/gpl-2.0.html/'", 'help' => "'page=help'", 'release_info' => "'{$module->getVar('mod_release_info')}'",
151 151
                             'release_file' => "XOOPS_URL . '/modules/{$module->getVar('mod_dirname')}/docs/{$module->getVar('mod_release_file')}'", 'release_date' => "'{$date}'",
152 152
                             'manual' => "'{$module->getVar('mod_manual')}'", 'manual_file' => "XOOPS_URL . '/modules/{$module->getVar('mod_dirname')}/docs/{$module->getVar('mod_manual_file')}'",
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                             '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')}'",
158 158
                             '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')}'",
159 159
                             'system_menu' => '1', 'hasAdmin' => $ha, 'hasMain' => $hm, 'adminindex' => "'admin/index.php'", 'adminmenu' => "'admin/menu.php'",
160
-                            'onInstall' => "'include/install.php'", 'onUpdate' => "'include/update.php'", );
160
+                            'onInstall' => "'include/install.php'", 'onUpdate' => "'include/update.php'",);
161 161
 
162 162
         $ret .= $this->usercode->getUserModVersion(1, $descriptions);
163 163
 
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
         $ret = $this->phpcode->getPhpCodeCommentLine("{$ucfTableName}");
451 451
         $blocks = array('file' => "'{$tableName}.php'", 'name' => "{$language}{$stuTableName}_BLOCK_{$stuTableSoleName}", 'description' => "{$language}{$stuTableName}_BLOCK_{$stuTableSoleName}_DESC",
452 452
                         'show_func' => "'b_{$moduleDirname}_{$tableName}_show'", 'edit_func' => "'b_{$moduleDirname}_{$tableName}_edit'",
453
-                        'template' => "'{$moduleDirname}_block_{$tableName}.tpl'", 'options' => "'{$type}|5|25|0'", );
453
+                        'template' => "'{$moduleDirname}_block_{$tableName}.tpl'", 'options' => "'{$type}|5|25|0'",);
454 454
         $ret .= $this->usercode->getUserModVersion(3, $blocks, 'blocks', '$b');
455 455
         $ret .= $this->getSimpleString('++$b;');
456 456
 
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
             $group = $this->xoopscode->getXoopsCodeEqualsOperator('$groups[$group] ', '$key');
500 500
             $ret .= $this->phpcode->getPhpCodeForeach('xoopsGroups', false, 'key', 'group', $group);
501 501
             $groups = array('name' => "'groups'", 'title' => "'{$language}GROUPS'", 'description' => "'{$language}GROUPS_DESC'",
502
-                        'formtype' => "'select_multi'", 'valuetype' => "'array'", 'default' => '$groups', 'options' => '$groups', );
502
+                        'formtype' => "'select_multi'", 'valuetype' => "'array'", 'default' => '$groups', 'options' => '$groups',);
503 503
             $ret .= $this->usercode->getUserModVersion(3, $groups, 'config', '$c');
504 504
             $ret .= $this->getSimpleString('++$c;');
505 505
             $ret .= $this->phpcode->getPhpCodeCommentLine('Get Admin groups');
@@ -510,14 +510,14 @@  discard block
 block discarded – undo
510 510
             $adminGroup = $this->xoopscode->getXoopsCodeEqualsOperator('$adminGroups[$adminGroup] ', '$key');
511 511
             $ret .= $this->phpcode->getPhpCodeForeach('adminXoopsGroups', false, 'key', 'adminGroup', $adminGroup);
512 512
             $adminGroups = array('name' => "'admin_groups'", 'title' => "'{$language}GROUPS'", 'description' => "'{$language}GROUPS_DESC'",
513
-                        'formtype' => "'select_multi'", 'valuetype' => "'array'", 'default' => '$adminGroups', 'options' => '$adminGroups', );
513
+                        'formtype' => "'select_multi'", 'valuetype' => "'array'", 'default' => '$adminGroups', 'options' => '$adminGroups',);
514 514
             $ret .= $this->usercode->getUserModVersion(3, $adminGroups, 'config', '$c');
515 515
             $ret .= $this->getSimpleString('++$c;');
516 516
         }
517 517
         $keyword = implode(', ', $this->getKeywords());
518 518
         $ret .= $this->phpcode->getPhpCodeCommentLine('Keywords');
519 519
         $arrayKeyword = array('name' => "'keywords'", 'title' => "'{$language}KEYWORDS'", 'description' => "'{$language}KEYWORDS_DESC'",
520
-                        'formtype' => "'textbox'", 'valuetype' => "'text'", 'default' => "'{$moduleDirname}, {$keyword}'", );
520
+                        'formtype' => "'textbox'", 'valuetype' => "'text'", 'default' => "'{$moduleDirname}, {$keyword}'",);
521 521
         $ret .= $this->usercode->getUserModVersion(3, $arrayKeyword, 'config', '$c');
522 522
         $ret .= $this->getSimpleString('++$c;');
523 523
         unset($this->keywords);
@@ -525,81 +525,81 @@  discard block
 block discarded – undo
525 525
             if (in_array(array(10, 11, 12, 13, 14), $fieldElement)) {
526 526
                 $ret .= $this->phpcode->getPhpCodeCommentLine('Uploads : maxsize of image');
527 527
                 $maxsize = array('name' => "'maxsize'", 'title' => "'{$language}MAXSIZE'", 'description' => "'{$language}MAXSIZE_DESC'",
528
-                    'formtype' => "'textbox'", 'valuetype' => "'int'", 'default' => '5000000', );
528
+                    'formtype' => "'textbox'", 'valuetype' => "'int'", 'default' => '5000000',);
529 529
                 $ret .= $this->usercode->getUserModVersion(3, $maxsize, 'config', '$c');
530 530
                 $ret .= $this->phpcode->getPhpCodeCommentLine('Uploads : mimetypes of image');
531 531
                 $ret .= $this->getSimpleString('++$c;');
532 532
                 $mimetypes = array('name' => "'mimetypes'", 'title' => "'{$language}MIMETYPES'", 'description' => "'{$language}MIMETYPES_DESC'",
533 533
                     'formtype' => "'select_multi'", 'valuetype' => "'array'", 'default' => "array('image/gif', 'image/jpeg', 'image/png')",
534
-                    'options' => "array('bmp' => 'image/bmp','gif' => 'image/gif','pjpeg' => 'image/pjpeg', 'jpeg' => 'image/jpeg','jpg' => 'image/jpg','jpe' => 'image/jpe', 'png' => 'image/png')", );
534
+                    'options' => "array('bmp' => 'image/bmp','gif' => 'image/gif','pjpeg' => 'image/pjpeg', 'jpeg' => 'image/jpeg','jpg' => 'image/jpg','jpe' => 'image/jpe', 'png' => 'image/png')",);
535 535
                 $ret .= $this->usercode->getUserModVersion(3, $mimetypes, 'config', '$c');
536 536
                 $ret .= $this->getSimpleString('++$c;');
537 537
             }
538 538
             if (1 == $table->getVar('table_admin')) {
539 539
                 $ret .= $this->phpcode->getPhpCodeCommentLine('Admin pager');
540 540
                 $adminPager = array('name' => "'adminpager'", 'title' => "'{$language}ADMIN_PAGER'", 'description' => "'{$language}ADMIN_PAGER_DESC'",
541
-                        'formtype' => "'textbox'", 'valuetype' => "'int'", 'default' => '10', );
541
+                        'formtype' => "'textbox'", 'valuetype' => "'int'", 'default' => '10',);
542 542
                 $ret .= $this->usercode->getUserModVersion(3, $adminPager, 'config', '$c');
543 543
                 $ret .= $this->getSimpleString('++$c;');
544 544
             }
545 545
             if (1 == $table->getVar('table_user')) {
546 546
                 $ret .= $this->phpcode->getPhpCodeCommentLine('User pager');
547 547
                 $userPager = array('name' => "'userpager'", 'title' => "'{$language}USER_PAGER'", 'description' => "'{$language}USER_PAGER_DESC'",
548
-                        'formtype' => "'textbox'", 'valuetype' => "'int'", 'default' => '10', );
548
+                        'formtype' => "'textbox'", 'valuetype' => "'int'", 'default' => '10',);
549 549
                 $ret .= $this->usercode->getUserModVersion(3, $userPager, 'config', '$c');
550 550
                 $ret .= $this->getSimpleString('++$c;');
551 551
             }
552 552
             if (1 == $table->getVar('table_tag')) {
553 553
                 $ret .= $this->phpcode->getPhpCodeCommentLine('Use tag');
554 554
                 $useTag = array('name' => "'usetag'", 'title' => "'{$language}USE_TAG'", 'description' => "'{$language}USE_TAG_DESC'",
555
-                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0', );
555
+                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0',);
556 556
                 $ret .= $this->usercode->getUserModVersion(3, $useTag, 'config', '$c');
557 557
                 $ret .= $this->getSimpleString('++$c;');
558 558
             }
559 559
         }
560 560
         $ret .= $this->phpcode->getPhpCodeCommentLine('Number column');
561 561
         $numbCol = array('name' => "'numb_col'", 'title' => "'{$language}NUMB_COL'", 'description' => "'{$language}NUMB_COL_DESC'",
562
-                        'formtype' => "'select'", 'valuetype' => "'int'", 'default' => '1', 'options' => "array(1 => '1', 2 => '2', 3 => '3', 4 => '4')", );
562
+                        'formtype' => "'select'", 'valuetype' => "'int'", 'default' => '1', 'options' => "array(1 => '1', 2 => '2', 3 => '3', 4 => '4')",);
563 563
         $ret .= $this->usercode->getUserModVersion(3, $numbCol, 'config', '$c');
564 564
         $ret .= $this->getSimpleString('++$c;');
565 565
         $ret .= $this->phpcode->getPhpCodeCommentLine('Divide by');
566 566
         $divideby = array('name' => "'divideby'", 'title' => "'{$language}DIVIDEBY'", 'description' => "'{$language}DIVIDEBY_DESC'",
567
-                        'formtype' => "'select'", 'valuetype' => "'int'", 'default' => '1', 'options' => "array(1 => '1', 2 => '2', 3 => '3', 4 => '4')", );
567
+                        'formtype' => "'select'", 'valuetype' => "'int'", 'default' => '1', 'options' => "array(1 => '1', 2 => '2', 3 => '3', 4 => '4')",);
568 568
         $ret .= $this->usercode->getUserModVersion(3, $divideby, 'config', '$c');
569 569
         $ret .= $this->getSimpleString('++$c;');
570 570
         $ret .= $this->phpcode->getPhpCodeCommentLine('Table type');
571 571
         $tableType = array('name' => "'table_type'", 'title' => "'{$language}DIVIDEBY'", 'description' => "'{$language}DIVIDEBY_DESC'",
572
-                        'formtype' => "'select'", 'valuetype' => "'int'", 'default' => "'bordered'", 'options' => "array('bordered' => 'bordered', 'striped' => 'striped', 'hover' => 'hover', 'condensed' => 'condensed')", );
572
+                        'formtype' => "'select'", 'valuetype' => "'int'", 'default' => "'bordered'", 'options' => "array('bordered' => 'bordered', 'striped' => 'striped', 'hover' => 'hover', 'condensed' => 'condensed')",);
573 573
         $ret .= $this->usercode->getUserModVersion(3, $tableType, 'config', '$c');
574 574
         $ret .= $this->getSimpleString('++$c;');
575 575
         $ret .= $this->phpcode->getPhpCodeCommentLine('Panel by');
576 576
         $panelType = array('name' => "'panel_type'", 'title' => "'{$language}PANEL_TYPE'", 'description' => "'{$language}PANEL_TYPE_DESC'",
577
-                        'formtype' => "'select'", 'valuetype' => "'text'", 'default' => "'default'", 'options' => "array('default' => 'default', 'primary' => 'primary', 'success' => 'success', 'info' => 'info', 'warning' => 'warning', 'danger' => 'danger')", );
577
+                        'formtype' => "'select'", 'valuetype' => "'text'", 'default' => "'default'", 'options' => "array('default' => 'default', 'primary' => 'primary', 'success' => 'success', 'info' => 'info', 'warning' => 'warning', 'danger' => 'danger')",);
578 578
         $ret .= $this->usercode->getUserModVersion(3, $panelType, 'config', '$c');
579 579
         $ret .= $this->getSimpleString('++$c;');
580 580
         $ret .= $this->phpcode->getPhpCodeCommentLine('Panel by');
581 581
         $advertise = array('name' => "'advertise'", 'title' => "'{$language}ADVERTISE'", 'description' => "'{$language}ADVERTISE_DESC'",
582
-                        'formtype' => "'textarea'", 'valuetype' => "'text'", 'default' => "''", );
582
+                        'formtype' => "'textarea'", 'valuetype' => "'text'", 'default' => "''",);
583 583
         $ret .= $this->usercode->getUserModVersion(3, $advertise, 'config', '$c');
584 584
         $ret .= $this->getSimpleString('++$c;');
585 585
         $ret .= $this->phpcode->getPhpCodeCommentLine('Panel by');
586 586
         $bookmarks = array('name' => "'bookmarks'", 'title' => "'{$language}BOOKMARKS'", 'description' => "'{$language}BOOKMARKS_DESC'",
587
-                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0', );
587
+                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0',);
588 588
         $ret .= $this->usercode->getUserModVersion(3, $bookmarks, 'config', '$c');
589 589
         $ret .= $this->getSimpleString('++$c;');
590 590
         $ret .= $this->phpcode->getPhpCodeCommentLine('Facebook Comments');
591 591
         $facebookComments = array('name' => "'facebook_comments'", 'title' => "'{$language}FACEBOOK_COMMENTS'", 'description' => "'{$language}FACEBOOK_COMMENTS_DESC'",
592
-                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0', );
592
+                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0',);
593 593
         $ret .= $this->usercode->getUserModVersion(3, $facebookComments, 'config', '$c');
594 594
         $ret .= $this->getSimpleString('++$c;');
595 595
         $ret .= $this->phpcode->getPhpCodeCommentLine('Disqus Comments');
596 596
         $disqusComments = array('name' => "'disqus_comments'", 'title' => "'{$language}DISQUS_COMMENTS'", 'description' => "'{$language}DISQUS_COMMENTS_DESC'",
597
-                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0', );
597
+                        'formtype' => "'yesno'", 'valuetype' => "'int'", 'default' => '0',);
598 598
         $ret .= $this->usercode->getUserModVersion(3, $disqusComments, 'config', '$c');
599 599
         $ret .= $this->getSimpleString('++$c;');
600 600
         $ret .= $this->phpcode->getPhpCodeCommentLine('Maintained by');
601 601
         $maintainedby = array('name' => "'maintainedby'", 'title' => "'{$language}MAINTAINEDBY'", 'description' => "'{$language}MAINTAINEDBY_DESC'",
602
-                        'formtype' => "'textbox'", 'valuetype' => "'text'", 'default' => "'{$module->getVar('mod_support_url')}'", );
602
+                        'formtype' => "'textbox'", 'valuetype' => "'text'", 'default' => "'{$module->getVar('mod_support_url')}'",);
603 603
         $ret .= $this->usercode->getUserModVersion(3, $maintainedby, 'config', '$c');
604 604
         $ret .= $this->getSimpleString('unset($c);');
605 605
 
@@ -635,14 +635,14 @@  discard block
 block discarded – undo
635 635
             case 'category':
636 636
                 $ret .= $this->phpcode->getPhpCodeCommentLine('Category Notify');
637 637
                 $category = array('name' => "'category'", 'title' => "'{$language}{$stuTableName}_NOTIFY'", 'description' => "'{$language}{$stuTableName}_NOTIFY_DESC'",
638
-                                    'subscribe_from' => "array('index.php',{$notifyFile})", 'item_name' => "'{$item}'", "'allow_bookmark'" => '1', );
638
+                                    'subscribe_from' => "array('index.php',{$notifyFile})", 'item_name' => "'{$item}'", "'allow_bookmark'" => '1',);
639 639
                 $ret .= $this->usercode->getUserModVersion(3, $category, 'notification', "'{$type}'");
640 640
                 break;
641 641
             case 'event':
642 642
                 $ret .= $this->phpcode->getPhpCodeCommentLine('Event Notify');
643 643
                 $event = array('name' => "'{$typeOfNotify}'", 'category' => "'{$tableName}'", 'admin_only' => '1', "'title'" => "'{$language}{$stuTableName}_{$stuTypeOfNotify}_NOTIFY'",
644 644
                                 'caption' => "'{$language}{$stuTableName}_{$stuTypeOfNotify}_NOTIFY_CAPTION'", 'description' => "'{$language}{$stuTableName}_{$stuTypeOfNotify}_NOTIFY_DESC'",
645
-                                'mail_template' => "'{$tableName}_{$typeOfNotify}_notify'", 'mail_subject' => "'{$language}{$stuTableName}_{$stuTypeOfNotify}_NOTIFY_SUBJECT'", );
645
+                                'mail_template' => "'{$tableName}_{$typeOfNotify}_notify'", 'mail_subject' => "'{$language}{$stuTableName}_{$stuTypeOfNotify}_NOTIFY_SUBJECT'",);
646 646
                 $ret .= $this->usercode->getUserModVersion(3, $event, 'notification', "'{$type}'");
647 647
                 break;
648 648
         }
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
         $implodeFrom = implode(".php', '", $from);
762 762
         $ret = $this->phpcode->getPhpCodeCommentLine('Global Notify');
763 763
         $global = array('name' => "'{$name}'", 'title' => "{$language}{$title}_NOTIFY", 'description' => "{$language}{$title}_NOTIFY_DESC",
764
-                        'subscribe_from' => "array('index.php', '{$implodeFrom}.php')", );
764
+                        'subscribe_from' => "array('index.php', '{$implodeFrom}.php')",);
765 765
         $ret .= $this->usercode->getUserModVersion(4, $global, 'notification', "'{$type}'", $num);
766 766
 
767 767
         return $ret;
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
         $impFile = implode(".php', '", $file);
786 786
         $ret = $this->phpcode->getPhpCodeCommentLine('Category Notify');
787 787
         $global = array('name' => "'{$name}'", 'title' => "{$language}{$title}_NOTIFY", 'description' => "{$language}{$title}_NOTIFY_DESC",
788
-                        'subscribe_from' => "array('{$impFile}.php')", 'item_name' => "'{$item}'", 'allow_bookmark' => "{$allow}", );
788
+                        'subscribe_from' => "array('{$impFile}.php')", 'item_name' => "'{$item}'", 'allow_bookmark' => "{$allow}",);
789 789
         $ret .= $this->usercode->getUserModVersion(4, $global, 'notification', "'{$type}'", $num);
790 790
 
791 791
         return $ret;
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
         $ucfTitle = ucfirst($title);
812 812
         $ret = $this->phpcode->getPhpCodeCommentLine($ucfTitle.' Notify');
813 813
         $table = array('name' => "'{$name}'", 'title' => "{$language}{$stuTitle}_NOTIFY", 'description' => "{$language}{$stuTitle}_NOTIFY_DESC",
814
-                        'subscribe_from' => "'{$file}.php'", 'item_name' => "'{$item}'", 'allow_bookmark' => "{$allow}", );
814
+                        'subscribe_from' => "'{$file}.php'", 'item_name' => "'{$item}'", 'allow_bookmark' => "{$allow}",);
815 815
         $ret .= $this->usercode->getUserModVersion(4, $table, 'notification', "'{$type}'", $num);
816 816
 
817 817
         return $ret;
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
         $ret = $this->phpcode->getPhpCodeCommentLine($ucfTitle.' Notify');
840 840
         $event = array('name' => "'{$name}'", 'category' => "'{$category}'", 'admin_only' => "{$admin}", 'title' => "{$language}{$title}_{$table}_NOTIFY",
841 841
                         'caption' => "{$language}{$title}_{$table}_NOTIFY_CAPTION", 'description' => "{$language}{$title}_{$table}_NOTIFY_DESC",
842
-                        'mail_template' => "'{$mail}'", 'mail_subject' => "{$language}{$title}_{$table}_NOTIFY_SUBJECT", );
842
+                        'mail_template' => "'{$mail}'", 'mail_subject' => "{$language}{$title}_{$table}_NOTIFY_SUBJECT",);
843 843
         $ret .= $this->usercode->getUserModVersion(4, $event, 'notification', "'{$type}'", $num);
844 844
 
845 845
         return $ret;
Please login to merge, or discard this patch.