mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 19:02:41 +01:00
8ec987dd2f
Summary: T2381 Test Plan: Click on the ignore link in /config/issue/ and respond to the dialog box. Also, test uninstalling and reinstalling an application in the web UI (to verify that refractoring didn't break anything). Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2381 Differential Revision: https://secure.phabricator.com/D5234
42 lines
1 KiB
PHP
42 lines
1 KiB
PHP
<?php
|
|
|
|
final class PhabricatorConfigEntry extends PhabricatorConfigEntryDAO {
|
|
|
|
protected $id;
|
|
protected $phid;
|
|
protected $namespace;
|
|
protected $configKey;
|
|
protected $value;
|
|
protected $isDeleted;
|
|
|
|
public function getConfiguration() {
|
|
return array(
|
|
self::CONFIG_AUX_PHID => true,
|
|
self::CONFIG_SERIALIZATION => array(
|
|
'value' => self::SERIALIZATION_JSON,
|
|
),
|
|
) + parent::getConfiguration();
|
|
}
|
|
|
|
public function generatePHID() {
|
|
return PhabricatorPHID::generateNewPHID(
|
|
PhabricatorPHIDConstants::PHID_TYPE_CONF);
|
|
}
|
|
|
|
public static function loadConfigEntry($key) {
|
|
$config_entry = id(new PhabricatorConfigEntry())
|
|
->loadOneWhere(
|
|
'configKey = %s AND namespace = %s',
|
|
$key,
|
|
'default');
|
|
|
|
if (!$config_entry) {
|
|
$config_entry = id(new PhabricatorConfigEntry())
|
|
->setConfigKey($key)
|
|
->setNamespace('default');
|
|
}
|
|
|
|
return $config_entry;
|
|
}
|
|
|
|
}
|