LoadCustomUploader changes

This commit is contained in:
Jaex 2015-12-22 16:51:47 +02:00
parent 1539d9148d
commit 0be9b2311a
2 changed files with 6 additions and 4 deletions

View file

@ -1739,10 +1739,10 @@ private void PrepareCustomUploaderList()
private void LoadCustomUploader(CustomUploaderItem customUploader)
{
txtCustomUploaderName.Text = customUploader.Name;
txtCustomUploaderName.Text = customUploader.Name ?? "";
cbCustomUploaderRequestType.SelectedIndex = (int)customUploader.RequestType;
txtCustomUploaderRequestURL.Text = customUploader.RequestURL;
txtCustomUploaderRequestURL.Text = customUploader.RequestURL ?? "";
txtCustomUploaderFileForm.Text = customUploader.FileFormName ?? "";
txtCustomUploaderFileForm.Enabled = customUploader.RequestType == CustomUploaderRequestType.POST;
@ -1778,6 +1778,8 @@ private void LoadCustomUploader(CustomUploaderItem customUploader)
lvCustomUploaderRegexps.Items.Add(regexp);
}
}
txtCustomUploaderJsonPath.Text = "";
txtCustomUploaderXPath.Text = "";
txtCustomUploaderURL.Text = customUploader.URL ?? "";
txtCustomUploaderThumbnailURL.Text = customUploader.ThumbnailURL ?? "";

View file

@ -270,12 +270,12 @@ private string ParseURL(string url)
private string ParseRegexSyntax(string syntax)
{
int i = 0;
string regexIndexString = "";
int regexIndex;
bool isGroupRegex = false;
int i;
for (; i < syntax.Length; i++)
for (i = 0; i < syntax.Length; i++)
{
if (char.IsDigit(syntax[i]))
{