Subversion Repositories oidplus

Rev

Rev 756 | Rev 963 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 756 Rev 757
Line 21... Line 21...
21
 
21
 
22
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
22
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
23
 
23
 
24
set_exception_handler(array('OIDplusGui', 'html_exception_handler'));
24
set_exception_handler(array('OIDplusGui', 'html_exception_handler'));
25
 
25
 
26
ob_start(); // allow cookie headers to be sent
26
@set_time_limit(0);
27
 
27
 
28
OIDplus::init(true);
28
OIDplus::init(true);
29
 
29
 
30
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPageAdminNostalgia', false)) {
30
if (OIDplus::baseConfig()->getValue('DISABLE_PLUGIN_OIDplusPageAdminNostalgia', false)) {
31
        throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
31
        throw new OIDplusException(_L('This plugin was disabled by the system administrator!'));
Line 43... Line 43...
43
$parent_oids = array();
43
$parent_oids = array();
44
$i = 0;
44
$i = 0;
45
$dos_ids[''] = '00000000';
45
$dos_ids[''] = '00000000';
46
$parent_oids[''] = '';
46
$parent_oids[''] = '';
47
 
47
 
48
$dos_ids[''] = str_pad($i++, 8, '0', STR_PAD_LEFT);
48
$dos_ids[''] = str_pad(strval($i++), 8, '0', STR_PAD_LEFT);
49
$res = OIDplus::db()->query("select * from ###objects where id like 'oid:%' order by ".OIDplus::db()->natOrder('id'));
49
$res = OIDplus::db()->query("select * from ###objects where id like 'oid:%' order by ".OIDplus::db()->natOrder('id'));
50
while ($row = $res->fetch_object()) {
50
while ($row = $res->fetch_object()) {
51
        $oid = substr($row->id, strlen('oid:'));
51
        $oid = substr($row->id, strlen('oid:'));
52
        $parent_oid = substr($row->parent, strlen('oid:'));
52
        $parent_oid = substr($row->parent, strlen('oid:'));
53
        $dos_ids[$oid] = str_pad($i++, 8, '0', STR_PAD_LEFT);
53
        $dos_ids[$oid] = str_pad(strval($i++), 8, '0', STR_PAD_LEFT);
54
        if ($parent_oid == '') {
54
        if ($parent_oid == '') {
55
                $parent_oids[$oid] = '';
55
                $parent_oids[$oid] = '';
56
        } else {
56
        } else {
57
                $parent_oids[$oid] = $parent_oid;
57
                $parent_oids[$oid] = $parent_oid;
58
        }
58
        }