Skip to content

Commit 9ff8126

Browse files
committed
6.12
1 parent 39bfff8 commit 9ff8126

File tree

169 files changed

+2868
-2200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+2868
-2200
lines changed

SiteServer.BackgroundPages/Ajax/AjaxBackupService.cs

+14-14
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ public void Page_Load(object sender, EventArgs e)
7474
{
7575
var type = Request.QueryString["type"];
7676
var userKeyPrefix = Request["userKeyPrefix"];
77-
var retval = new NameValueCollection();
77+
var retVal = new NameValueCollection();
7878
var request = new AuthenticatedRequest();
7979

8080
if (type == TypeBackup)
8181
{
8282
var siteId = TranslateUtils.ToInt(Request.Form["siteID"]);
8383
var backupType = Request.Form["backupType"];
84-
retval = Backup(siteId, backupType, userKeyPrefix);
84+
retVal = Backup(siteId, backupType, userKeyPrefix);
8585
}
8686
else if (type == TypeRecovery)
8787
{
@@ -93,18 +93,18 @@ public void Page_Load(object sender, EventArgs e)
9393
var path = Request.Form["path"];
9494
var isOverride = TranslateUtils.ToBool(Request.Form["isOverride"]);
9595
var isUseTable = TranslateUtils.ToBool(Request.Form["isUseTable"]);
96-
retval = Recovery(siteId, isDeleteChannels, isDeleteTemplates, isDeleteFiles, isZip, path, isOverride, isUseTable, userKeyPrefix, request);
96+
retVal = Recovery(siteId, isDeleteChannels, isDeleteTemplates, isDeleteFiles, isZip, path, isOverride, isUseTable, userKeyPrefix, request);
9797
}
9898

99-
var jsonString = TranslateUtils.NameValueCollectionToJsonString(retval);
99+
var jsonString = TranslateUtils.NameValueCollectionToJsonString(retVal);
100100
Page.Response.Write(jsonString);
101101
Page.Response.End();
102102
}
103103

104104
public NameValueCollection Backup(int siteId, string backupType, string userKeyPrefix)
105105
{
106106
//返回“运行结果”和“错误信息”的字符串数组
107-
NameValueCollection retval;
107+
NameValueCollection retVal;
108108
var request = new AuthenticatedRequest(Request);
109109

110110
try
@@ -136,40 +136,40 @@ public NameValueCollection Backup(int siteId, string backupType, string userKeyP
136136
string resultString =
137137
$"任务完成,备份地址:<br /><strong> {filePath} </strong>&nbsp;<a href='{ApiRouteActionsDownload.GetUrl(ApiManager.InnerApiUrl, filePath)}'><img src='{SiteServerAssets.GetIconUrl("download.gif")}' />下载</a>。";
138138

139-
retval = AjaxManager.GetWaitingTaskNameValueCollection(resultString, string.Empty, string.Empty);
139+
retVal = AjaxManager.GetWaitingTaskNameValueCollection(resultString, string.Empty, string.Empty);
140140
}
141141
catch (Exception ex)
142142
{
143-
retval = AjaxManager.GetWaitingTaskNameValueCollection(string.Empty, ex.Message, string.Empty);
143+
retVal = AjaxManager.GetWaitingTaskNameValueCollection(string.Empty, ex.Message, string.Empty);
144144
LogUtils.AddErrorLog(ex);
145145
}
146146

147-
return retval;
147+
return retVal;
148148
}
149149

