Example #1
0
        private void TraceUploadEventHandler(TraceListenerUploadableBase sender, ref bool success)
        {
            ValidateUploadProfile();
            UploadHandlerReturnVal retval = UploadHandler(sender, LoggingSettings.Settings.LogTitle,
                                                          LoggingSettings.Settings.WikifiedCategory, LoggingSettings.Settings.GlobbedUploadLocation + "/" +
                                                          sender.PageName.Replace(LoggingSettings.Props.ConUploadCategoryIsJobName,
                                                                                  LoggingSettings.Settings.Category), LoggingSettings.Settings.LinksToLog(),
                                                          LoggingSettings.Settings.UploadOpenInBrowser, LoggingSettings.Settings.UploadAddToWatchlist,
                                                          Variables.User.Name, Variables.AWBVersionString(Program.AWB.AWBVersionString) +
                                                          Plugins.Plugin.GetPluginsWikiTextBlock(), Variables.AWBLoggingEditSummary +
                                                          Variables.UploadingLogDefaultEditSummary, Variables.AWBLoggingEditSummary +
                                                          Variables.UploadingLogEntryDefaultEditSummary, Program.AWB, LoggingSettings.LoginDetails);

            success = retval.Success;

            if (success)
            {
                ((TraceStatus)sender.TraceStatus).UploadsCount += 1;
            }

            if (LoggingSettings.Settings.DebugUploading)
            {
                WriteUploadLog(retval.PageRetVals, LogFolder);
            }
        }