GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — integration (#2604)
by Brendan
05:28
created

migration_233::getReleaseNotes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 2
c 1
b 1
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
namespace SymphonyCms\Installer\Migrations;
3
4
use SymphonyCms\Installer\Lib\Migration;
5
use Symphony;
6
7
class migration_233 extends Migration
8
{
9
    public static function getVersion()
10
    {
11
        return '2.3.3';
12
    }
13
14
    public static function getReleaseNotes()
15
    {
16
        return 'http://getsymphony.com/download/releases/version/2.3.3/';
17
    }
18
19
    public static function upgrade()
20
    {
21 View Code Duplication
        if (version_compare(self::$existing_version, '2.3.3beta1', '<=')) {
22
            // Update DB for the new author role #1692
23
            Symphony::Database()->query(
24
                "ALTER TABLE `tbl_authors` CHANGE `user_type` `user_type` ENUM('author', 'manager', 'developer') DEFAULT 'author'"
25
            );
26
27
            // Remove directory from the upload fields, #1719
28
            $upload_tables = Symphony::Database()->fetchCol(
29
                "field_id",
30
                "SELECT `field_id` FROM `tbl_fields_upload`"
31
            );
32
33
            if (is_array($upload_tables) && !empty($upload_tables)) {
34
                foreach ($upload_tables as $field) {
35
                    Symphony::Database()->query(sprintf(
36
                        "UPDATE tbl_entries_data_%d SET FILE = substring_index(FILE, '/', -1)",
37
                        $field
38
                    ));
39
                }
40
            }
41
        }
42
43
        if (version_compare(self::$existing_version, '2.3.3beta2', '<=')) {
44
            // Update rows for associations
45
            if (!Symphony::Configuration()->get('association_maximum_rows', 'symphony')) {
46
                Symphony::Configuration()->set('association_maximum_rows', '5', 'symphony');
47
            }
48
        }
49
50
        // Update the version information
51
        return parent::upgrade();
52
    }
53
54
    public static function preUpdateNotes()
55
    {
56
        return array(
57
            __("On update, all files paths will be removed from the core Upload field entry tables. If you are using an Upload field extension, ensure that the extension is compatible with this release before continuing.")
58
        );
59
    }
60
}
61