From bf7b886c25d023fbdef27b2bf823e327dff3709a Mon Sep 17 00:00:00 2001 From: deuce <> Date: Thu, 28 Jun 2012 05:21:49 +0000 Subject: [PATCH] Open files sharable when readind titles etc. --- web/root/ecWeb/fTelnet/fTelnet.ssjs | 2 +- web/root/ecWeb/lib/captchaLib.ssjs | 2 +- web/root/ecWeb/lib/forumLib.ssjs | 2 +- web/root/ecWeb/lightirc/lightirc.ssjs | 2 +- web/root/ecWeb/pages.ssjs | 4 ++-- web/root/ecWeb/sidebar/000-pages.ssjs | 2 +- web/root/ecWeb/themes/blacktastic/layout.ssjs | 2 +- web/root/ecWeb/themes/blocktastic-r/layout.ssjs | 2 +- web/root/ecWeb/themes/blocktastic/layout.ssjs | 2 +- web/root/ecWeb/themes/hotdogstand/layout.ssjs | 2 +- web/root/ecWeb/themes/shitenade/layout.ssjs | 2 +- web/root/ecWeb/themes/stocktastic-r/layout.ssjs | 2 +- web/root/ecWeb/themes/stocktastic/layout.ssjs | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/web/root/ecWeb/fTelnet/fTelnet.ssjs b/web/root/ecWeb/fTelnet/fTelnet.ssjs index b6acb878cb..f6be52b8f6 100644 --- a/web/root/ecWeb/fTelnet/fTelnet.ssjs +++ b/web/root/ecWeb/fTelnet/fTelnet.ssjs @@ -9,7 +9,7 @@ could comment the following if..else block out and just set var fspPort to whichever port you like. */ var f = new File(system.ctrl_dir + 'services.ini'); -if(f.open("r")) { +if(f.open("r",true)) { var servicesIni = f.iniGetObject('FlashPolicy'); f.close(); if(servicesIni) diff --git a/web/root/ecWeb/lib/captchaLib.ssjs b/web/root/ecWeb/lib/captchaLib.ssjs index 1c19b3a324..7e20bfa135 100644 --- a/web/root/ecWeb/lib/captchaLib.ssjs +++ b/web/root/ecWeb/lib/captchaLib.ssjs @@ -28,7 +28,7 @@ function insertCaptcha() { for(i = 0; i < webIni.captchaLength; i++) { var randomLetter = Math.floor(Math.random() * (f.length)); var g = new File(f[randomLetter]); - g.open("r"); + g.open("r",true); var h = g.read(); g.close(); h = html_encode(h); diff --git a/web/root/ecWeb/lib/forumLib.ssjs b/web/root/ecWeb/lib/forumLib.ssjs index 8bdad782d9..b53f6ce9bc 100644 --- a/web/root/ecWeb/lib/forumLib.ssjs +++ b/web/root/ecWeb/lib/forumLib.ssjs @@ -11,7 +11,7 @@ while(sigFile.length < 4) sigFile = "0" + sigFile; sigFile += ".sig"; if(file_exists(system.data_dir + "user/" + sigFile)) { var f = new File(system.data_dir + "user/" + sigFile); - f.open("r"); + f.open("r",true); var sig = f.read().replace(/\n|\r\n/g, ' '); f.close(); } diff --git a/web/root/ecWeb/lightirc/lightirc.ssjs b/web/root/ecWeb/lightirc/lightirc.ssjs index 083167fff8..e490c89084 100644 --- a/web/root/ecWeb/lightirc/lightirc.ssjs +++ b/web/root/ecWeb/lightirc/lightirc.ssjs @@ -10,7 +10,7 @@ could comment the following if..else block out and just set var fspPort to whichever port you like. */ var f = new File(system.ctrl_dir + 'services.ini'); -if(f.open("r")) { +if(f.open("r",true)) { var servicesIni = f.iniGetObject('FlashPolicy'); f.close(); if(servicesIni) diff --git a/web/root/ecWeb/pages.ssjs b/web/root/ecWeb/pages.ssjs index 38204037da..5c2f16047d 100644 --- a/web/root/ecWeb/pages.ssjs +++ b/web/root/ecWeb/pages.ssjs @@ -24,7 +24,7 @@ for(f in d) { } if(file_getext(d[f]).toUpperCase() == ".HTML") { var g = new File(d[f]); - g.open("r"); + g.open("r",true); h = g.read(); g.close(); print(h); @@ -32,7 +32,7 @@ for(f in d) { } if(file_getext(d[f]).toUpperCase() == ".TXT") { var g = new File(d[f]); - g.open("r"); + g.open("r",true); h = g.read(); g.close(); // print(h); // Uncomment this line if you'd rather not have your text files appear within <pre /> elements. diff --git a/web/root/ecWeb/sidebar/000-pages.ssjs b/web/root/ecWeb/sidebar/000-pages.ssjs index 60b4a1ac52..1cb4f49af3 100644 --- a/web/root/ecWeb/sidebar/000-pages.ssjs +++ b/web/root/ecWeb/sidebar/000-pages.ssjs @@ -7,7 +7,7 @@ var e = directory(webIni.webRoot + "/pages/*"); for(var g in e) { var h = new File(e[g]); - if(h.open("r")) { + if(h.open("r",true)) { var i = h.readAll(); h.close(); if(file_isdir(e[g])) continue; diff --git a/web/root/ecWeb/themes/blacktastic/layout.ssjs b/web/root/ecWeb/themes/blacktastic/layout.ssjs index 2fe6347029..0b4f689680 100644 --- a/web/root/ecWeb/themes/blacktastic/layout.ssjs +++ b/web/root/ecWeb/themes/blacktastic/layout.ssjs @@ -31,7 +31,7 @@ function openPage(pageTitle) { if(file_getext(d[f]).toUpperCase() == ".SSJS" || file_getext(d[f]).toUpperCase() == ".JS") load(d[f]); if(file_getext(d[f]).toUpperCase() == ".TXT" || file_getext(d[f]).toUpperCase() == ".HTML") { var handle = new File(d[f]); - handle.open("r"); + handle.open("r",true); var printme = handle.read(); handle.close(); if(file_getext(d[f]).toUpperCase() == ".TXT") printme = "<pre>" + printme + "</pre>"; diff --git a/web/root/ecWeb/themes/blocktastic-r/layout.ssjs b/web/root/ecWeb/themes/blocktastic-r/layout.ssjs index 2fe6347029..0b4f689680 100644 --- a/web/root/ecWeb/themes/blocktastic-r/layout.ssjs +++ b/web/root/ecWeb/themes/blocktastic-r/layout.ssjs @@ -31,7 +31,7 @@ function openPage(pageTitle) { if(file_getext(d[f]).toUpperCase() == ".SSJS" || file_getext(d[f]).toUpperCase() == ".JS") load(d[f]); if(file_getext(d[f]).toUpperCase() == ".TXT" || file_getext(d[f]).toUpperCase() == ".HTML") { var handle = new File(d[f]); - handle.open("r"); + handle.open("r",true); var printme = handle.read(); handle.close(); if(file_getext(d[f]).toUpperCase() == ".TXT") printme = "<pre>" + printme + "</pre>"; diff --git a/web/root/ecWeb/themes/blocktastic/layout.ssjs b/web/root/ecWeb/themes/blocktastic/layout.ssjs index 2fe6347029..0b4f689680 100644 --- a/web/root/ecWeb/themes/blocktastic/layout.ssjs +++ b/web/root/ecWeb/themes/blocktastic/layout.ssjs @@ -31,7 +31,7 @@ function openPage(pageTitle) { if(file_getext(d[f]).toUpperCase() == ".SSJS" || file_getext(d[f]).toUpperCase() == ".JS") load(d[f]); if(file_getext(d[f]).toUpperCase() == ".TXT" || file_getext(d[f]).toUpperCase() == ".HTML") { var handle = new File(d[f]); - handle.open("r"); + handle.open("r",true); var printme = handle.read(); handle.close(); if(file_getext(d[f]).toUpperCase() == ".TXT") printme = "<pre>" + printme + "</pre>"; diff --git a/web/root/ecWeb/themes/hotdogstand/layout.ssjs b/web/root/ecWeb/themes/hotdogstand/layout.ssjs index 2fe6347029..0b4f689680 100644 --- a/web/root/ecWeb/themes/hotdogstand/layout.ssjs +++ b/web/root/ecWeb/themes/hotdogstand/layout.ssjs @@ -31,7 +31,7 @@ function openPage(pageTitle) { if(file_getext(d[f]).toUpperCase() == ".SSJS" || file_getext(d[f]).toUpperCase() == ".JS") load(d[f]); if(file_getext(d[f]).toUpperCase() == ".TXT" || file_getext(d[f]).toUpperCase() == ".HTML") { var handle = new File(d[f]); - handle.open("r"); + handle.open("r",true); var printme = handle.read(); handle.close(); if(file_getext(d[f]).toUpperCase() == ".TXT") printme = "<pre>" + printme + "</pre>"; diff --git a/web/root/ecWeb/themes/shitenade/layout.ssjs b/web/root/ecWeb/themes/shitenade/layout.ssjs index 2fe6347029..0b4f689680 100644 --- a/web/root/ecWeb/themes/shitenade/layout.ssjs +++ b/web/root/ecWeb/themes/shitenade/layout.ssjs @@ -31,7 +31,7 @@ function openPage(pageTitle) { if(file_getext(d[f]).toUpperCase() == ".SSJS" || file_getext(d[f]).toUpperCase() == ".JS") load(d[f]); if(file_getext(d[f]).toUpperCase() == ".TXT" || file_getext(d[f]).toUpperCase() == ".HTML") { var handle = new File(d[f]); - handle.open("r"); + handle.open("r",true); var printme = handle.read(); handle.close(); if(file_getext(d[f]).toUpperCase() == ".TXT") printme = "<pre>" + printme + "</pre>"; diff --git a/web/root/ecWeb/themes/stocktastic-r/layout.ssjs b/web/root/ecWeb/themes/stocktastic-r/layout.ssjs index 2fe6347029..0b4f689680 100644 --- a/web/root/ecWeb/themes/stocktastic-r/layout.ssjs +++ b/web/root/ecWeb/themes/stocktastic-r/layout.ssjs @@ -31,7 +31,7 @@ function openPage(pageTitle) { if(file_getext(d[f]).toUpperCase() == ".SSJS" || file_getext(d[f]).toUpperCase() == ".JS") load(d[f]); if(file_getext(d[f]).toUpperCase() == ".TXT" || file_getext(d[f]).toUpperCase() == ".HTML") { var handle = new File(d[f]); - handle.open("r"); + handle.open("r",true); var printme = handle.read(); handle.close(); if(file_getext(d[f]).toUpperCase() == ".TXT") printme = "<pre>" + printme + "</pre>"; diff --git a/web/root/ecWeb/themes/stocktastic/layout.ssjs b/web/root/ecWeb/themes/stocktastic/layout.ssjs index 2fe6347029..0b4f689680 100644 --- a/web/root/ecWeb/themes/stocktastic/layout.ssjs +++ b/web/root/ecWeb/themes/stocktastic/layout.ssjs @@ -31,7 +31,7 @@ function openPage(pageTitle) { if(file_getext(d[f]).toUpperCase() == ".SSJS" || file_getext(d[f]).toUpperCase() == ".JS") load(d[f]); if(file_getext(d[f]).toUpperCase() == ".TXT" || file_getext(d[f]).toUpperCase() == ".HTML") { var handle = new File(d[f]); - handle.open("r"); + handle.open("r",true); var printme = handle.read(); handle.close(); if(file_getext(d[f]).toUpperCase() == ".TXT") printme = "<pre>" + printme + "</pre>"; -- GitLab