Exemplo n.º 1
0
 /**
  * Record a log entry on the stability config change action
  * @param Title $title
  * @param array $config
  * @param array $oldConfig
  * @param string $reason
  */
 public static function updateStabilityLog(Title $title, array $config, array $oldConfig, $reason)
 {
     $log = new LogPage('stable');
     if (FRPageConfig::configIsReset($config)) {
         # We are going back to default settings
         $log->addEntry('reset', $title, $reason);
     } else {
         # We are changing to non-default settings
         $action = $oldConfig === FRPageConfig::getDefaultVisibilitySettings() ? 'config' : 'modify';
         // modified an existing custom configuration
         $log->addEntry($action, $title, $reason, FlaggedRevsLog::collapseParams(self::stabilityLogParams($config)));
     }
 }