original_string: private static function force_enable_settings(restore_controller $controller, array $settings) {
          $plan = $controller->get_plan();
          foreach ($settings as $config => $settingname) {
              $value = true;
              if ($plan->setting_exists($settingname)) {
                  $setting = $plan->get_setting($settingname);
                  // We do not allow this setting to be locked for a duplicate function.
                  if ($setting->get_status() !== base_setting::NOT_LOCKED) {
                      $setting->set_status(base_setting::NOT_LOCKED);
                  }
                  $setting->set_value($value);
                  $setting->set_status(base_setting::LOCKED_BY_CONFIG);
              } else {
                  $controller->log('Unknown setting: ' . $settingname, BACKUP::LOG_DEBUG);
              }
          }
      }
code: private static function force_enable_settings(restore_controller $controller, array $settings) {
          $plan = $controller->get_plan();
          foreach ($settings as $config => $settingname) {
              $value = true;
              if ($plan->setting_exists($settingname)) {
                  $setting = $plan->get_setting($settingname);
                  // We do not allow this setting to be locked for a duplicate function.
                  if ($setting->get_status() !== base_setting::NOT_LOCKED) {
                      $setting->set_status(base_setting::NOT_LOCKED);
                  }
                  $setting->set_value($value);
                  $setting->set_status(base_setting::LOCKED_BY_CONFIG);
              } else {
                  $controller->log('Unknown setting: ' . $settingname, BACKUP::LOG_DEBUG);
              }
          }
      }
code_tokens: private static function force_enable_settings ( restore_controller $ controller , array $ settings ) { $ plan = $ controller -> get_plan ( ) ; foreach ( $ settings as $ config => $ settingname ) { $ value = true ; if ( $ plan -> setting_exists ( $ settingname ) ) { $ setting = $ plan -> get_setting ( $ settingname ) ; // We do not allow this setting to be locked for a duplicate function. if ( $ setting -> get_status ( ) !== base_setting :: NOT_LOCKED ) { $ setting -> set_status ( base_setting :: NOT_LOCKED ) ; } $ setting -> set_value ( $ value ) ; $ setting -> set_status ( base_setting :: LOCKED_BY_CONFIG ) ; } else { $ controller -> log ( 'Unknown setting: ' . $ settingname , BACKUP :: LOG_DEBUG ) ; } } }
docstring: Turn these settings on. No defaults from admin settings.
  
  @param restore_controller $controller
  @param array $settings a map from admin config names to setting names (Config name => Setting name)
docstring_tokens: Turn these settings on . No defaults from admin settings .