コード例 #1
0
 /**
  * change the type of the value field in settings table
  */
 function changeSettingsType()
 {
     include_once "./Services/Administration/classes/class.ilSetting.php";
     $old_type = ilSetting::_getValueType();
     if ($old_type == "clob") {
         $longer_settings = ilSetting::_getLongerSettings();
         if (count($longer_settings)) {
             $this->longer_settings = $longer_settings;
             ilUtil::sendFailure($this->lng->txt("settings_too_long"));
         } else {
             $changed = ilSetting::_changeValueType('text');
         }
     } else {
         $changed = ilSetting::_changeValueType('clob');
     }
     if ($changed) {
         ilUtil::sendInfo($this->lng->txt("settings_type_changed"));
     }
     $this->displayTools();
 }