@@ -182,7 +182,7 @@ function getstatus()
182182 $ user = $ user ['uname_s ' ];
183183 if (!$ this ->status ['owner ' ]) {
184184 if ($ this ->status ['uname ' ]) {
185- $ user = htmlspecialchars ($ this ->status ['uname ' ]);
185+ $ user = $ this -> func -> htmlspecialchars ($ this ->status ['uname ' ]);
186186 }
187187 $ user = $ user . " [ " .$ this ->status ['ucd ' ] . "] " ;
188188 }
@@ -254,7 +254,7 @@ function toString($showicon,$showinfo,$mode="")
254254 . '& ' ;
255255 $ param2 = 'file= ' .$ file_e ;
256256 $ title = $ this ->time_str .' ' .$ this ->size_str ;
257- $ label = ($ showicon ? $ this ->cont ['FILE_ICON ' ] : '' ).htmlspecialchars ($ this ->status ['org_fname ' ]);
257+ $ label = ($ showicon ? $ this ->cont ['FILE_ICON ' ] : '' ).$ this -> func -> htmlspecialchars ($ this ->status ['org_fname ' ]);
258258 if ($ this ->age ) {
259259 if ($ mode == "imglist " ){
260260 $ label = 'backup No. ' .$ this ->age ;
@@ -275,7 +275,7 @@ function toString($showicon,$showinfo,$mode="")
275275 if ($ is_owner ) $ info .= ' &build_js(attachDel, ' .str_replace ('| ' , '| ' , $ this ->page ).', ' .str_replace ('| ' , '| ' , $ this ->file ).', ' .$ this ->age .', ' .$ returi .'); ' ;
276276 } else {
277277 $ info = "\n<span class= \"small \">[<a href= \"{$ this ->root ->script }?plugin=attach&pcmd=info {$ param }{$ param2 }\" title= \"$ _title \"> {$ this ->root ->_attach_messages ['btn_info ' ]}</a>]</span> " ;
278- if ($ is_owner ) $ info .= '<a href=" ' .$ this ->root ->script .'?plugin=attach&pcmd=delete ' .$ param .$ param2 .'&returi= ' .rawurlencode ($ returi ).'" title=" ' .$ this ->root ->_btn_delete .'" onclick="return confirm( \'' .htmlspecialchars ($ this ->file , ENT_QUOTES ).': ' .htmlspecialchars ($ this ->root ->_attach_messages ['msg_delete ' ], ENT_QUOTES ).'\')"><img src=" ' .$ this ->cont ['LOADER_URL ' ].'?src=trash_16.gif" alt=" ' .$ this ->root ->_btn_delete .'" /></a> ' ;
278+ if ($ is_owner ) $ info .= '<a href=" ' .$ this ->root ->script .'?plugin=attach&pcmd=delete ' .$ param .$ param2 .'&returi= ' .rawurlencode ($ returi ).'" title=" ' .$ this ->root ->_btn_delete .'" onclick="return confirm( \'' .$ this -> func -> htmlspecialchars ($ this ->file , ENT_QUOTES ).': ' .$ this -> func -> htmlspecialchars ($ this ->root ->_attach_messages ['msg_delete ' ], ENT_QUOTES ).'\')"><img src=" ' .$ this ->cont ['LOADER_URL ' ].'?src=trash_16.gif" alt=" ' .$ this ->root ->_btn_delete .'" /></a> ' ;
279279 }
280280 }
281281 $ count = ($ showicon and !empty ($ this ->status ['count ' ][$ this ->age ])) ?
@@ -308,8 +308,8 @@ function toString($showicon,$showinfo,$mode="")
308308 function info ($ err ) {
309309
310310 $ r_page = rawurlencode ($ this ->page );
311- $ s_page = htmlspecialchars ($ this ->page );
312- $ s_file = htmlspecialchars ($ this ->file );
311+ $ s_page = $ this -> func -> htmlspecialchars ($ this ->page );
312+ $ s_file = $ this -> func -> htmlspecialchars ($ this ->file );
313313 $ s_err = ($ err == '' ) ? '' : '<p style="font-weight:bold"> ' .$ this ->root ->_attach_messages [$ err ].'</p> ' ;
314314 $ ref = "" ;
315315 $ img_info = "" ;
@@ -423,7 +423,7 @@ function info($err) {
423423 '<label for="_p_attach_newname"> ' . $ this ->root ->_attach_messages ['msg_newname ' ] .
424424 ':</label> ' .
425425 '<input type="text" name="newname" id="_p_attach_newname" size="40" value=" ' .
426- (htmlspecialchars (empty ($ this ->status ['org_fname ' ])? $ this ->file : $ this ->status ['org_fname ' ])) . '" /><br /> ' ;
426+ ($ this -> func -> htmlspecialchars (empty ($ this ->status ['org_fname ' ])? $ this ->file : $ this ->status ['org_fname ' ])) . '" /><br /> ' ;
427427 }
428428 if ($ this ->status ['copyright ' ]) {
429429 $ msg_copyright = '<input type="radio" id="pcmd_c" name="pcmd" value="copyright0" /><label for="pcmd_c"> ' .$ this ->root ->_attach_messages ['msg_copyright0 ' ].'</label> ' ;
@@ -447,7 +447,7 @@ function info($err) {
447447 $ info = $ this ->toString (TRUE ,FALSE );
448448 $ copyright = ($ this ->status ['copyright ' ])? ' checked=TRUE ' : '' ;
449449
450- $ retval = array ('msg ' =>sprintf ($ this ->root ->_attach_messages ['msg_info ' ],htmlspecialchars ($ this ->file )));
450+ $ retval = array ('msg ' =>sprintf ($ this ->root ->_attach_messages ['msg_info ' ],$ this -> func -> htmlspecialchars ($ this ->file )));
451451 $ page_link = $ this ->func ->make_pagelink ($ s_page );
452452 $ ex_tags = '' ;
453453 if ($ this ->status ['imagesize ' ]) {
@@ -609,7 +609,7 @@ function delete($pass)
609609 $ this ->putstatus (TRUE );
610610 }
611611 if ($ this ->func ->is_page ($ this ->page )) {
612- $ this ->root ->rtf ['esummary ' ] = 'Deleted an attach file: ' . htmlspecialchars ($ this ->file );
612+ $ this ->root ->rtf ['esummary ' ] = 'Deleted an attach file: ' . $ this -> func -> htmlspecialchars ($ this ->file );
613613 $ this ->func ->touch_page ($ this ->page , NULL , TRUE );
614614 }
615615
@@ -781,7 +781,7 @@ function reinfo() {
781781 ($ this ->age ? '&age= ' .$ this ->age : '' );
782782 $ redirect = "{$ this ->root ->script }?plugin=attach&pcmd=info $ param " ;
783783
784- $ msg = str_replace ('$1 ' , htmlspecialchars ($ this ->status ['org_fname ' ]), $ this ->root ->_title_updated );
784+ $ msg = str_replace ('$1 ' , $ this -> func -> htmlspecialchars ($ this ->status ['org_fname ' ]), $ this ->root ->_title_updated );
785785
786786 return array ('msg ' => $ msg , 'redirect ' => $ redirect );
787787
@@ -1109,7 +1109,7 @@ function toString($flat,$fromall=FALSE,$mode="")
11091109 if ($ this ->is_popup ) {
11101110 continue ;
11111111 }
1112- $ _files [0 ] = htmlspecialchars ($ file );
1112+ $ _files [0 ] = $ this -> func -> htmlspecialchars ($ file );
11131113 }
11141114 ksort ($ _files );
11151115 $ _file = $ _files [0 ];
@@ -1170,7 +1170,7 @@ function toString($flat,$fromall=FALSE,$mode="")
11701170 $ showall = ($ fromall && $ this ->max < $ this ->count )? " [ <a href= \"{$ showall_href }\">Show All</a> ] " : "" ;
11711171 if ($ this ->is_popup ) {
11721172 if ($ fromall ) {
1173- $ showall = "<div class= \"filelist_page \"><a href= \"{$ showall_href }\"> " . htmlspecialchars ($ this ->page ) . '</a> ' . $ filecount . '<small> ' . $ showall . '</small></div> ' ;
1173+ $ showall = "<div class= \"filelist_page \"><a href= \"{$ showall_href }\"> " . $ this -> func -> htmlspecialchars ($ this ->page ) . '</a> ' . $ filecount . '<small> ' . $ showall . '</small></div> ' ;
11741174 } else {
11751175 $ showall = '' ;
11761176 }
@@ -1338,11 +1338,11 @@ function toString($page='',$flat=FALSE)
13381338 $ hiddens = array ();
13391339 $ hiddens ['plugin ' ] = 'attach ' ;
13401340 $ hiddens ['pcmd ' ] = $ pcmd ;
1341- $ hiddens ['refer ' ] = (isset ($ this ->root ->vars ['refer ' ]))? htmlspecialchars ($ this ->root ->vars ['refer ' ]) : '' ;
1341+ $ hiddens ['refer ' ] = (isset ($ this ->root ->vars ['refer ' ]))? $ this -> func -> htmlspecialchars ($ this ->root ->vars ['refer ' ]) : '' ;
13421342 foreach ($ otherkeys as $ key ) {
13431343 if (isset ($ this ->root ->vars [$ key ])) {
13441344 $ otherprams [] = rawurlencode ($ key ) . '= ' . rawurlencode ($ this ->root ->vars [$ key ]);
1345- $ hiddens [htmlspecialchars ($ key )] = htmlspecialchars ($ this ->root ->vars [$ key ]);
1345+ $ hiddens [$ this -> func -> htmlspecialchars ($ key )] = $ this -> func -> htmlspecialchars ($ this ->root ->vars [$ key ]);
13461346 }
13471347 }
13481348
@@ -1372,7 +1372,7 @@ function toString($page='',$flat=FALSE)
13721372 if ($ this ->root ->vars ['basedir ' ] === $ dir ) {
13731373 $ defaultpage = $ this ->root ->vars ['base ' ];
13741374 }
1375- $ otherDirs [] = '<option value=" ' . $ dir . '# ' . htmlspecialchars ($ defaultpage ) . '" ' . $ selected . '> ' . htmlspecialchars ($ val ['title ' ]) . '</option> ' ;
1375+ $ otherDirs [] = '<option value=" ' . $ dir . '# ' . $ this -> func -> htmlspecialchars ($ defaultpage ) . '" ' . $ selected . '> ' . $ this -> func -> htmlspecialchars ($ val ['title ' ]) . '</option> ' ;
13761376 }
13771377 $ otherDir = '<form><img src=" ' . $ this ->cont ['LOADER_URL ' ] . '?src=folder_go.png" alt="Dir" /> <select name="otherdir" style="max-width:85%;" onchange="xpwiki_dir_selector_change(this.options[this.selectedIndex].value)"> ' . join ('' , $ otherDirs ) . '</select></form> ' ;
13781378 }
@@ -1412,7 +1412,7 @@ function toString($page='',$flat=FALSE)
14121412 $ _class = 'attachable ' ;
14131413 if ($ this ->cont ['UA_PROFILE ' ] !== 'default ' ) $ _attachable = '↑ ' ;
14141414 }
1415- $ otherPages [] = '<option class=" ' .$ _class .'" value=" ' . rawurlencode ($ _page ) . '" ' . $ selected . '> ' . $ _attachable . htmlspecialchars ($ _page ) . $ count . '</option> ' ;
1415+ $ otherPages [] = '<option class=" ' .$ _class .'" value=" ' . rawurlencode ($ _page ) . '" ' . $ selected . '> ' . $ _attachable . $ this -> func -> htmlspecialchars ($ _page ) . $ count . '</option> ' ;
14161416 }
14171417 }
14181418 $ otherPages [] = '</optgroup> ' ;
@@ -1425,14 +1425,14 @@ function toString($page='',$flat=FALSE)
14251425 if ($ this ->func ->check_readable ($ row [0 ], false , false )) {
14261426 if (in_array ($ row [0 ], $ shown )) continue ;
14271427 $ selected = ($ row [0 ] === $ page )? ' selected="selected" ' : '' ;
1428- $ _page = htmlspecialchars ($ row [0 ]);
1428+ $ _page = $ this -> func -> htmlspecialchars ($ row [0 ]);
14291429 $ _attachable = '' ;
14301430 $ _class = 'readable ' ;
14311431 if ($ attach ->attachable ($ _page )) {
14321432 $ _class = 'attachable ' ;
14331433 if ($ this ->cont ['UA_PROFILE ' ] !== 'default ' ) $ _attachable = '↑ ' ;
14341434 }
1435- $ otherPages [] = '<option class=" ' .$ _class .'" value=" ' . rawurlencode ($ _page ) . '" ' . $ selected . '> ' . $ _attachable . htmlspecialchars ($ _page ) . ' ( ' . $ row [1 ] . ')</option> ' ;
1435+ $ otherPages [] = '<option class=" ' .$ _class .'" value=" ' . rawurlencode ($ _page ) . '" ' . $ selected . '> ' . $ _attachable . $ this -> func -> htmlspecialchars ($ _page ) . ' ( ' . $ row [1 ] . ')</option> ' ;
14361436 }
14371437 }
14381438 $ otherPages [] = '</optgroup> ' ;
@@ -1441,7 +1441,7 @@ function toString($page='',$flat=FALSE)
14411441 $ thisPage = '<option value="">--- ' . $ this ->root ->_attach_messages ['msg_page_select ' ] . ' ---</option> ' ;
14421442 if ($ this ->root ->vars ['basedir ' ] === $ this ->root ->mydirname ) {
14431443 $ selected = ($ this ->root ->vars ['base ' ] === $ page )? ' selected="selected" ' : '' ;
1444- $ thisPage .= '<option value=" ' .rawurlencode ($ this ->root ->vars ['base ' ]).'" ' . $ selected . '> ' . htmlspecialchars ($ this ->root ->vars ['base ' ]) . $ this ->root ->_attach_messages ['msg_select_current ' ] . '</option> ' ;
1444+ $ thisPage .= '<option value=" ' .rawurlencode ($ this ->root ->vars ['base ' ]).'" ' . $ selected . '> ' . $ this -> func -> htmlspecialchars ($ this ->root ->vars ['base ' ]) . $ this ->root ->_attach_messages ['msg_select_current ' ] . '</option> ' ;
14451445 }
14461446 if (! empty ($ this ->root ->vars ['refer ' ])) $ thisPage .= '<option value="#"> ' .$ this ->root ->_attach_messages ['msg_show_all_pages ' ].'</option> ' ;
14471447 $ base = rawurlencode ($ this ->root ->vars ['base ' ]);
@@ -1470,7 +1470,7 @@ function xpwiki_dir_selector_change(dir) {
14701470EOD ;
14711471 }
14721472
1473- $ sword = (isset ($ this ->root ->vars ['word ' ]))? htmlspecialchars ($ this ->root ->vars ['word ' ]) : '' ;
1473+ $ sword = (isset ($ this ->root ->vars ['word ' ]))? $ this -> func -> htmlspecialchars ($ this ->root ->vars ['word ' ]) : '' ;
14741474 $ hidden = '' ;
14751475 unset($ hiddens ['word ' ]);
14761476 foreach ($ hiddens as $ key => $ val ) {
0 commit comments