Extcal_2_15   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 21
dl 0
loc 38
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 31 1
1
<?php
2
/*
3
 * You may not change or alter any portion of this comment or credits
4
 * of supporting developers from this source code or any supporting source code
5
 * which is considered copyrighted (c) material of the original comment or credit authors.
6
 *
7
 * This program is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
 */
11
12
/**
13
 * @copyright    {@link https://xoops.org/ XOOPS Project}
14
 * @license      {@link https://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later}
15
 * @package      extcal
16
 * @since
17
 * @author       XOOPS Development Team,
18
 * @author       JJDai <http://xoops.kiolo.com>
19
 */
20
//----------------------------------------------------
21
class Extcal_2_15
22
{
23
    //----------------------------------------------------
24
    /**
25
     * @param \XoopsModule $module
26
     * @param              $options
27
     */
28
    public function __construct(\XoopsModule $module, $options)
0 ignored issues
show
Unused Code introduced by
The parameter $options is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

28
    public function __construct(\XoopsModule $module, /** @scrutinizer ignore-unused */ $options)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $module is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

28
    public function __construct(/** @scrutinizer ignore-unused */ \XoopsModule $module, $options)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
29
    {
30
        global $xoopsDB;
31
32
        //$xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
33
        $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
34
35
        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . "` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;";
36
        $xoopsDB->query($sql);
37
38
        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;';
39
        $xoopsDB->query($sql);
40
41
        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` ';
42
        $xoopsDB->query($sql);
43
44
        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;';
45
        $xoopsDB->query($sql);
46
47
        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;';
48
        $xoopsDB->query($sql);
49
50
        $sql = 'CREATE TABLE `'
51
               . $xoopsDB->prefix('extcal_event')
52
               . "` (`eventnotmember_id` INT(11) NOT NULL AUTO_INCREMENT,`event_id` INT(11) NOT NULL DEFAULT '0',`uid` INT(11) NOT NULL DEFAULT '0',PRIMARY KEY  (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;";
53
        $xoopsDB->query($sql);
54
55
        $sql = 'CREATE TABLE `'
56
               . $xoopsDB->prefix('extcal_file')
57
               . "` (`file_id` INT(11) NOT NULL AUTO_INCREMENT,`file_name` VARCHAR(255) NOT NULL,`file_nicename` VARCHAR(255) NOT NULL,`file_mimetype` VARCHAR(255) NOT NULL,`file_size` INT(11) NOT NULL,`file_download` INT(11) NOT NULL,`file_date` INT(11) NOT NULL,`file_approved` TINYINT(1) NOT NULL,`event_id` INT(11) NOT NULL,`uid` INT(11) NOT NULL,PRIMARY KEY  (`file_id`)) COMMENT='eXtcal By Zoullou' ;";
58
        $xoopsDB->query($sql);
59
    }
60
    //-----------------------------------------------------------------
61
}   // fin de la classe
62