Rev 326 | Rev 511 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 326 | Rev 360 | ||
---|---|---|---|
Line 47... | Line 47... | ||
47 | case OIDplusConfig::PROTECTION_HIDDEN: |
47 | case OIDplusConfig::PROTECTION_HIDDEN: |
48 | $protected = 1; |
48 | $protected = 1; |
49 | $visible = 0; |
49 | $visible = 0; |
50 | break; |
50 | break; |
51 | default: |
51 | default: |
52 | throw new OIDplusException("Invalid protection flag, use OIDplusConfig::PROTECTION_* constants"); |
52 | throw new OIDplusException(_L('Invalid protection flag, use OIDplusConfig::PROTECTION_* constants')); |
53 | } |
53 | } |
54 | 54 | ||
55 | // Check length limitations given by the database tables |
55 | // Check length limitations given by the database tables |
56 | if (strlen($name) > 50) { |
56 | if (strlen($name) > 50) { |
57 | throw new OIDplusException("Config key name '$name' is too long (max 50)."); |
57 | throw new OIDplusException(_L('Config key name "%1" is too long (max %2).',$name,50)); |
58 | } |
58 | } |
59 | if (strlen($description) > 255) { |
59 | if (strlen($description) > 255) { |
60 | throw new OIDplusException("Description for config key '$name' is too long (max 255)."); |
60 | throw new OIDplusException(_L('Description for config key "%1" is too long (max %2).',$name,255)); |
61 | } |
61 | } |
62 | 62 | ||
63 | // Read all values and descriptions from the database once. |
63 | // Read all values and descriptions from the database once. |
64 | $this->buildConfigArray(); |
64 | $this->buildConfigArray(); |
65 | 65 |