Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1169480
configuration_validator.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Sep 26, 12:41 AM
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Sep 28, 12:41 AM (1 d, 13 h)
Engine
blob
Format
Raw Data
Handle
757628
Attached To
rINP In-Portal
configuration_validator.php
View Options
<?php
/**
* @version $Id: configuration_validator.php 15551 2012-09-30 12:10:25Z alex $
* @package In-Portal
* @copyright Copyright (C) 1997 - 2012 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
defined
(
'FULL_PATH'
)
or
die
(
'restricted access!'
);
class
ConfigurationValidator
extends
kValidator
{
/**
* Set's field error, if pseudo passed not found then create it with message text supplied.
* Don't overwrite existing pseudo translation.
*
* @param string $field
* @param string $pseudo
* @param string $error_label
* @param Array $error_params
*
* @return bool
* @access public
*/
public
function
SetError
(
$field
,
$pseudo
,
$error_label
=
null
,
$error_params
=
null
)
{
if
(
!
parent
::
SetError
(
$field
,
$pseudo
,
$error_label
,
$error_params
)
)
{
// this field already has an error -> don't overwrite it
return
false
;
}
if
(
$field
==
'VariableValue'
)
{
$item_prefix
=
$this
->
dataSource
->
getPrefixSpecial
();
$list_errors
=
$this
->
Application
->
GetVar
(
'errors_'
.
$item_prefix
,
Array
());
$list_errors
[
$this
->
dataSource
->
GetDBField
(
'VariableName'
)]
=
$this
->
GetErrorMsg
(
$field
,
false
);
$this
->
Application
->
SetVar
(
'errors_'
.
$item_prefix
,
$list_errors
);
}
return
true
;
}
}
Event Timeline
Log In to Comment