/dev/adei-asec

To get this branch, use:
bzr branch http://darksoft.org/webbzr/dev/adei-asec

« back to all changes in this revision

Viewing changes to setups/katrin/classes/readers/katrindbreader.php

  • Committer: Suren A. Chilingaryan
  • Date: 2014-01-25 16:38:03 UTC
  • Revision ID: csa@dside.dyndns.org-20140125163803-mhmpyk4dpzz7qabw
Detach setups

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
 
3
 
class KATRINDBReader extends DBReader {
4
 
/*
5
 
 function __construct(&$props) {
6
 
    parent::__construct($props);
7
 
 }
8
 
*/
9
 
 
10
 
 function GetDatabaseList($flags = 0) {
11
 
    $filter = $this->GetDatabaseFilter($flags);
12
 
    $res = $this->SortDatabaseList($this->db->GetDatabaseList($filter));
13
 
    
14
 
    foreach ($res as &$item) {
15
 
        if (preg_match("/(.*)[._](\d{8})$/", $item['name'], $m)) {
16
 
//          $item['name'] = gettext($m[1]) . ", " . translate("Archive of %s", $m[2]);
17
 
            $item['name'] = translate("%s Archive", $m[2]);
18
 
       } else {
19
 
            $item['name'] = gettext($item['name']);
20
 
       }
21
 
    }
22
 
 
23
 
    return $res;
24
 
 }
25
 
 
26
 
 
27
 
 function GetItemList(LOGGROUP $grp = NULL, MASK $mask = NULL, $flags = 0) {
28
 
    $list = parent::GetItemList($grp, $mask, $flags);
29
 
//    return $list;    
30
 
    foreach ($list as &$item) {
31
 
        if ((isset($item['uid']))&&(strcmp($item['name'], $item['uid']))) {
32
 
            $item['name'] = "{$item['name']} [{$item['uid']}]";
33
 
        }
34
 
    }
35
 
    
36
 
    return $list;
37
 
 }
38
 
 
39
 
}
40
 
 
41
 
 
42
 
?>
 
 
b'\\ No newline at end of file'