Exemple #1
0
 /**
  * @see PKPPlugin::getSetting()
  * @param $journalId string
  * @param $settingName string
  */
 function getSetting($journalId, $settingName)
 {
     // if there isn't a journal_uuid, make one
     if ($settingName == 'journal_uuid') {
         $uuid = parent::getSetting($journalId, $settingName);
         if ($uuid) {
             return $uuid;
         }
         $this->updateSetting($journalId, $settingName, $this->newUUID());
     }
     return parent::getSetting($journalId, $settingName);
 }
 /**
  * @see PKPPlugin::getSetting()
  * @param $journalId int
  * @param $settingName string
  */
 function getSetting($journalId, $settingName)
 {
     // if there isn't a journal_uuid, make one
     switch ($settingName) {
         case 'journal_uuid':
             $uuid = parent::getSetting($journalId, $settingName);
             if (!is_null($uuid) && $uuid != '') {
                 return $uuid;
             }
             $this->updateSetting($journalId, $settingName, $this->newUUID());
             break;
         case 'pln_network':
             $network = parent::getSetting($journalId, 'pln_network');
             if ($network) {
                 return $network;
             }
             $network = Config::getVar('lockss', 'pln_url', PLN_DEFAULT_NETWORK);
             $this->updateSetting($journalId, 'pln_network', $network);
             break;
         default:
             break;
     }
     return parent::getSetting($journalId, $settingName);
 }