This file is indexed.

/usr/share/php/tests/Horde_Share/Horde/Share/migration/sqlng.php is in php-horde-share 2.0.4-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php

function migrate_sqlng($db)
{
    $migration = new Horde_Db_Migration_Base($db);

    /* Cleanup potential left-overs. */
    try {
        $migration->dropTable('test_shares');
        $migration->dropTable('test_shares_groups');
        $migration->dropTable('test_shares_users');
    } catch (Horde_Db_Exception $e) {
    }

    $t = $migration->createTable('test_shares', array('autoincrementKey' => 'share_id'));
    $t->column('share_name', 'string', array('limit' => 255, 'null' => false));
    $t->column('share_owner', 'string', array('limit' => 255));
    $t->column('share_parents', 'text');
    $t->column('share_flags', 'integer', array('default' => 0, 'null' => false));
    $t->column('perm_creator_' . Horde_Perms::SHOW, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_creator_' . Horde_Perms::READ, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_creator_' . Horde_Perms::EDIT, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_creator_' . Horde_Perms::DELETE, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_default_' . Horde_Perms::SHOW, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_default_' . Horde_Perms::READ, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_default_' . Horde_Perms::EDIT, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_default_' . Horde_Perms::DELETE, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_guest_' . Horde_Perms::SHOW, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_guest_' . Horde_Perms::READ, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_guest_' . Horde_Perms::EDIT, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_guest_' . Horde_Perms::DELETE, 'boolean', array('default' => false, 'null' => false));
    $t->column('attribute_name', 'string', array('limit' => 255));
    $t->column('attribute_desc', 'string', array('limit' => 255));
    $t->end();

    $migration->addIndex('test_shares', array('share_name'));
    $migration->addIndex('test_shares', array('share_owner'));
    $migration->addIndex('test_shares', array('perm_creator_' . Horde_Perms::SHOW));
    $migration->addIndex('test_shares', array('perm_creator_' . Horde_Perms::READ));
    $migration->addIndex('test_shares', array('perm_creator_' . Horde_Perms::EDIT));
    $migration->addIndex('test_shares', array('perm_creator_' . Horde_Perms::DELETE));
    $migration->addIndex('test_shares', array('perm_default_' . Horde_Perms::SHOW));
    $migration->addIndex('test_shares', array('perm_default_' . Horde_Perms::READ));
    $migration->addIndex('test_shares', array('perm_default_' . Horde_Perms::EDIT));
    $migration->addIndex('test_shares', array('perm_default_' . Horde_Perms::DELETE));
    $migration->addIndex('test_shares', array('perm_guest_' . Horde_Perms::SHOW));
    $migration->addIndex('test_shares', array('perm_guest_' . Horde_Perms::READ));
    $migration->addIndex('test_shares', array('perm_guest_' . Horde_Perms::EDIT));
    $migration->addIndex('test_shares', array('perm_guest_' . Horde_Perms::DELETE));

    $t = $migration->createTable('test_shares_groups');
    $t->column('share_id', 'integer', array('null' => false));
    $t->column('group_uid', 'string', array('limit' => 255, 'null' => false));
    $t->column('perm_' . Horde_Perms::SHOW, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_' . Horde_Perms::READ, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_' . Horde_Perms::EDIT, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_' . Horde_Perms::DELETE, 'boolean', array('default' => false, 'null' => false));
    $t->end();

    $migration->addIndex('test_shares_groups', array('share_id'));
    $migration->addIndex('test_shares_groups', array('group_uid'));
    $migration->addIndex('test_shares_groups', array('perm_' . Horde_Perms::SHOW));
    $migration->addIndex('test_shares_groups', array('perm_' . Horde_Perms::READ));
    $migration->addIndex('test_shares_groups', array('perm_' . Horde_Perms::EDIT));
    $migration->addIndex('test_shares_groups', array('perm_' . Horde_Perms::DELETE));

    $t = $migration->createTable('test_shares_users');
    $t->column('share_id', 'integer', array('null' => false));
    $t->column('user_uid', 'string', array('limit' => 255));
    $t->column('perm_' . Horde_Perms::SHOW, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_' . Horde_Perms::READ, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_' . Horde_Perms::EDIT, 'boolean', array('default' => false, 'null' => false));
    $t->column('perm_' . Horde_Perms::DELETE, 'boolean', array('default' => false, 'null' => false));
    $t->end();

    $migration->addIndex('test_shares_users', array('share_id'));
    $migration->addIndex('test_shares_users', array('user_uid'));
    $migration->addIndex('test_shares_users', array('perm_' . Horde_Perms::SHOW));
    $migration->addIndex('test_shares_users', array('perm_' . Horde_Perms::READ));
    $migration->addIndex('test_shares_users', array('perm_' . Horde_Perms::EDIT));
    $migration->addIndex('test_shares_users', array('perm_' . Horde_Perms::DELETE));

    $migration->migrate('up');
}