150150
public NameValueCollection Recovery(int siteId, bool isDeleteChannels, bool isDeleteTemplates, bool isDeleteFiles, bool isZip, string path, bool isOverride, bool isUseTable, string userKeyPrefix, AuthenticatedRequest request)
151151
{
152152
//返回“运行结果”和“错误信息”的字符串数组
153-
NameValueCollection retval;
153+
NameValueCollection retVal;
154154

155155
try
156156
{
157157
BackupUtility.RecoverySite(siteId, isDeleteChannels, isDeleteTemplates, isDeleteFiles, isZip, PageUtils.UrlDecode(path), isOverride, isUseTable, request.AdminName);
158158

159159
request.AddSiteLog(siteId, "恢复备份数据", request.AdminName);
160160

161-
retval = AjaxManager.GetWaitingTaskNameValueCollection("数据恢复成功!", string.Empty, string.Empty);
161+
retVal = AjaxManager.GetWaitingTaskNameValueCollection("数据恢复成功!", string.Empty, string.Empty);
162162

163-
//retval = new string[] { "数据恢复成功!", string.Empty, string.Empty };
163+
//retVal = new string[] { "数据恢复成功!", string.Empty, string.Empty };
164164
}
165165
catch (Exception ex)
166166
{
167-
//retval = new string[] { string.Empty, ex.Message, string.Empty };
168-
retval = AjaxManager.GetWaitingTaskNameValueCollection(string.Empty, ex.Message, string.Empty);
167+
//retVal = new string[] { string.Empty, ex.Message, string.Empty };
168+
retVal = AjaxManager.GetWaitingTaskNameValueCollection(string.Empty, ex.Message, string.Empty);
169169
LogUtils.AddErrorLog(ex);
170170
}
171171

172-
return retval;
172+
return retVal;
173173
}
174174
}
175175
}

SiteServer.BackgroundPages/Ajax/AjaxCmsService.cs

+10-10
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public void Page_Load(object sender, EventArgs e)
147147

148148
public string GetTitles(int siteId, int channelId, string title)
149149
{
150-
var retval = new StringBuilder();
150+
var retVal = new StringBuilder();
151151

152152
var siteInfo = SiteManager.GetSiteInfo(siteId);
153153
var tableName = ChannelManager.GetTableName(siteInfo, channelId);
@@ -157,31 +157,31 @@ public string GetTitles(int siteId, int channelId, string title)
157157
{
158158
foreach (var value in titleList)
159159
{
160-
retval.Append(value);
161-
retval.Append("|");
160+
retVal.Append(value);
161+
retVal.Append("|");
162162
}
163-
retval.Length -= 1;
163+
retVal.Length -= 1;
164164
}
165165

166-
return retval.ToString();
166+
return retVal.ToString();
167167
}
168168

169169
public string GetTags(int siteId, string tag)
170170
{
171-
var retval = new StringBuilder();
171+
var retVal = new StringBuilder();
172172

173173
var tagList = DataProvider.TagDao.GetTagListByStartString(siteId, tag, 10);
174174
if (tagList.Count > 0)
175175
{
176176
foreach (var value in tagList)
177177
{
178-
retval.Append(value);
179-
retval.Append("|");
178+
retVal.Append(value);
179+
retVal.Append("|");
180180
}
181-
retval.Length -= 1;
181+
retVal.Length -= 1;
182182
}
183183

184-
return retval.ToString();
184+
return retVal.ToString();
185185
}
186186
}
187187
}

SiteServer.BackgroundPages/Ajax/AjaxCreateService.cs

+21-21
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ public void Page_Load(object sender, EventArgs e)
5353
{
5454
var type = Request.QueryString["type"];
5555
var userKeyPrefix = Request["userKeyPrefix"];
56-
var retval = new NameValueCollection();
56+
var retVal = new NameValueCollection();
5757
var request = new AuthenticatedRequest();
5858

5959
if (type == TypeGetCountArray)
6060
{
61-
retval = GetCountArray(userKeyPrefix);
61+
retVal = GetCountArray(userKeyPrefix);
6262
}
6363

6464
if (type == TypeCreateSite)
@@ -71,35 +71,35 @@ public void Page_Load(object sender, EventArgs e)
7171

7272
if (!string.IsNullOrEmpty(siteTemplateDir))
7373
{
74-
retval = CreateSiteBySiteTemplateDir(siteId, isImportContents, isImportTableStyles, siteTemplateDir, userKeyPrefix, request.AdminName);
74+
retVal = CreateSiteBySiteTemplateDir(siteId, isImportContents, isImportTableStyles, siteTemplateDir, userKeyPrefix, request.AdminName);
7575
}
7676
else if (!string.IsNullOrEmpty(onlineTemplateName))
7777
{
78-
retval = CreateSiteByOnlineTemplateName(siteId, isImportContents, isImportTableStyles, onlineTemplateName, userKeyPrefix, request.AdminName);
78+
retVal = CreateSiteByOnlineTemplateName(siteId, isImportContents, isImportTableStyles, onlineTemplateName, userKeyPrefix, request.AdminName);
7979
}
8080
else
8181
{
82-
retval = CreateSite(siteId, userKeyPrefix, request.AdminName);
82+
retVal = CreateSite(siteId, userKeyPrefix, request.AdminName);
8383
}
8484
}
8585

