Subversion Repositories oidplus

Rev

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

Rev 1149 Rev 1156
Line 18... Line 18...
18
 */
18
 */
19
 
19
 
20
use ViaThinkSoft\OIDplus\OIDplus;
20
use ViaThinkSoft\OIDplus\OIDplus;
21
use ViaThinkSoft\OIDplus\OIDplusGui;
21
use ViaThinkSoft\OIDplus\OIDplusGui;
22
use ViaThinkSoft\OIDplus\OIDplusException;
22
use ViaThinkSoft\OIDplus\OIDplusException;
23
use ViaThinkSoft\OIDplus\OIDplusNaturalSortedQueryResult;
-
 
24
 
23
 
25
header('Content-Type:text/html; charset=UTF-8');
24
header('Content-Type:text/html; charset=UTF-8');
26
 
25
 
27
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
26
require_once __DIR__ . '/../../../../includes/oidplus.inc.php';
28
 
27
 
Line 58... Line 57...
58
$created[''] = '';
57
$created[''] = '';
59
$updated[''] = '';
58
$updated[''] = '';
60
 
59
 
61
// Now check all OIDs
60
// Now check all OIDs
62
$res = OIDplus::db()->query("select * from ###objects where id like 'oid:%'");
61
$res = OIDplus::db()->query("select * from ###objects where id like 'oid:%'");
63
$res = new OIDplusNaturalSortedQueryResult($res, 'id');
62
$res->naturalSortByField('id');
64
while ($row = $res->fetch_object()) {
63
while ($row = $res->fetch_object()) {
65
        $oid = substr($row->id, strlen('oid:'));
64
        $oid = substr($row->id, strlen('oid:'));
66
        $parent_oid = substr($row->parent, strlen('oid:'));
65
        $parent_oid = substr($row->parent, strlen('oid:'));
67
 
66
 
68
        $dos_ids[$oid] = str_pad(strval($i++), 8, '0', STR_PAD_LEFT);
67
        $dos_ids[$oid] = str_pad(strval($i++), 8, '0', STR_PAD_LEFT);