/dev/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/dev/trunk

« back to all changes in this revision

Viewing changes to setups/katrin/classes/kdbrunidentifier.php

  • Committer: Suren A. Chilingaryan
  • Date: 2010-08-13 14:18:27 UTC
  • Revision ID: csa@dside.dyndns.org-20100813141827-u3o97425ppvd5g7y
Revert back to SetConfiguration from SetCustomProperties while handling certain property in search; trully support HTML content in description field within search results; support execution in XMLModule; support for setup-specific javascript code; KATRIN update

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
// $Id: kdbrunidentifier.php 8097 2010-07-15 09:57:24Z s_voec01 $
3
3
// Author: Sebastian Voecking <sebastian.voecking@uni-muenster.de>
4
4
 
5
 
define("kSystemMainSpec", 0);
6
 
define("kSystemPreSpec", 1);
7
 
define("kSystemInvalid", 2);
 
5
ADEI::RequireClass('KDBConstants', TRUE);
8
6
 
9
7
class KDBRunIdentifier
10
8
{
75
73
        $pattern = '=^(?<system>[a-z]+)(?<run>\d+)(\.(?<subrun>\d+))?=';
76
74
        
77
75
        if (preg_match($pattern, $text, $matches)) {
78
 
            switch ($matches['system']) {
79
 
                case 'kms':
80
 
                    $this->fSystem = kSystemMainSpec;
81
 
                    break;
82
 
                case 'kps':
83
 
                    $this->fSystem = kSystemPreSpec;
84
 
                    break;
85
 
            }
 
76
            try {
 
77
                $this->fSystem =
 
78
                    KDBConstants::OrcaSystemValue($matches['system']);
 
79
            }
 
80
            catch (ADEIException $e) {
 
81
                $this->fSystem = kSystemInvalid;
 
82
            }
 
83
            
86
84
            $this->fRun = (int) $matches['run'];
87
85
            if (array_key_exists('subrun', $matches)) {
88
86
                $this->fSubrun = (int) $matches['subrun'];