86-
var jsonString = TranslateUtils.NameValueCollectionToJsonString(retval);
86+
var jsonString = TranslateUtils.NameValueCollectionToJsonString(retVal);
8787
Page.Response.Write(jsonString);
8888
Page.Response.End();
8989
}
9090

9191
public NameValueCollection GetCountArray(string userKeyPrefix)//进度及显示
9292
{
93-
var retval = new NameValueCollection();
93+
var retVal = new NameValueCollection();
9494
if (CacheUtils.Get(userKeyPrefix + CacheTotalCount) != null && CacheUtils.Get(userKeyPrefix + CacheCurrentCount) != null && CacheUtils.Get(userKeyPrefix + CacheMessage) != null)
9595
{
9696
var totalCount = TranslateUtils.ToInt((string)CacheUtils.Get(userKeyPrefix + CacheTotalCount));
9797
var currentCount = TranslateUtils.ToInt((string)CacheUtils.Get(userKeyPrefix + CacheCurrentCount));
9898
var message = (string)CacheUtils.Get(userKeyPrefix + CacheMessage);
9999

100-
retval = AjaxManager.GetCountArrayNameValueCollection(totalCount, currentCount, message);
100+
retVal = AjaxManager.GetCountArrayNameValueCollection(totalCount, currentCount, message);
101101
}
102-
return retval;
102+
return retVal;
103103
}
104104

