Last modified by Super Admin on 2026/03/22 00:39

From version Icon 40.1 Icon
edited by XWikiGuest
on 2026/03/22 00:34
Change comment: There is no comment for this version
To version Icon 36.1 Icon
edited by Super Admin
on 2026/03/18 20:41
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.XWikiGuest
1 +XWiki.superadmin
Content
... ... @@ -25,7 +25,7 @@
25 25   {{error}}この学校のページは既に存在します。[[既存のページを開く>>$targetPage]]{{/error}}
26 26   #else
27 27   ## 関連校として登録されているかチェック
28 - #set($affQuery = $services.query.hql("select doc.fullName, nameObj.value from XWikiDocument doc, BaseObject bobj, StringProperty obj, StringProperty nameObj where bobj.name = doc.fullName and bobj.className = 'SeitokaiCode.SchoolClass' and obj.id.id = bobj.id and obj.id.name = 'affiliatedSchoolCode' and obj.value = :code and nameObj.id.id = bobj.id and nameObj.id.name = 'affiliatedSchoolName'").bindValue('code', $schoolCode))
28 + #set($affQuery = $services.query.hql("select doc.fullName, obj.affiliatedSchoolName from XWikiDocument doc, BaseObject bobj, StringProperty obj where bobj.name = doc.fullName and bobj.className = 'SeitokaiCode.SchoolClass' and obj.id.id = bobj.id and obj.id.name = 'affiliatedSchoolCode' and obj.value = :code").bindValue('code', $schoolCode))
29 29   #set($affResults = $affQuery.execute())
30 30   #if($affResults && $affResults.size() > 0)
31 31   #set($affRow = $affResults.get(0))
... ... @@ -223,14 +223,7 @@
223 223  
224 224   // 関連校チェック(他校の関連校として登録されているか確認)
225 225   var affiliatedCheck = fetch('$request.contextPath/bin/view/SeitokaiCode/CheckAffiliated?code=' + encodeURIComponent(school.code) + '&outputSyntax=plain')
226 - .then(function(r) { return r.ok ? r.text() : ''; })
227 - .then(function(t) {
228 - try {
229 - var jsonEnd = t.indexOf('}');
230 - if (jsonEnd >= 0) return JSON.parse(t.substring(0, jsonEnd + 1));
231 - } catch(e) {}
232 - return { found: false };
233 - })
226 + .then(function(r) { return r.ok ? r.json() : { found: false }; })
234 234   .catch(function() { return { found: false }; });
235 235  
236 236   Promise.all([duplicateCheck, affiliatedCheck]).then(function(results) {