105105
public NameValueCollection CreateSiteBySiteTemplateDir(int siteId, bool isImportContents, bool isImportTableStyles, string siteTemplateDir, string userKeyPrefix, string administratorName)
@@ -113,7 +113,7 @@ public NameValueCollection CreateSiteBySiteTemplateDir(int siteId, bool isImport
113113
CacheUtils.Insert(cacheMessageKey, string.Empty);//存储消息
114114

115115
//返回“运行结果”、“错误信息”及“执行JS脚本”的字符串数组
116-
NameValueCollection retval;
116+
NameValueCollection retVal;
117117

118118
try
119119
{
@@ -128,13 +128,13 @@ public NameValueCollection CreateSiteBySiteTemplateDir(int siteId, bool isImport
128128

129129
CacheUtils.Insert(cacheCurrentCountKey, "3");//存储当前的页面总数
130130
CacheUtils.Insert(cacheMessageKey, "创建成功!");//存储消息
131-
retval = AjaxManager.GetWaitingTaskNameValueCollection(
131+
retVal = AjaxManager.GetWaitingTaskNameValueCollection(
132132
$"站点 <strong>{siteInfo.SiteName}<strong> 创建成功!", string.Empty,
133133
$"top.location.href='{PageUtils.GetMainUrl(siteId)}';");
134134
}
135135
catch (Exception ex)
136136
{
137-
retval = AjaxManager.GetWaitingTaskNameValueCollection(string.Empty, ex.Message, string.Empty);
137+
retVal = AjaxManager.GetWaitingTaskNameValueCollection(string.Empty, ex.Message, string.Empty);
138138
LogUtils.AddErrorLog(ex);
139139
}
140140

@@ -143,7 +143,7 @@ public NameValueCollection CreateSiteBySiteTemplateDir(int siteId, bool isImport
143143
CacheUtils.Remove(cacheMessageKey);//取消存储消息
144144
CacheUtils.ClearAll();
145145

146-
return retval;
146+
return retVal;
147147
}
148148

149149
public NameValueCollection CreateSiteByOnlineTemplateName(int siteId, bool isImportContents, bool isImportTableStyles, string onlineTemplateName, string userKeyPrefix, string administratorName)
@@ -157,7 +157,7 @@ public NameValueCollection CreateSiteByOnlineTemplateName(int siteId, bool isImp
157157
CacheUtils.Insert(cacheMessageKey, string.Empty);//存储消息
158158

159159
//返回“运行结果”、“错误信息”及“执行JS脚本”的字符串数组
160-
NameValueCollection retval;
160+
NameValueCollection retVal;
161161

162162
try
163163
{
@@ -187,12 +187,12 @@ public NameValueCollection CreateSiteByOnlineTemplateName(int siteId, bool isImp
187187
CacheUtils.Insert(cacheMessageKey, "创建成功!");//存储消息
188188

189189
var siteInfo = SiteManager.GetSiteInfo(siteId);
190-
retval = AjaxManager.GetWaitingTaskNameValueCollection($"站点 <strong>{siteInfo.SiteName}<strong> 创建成功!", string.Empty,
190+
retVal = AjaxManager.GetWaitingTaskNameValueCollection($"站点 <strong>{siteInfo.SiteName}<strong> 创建成功!", string.Empty,
191191
$"top.location.href='{PageUtils.GetMainUrl(siteId)}';");
192192
}
193193
catch (Exception ex)
194194
{
195-
retval = AjaxManager.GetWaitingTaskNameValueCollection(string.Empty, ex.Message, string.Empty);
195+
retVal = AjaxManager.GetWaitingTaskNameValueCollection(string.Empty, ex.Message, string.Empty);
196196
LogUtils.AddErrorLog(ex);
197197
}
198198

@@ -201,7 +201,7 @@ public NameValueCollection CreateSiteByOnlineTemplateName(int siteId, bool isImp
201201
CacheUtils.Remove(cacheMessageKey);//取消存储消息
202202
CacheUtils.ClearAll();
203203

204-
return retval;
204+
return retVal;
205205
}
206206

207207
public NameValueCollection CreateSite(int siteId, string userKeyPrefix, string administratorName)
@@ -215,7 +215,7 @@ public NameValueCollection CreateSite(int siteId, string userKeyPrefix, string a
215215
CacheUtils.Insert(cacheMessageKey, string.Empty);//存储消息
216216

217217
//返回“运行结果”、“错误信息”及“执行JS脚本”的字符串数组
218-
NameValueCollection retval;
218+
NameValueCollection retVal;
219219

220220
try
221221
{
@@ -225,13 +225,13 @@ public NameValueCollection CreateSite(int siteId, string userKeyPrefix, string a
225225

226226
CacheUtils.Insert(cacheCurrentCountKey, "2");//存储当前的页面总数
227227
CacheUtils.Insert(cacheMessageKey, "创建成功!");//存储消息
228-
retval = AjaxManager.GetWaitingTaskNameValueCollection(
228+
retVal = AjaxManager.GetWaitingTaskNameValueCollection(
229229
$"站点 <strong>{siteInfo.SiteName}<strong> 创建成功!", string.Empty,
230230
$"top.location.href='{PageUtils.GetMainUrl(siteId)}';");
231231
}
232232
catch (Exception ex)
233233
{
234-
retval = AjaxManager.GetWaitingTaskNameValueCollection(string.Empty, ex.Message, string.Empty);
234+
retVal = AjaxManager.GetWaitingTaskNameValueCollection(string.Empty, ex.Message, string.Empty);
235235
LogUtils.AddErrorLog(ex);
236236
}
237237

@@ -240,7 +240,7 @@ public NameValueCollection CreateSite(int siteId, string userKeyPrefix, string a
240240
CacheUtils.Remove(cacheMessageKey);//取消存储消息
241241
CacheUtils.ClearAll();
242242

243-
return retval;
243+
return retVal;
244244
}
245245
}
246246
}

0 commit comments

Comments
 (0)