@@ -182,7 +182,7 @@ function getstatus()
182
182
$ user = $ user ['uname_s ' ];
183
183
if (!$ this ->status ['owner ' ]) {
184
184
if ($ this ->status ['uname ' ]) {
185
- $ user = htmlspecialchars ($ this ->status ['uname ' ]);
185
+ $ user = $ this -> func -> htmlspecialchars ($ this ->status ['uname ' ]);
186
186
}
187
187
$ user = $ user . " [ " .$ this ->status ['ucd ' ] . "] " ;
188
188
}
@@ -254,7 +254,7 @@ function toString($showicon,$showinfo,$mode="")
254
254
. '& ' ;
255
255
$ param2 = 'file= ' .$ file_e ;
256
256
$ 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 ' ]);
258
258
if ($ this ->age ) {
259
259
if ($ mode == "imglist " ){
260
260
$ label = 'backup No. ' .$ this ->age ;
@@ -275,7 +275,7 @@ function toString($showicon,$showinfo,$mode="")
275
275
if ($ is_owner ) $ info .= ' &build_js(attachDel, ' .str_replace ('| ' , '| ' , $ this ->page ).', ' .str_replace ('| ' , '| ' , $ this ->file ).', ' .$ this ->age .', ' .$ returi .'); ' ;
276
276
} else {
277
277
$ 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> ' ;
279
279
}
280
280
}
281
281
$ count = ($ showicon and !empty ($ this ->status ['count ' ][$ this ->age ])) ?
@@ -308,8 +308,8 @@ function toString($showicon,$showinfo,$mode="")
308
308
function info ($ err ) {
309
309
310
310
$ 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 );
313
313
$ s_err = ($ err == '' ) ? '' : '<p style="font-weight:bold"> ' .$ this ->root ->_attach_messages [$ err ].'</p> ' ;
314
314
$ ref = "" ;
315
315
$ img_info = "" ;
@@ -423,7 +423,7 @@ function info($err) {
423
423
'<label for="_p_attach_newname"> ' . $ this ->root ->_attach_messages ['msg_newname ' ] .
424
424
':</label> ' .
425
425
'<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 /> ' ;
427
427
}
428
428
if ($ this ->status ['copyright ' ]) {
429
429
$ 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) {
447
447
$ info = $ this ->toString (TRUE ,FALSE );
448
448
$ copyright = ($ this ->status ['copyright ' ])? ' checked=TRUE ' : '' ;
449
449
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 )));
451
451
$ page_link = $ this ->func ->make_pagelink ($ s_page );
452
452
$ ex_tags = '' ;
453
453
if ($ this ->status ['imagesize ' ]) {
@@ -609,7 +609,7 @@ function delete($pass)
609
609
$ this ->putstatus (TRUE );
610
610
}
611
611
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 );
613
613
$ this ->func ->touch_page ($ this ->page , NULL , TRUE );
614
614
}
615
615
@@ -781,7 +781,7 @@ function reinfo() {
781
781
($ this ->age ? '&age= ' .$ this ->age : '' );
782
782
$ redirect = "{$ this ->root ->script }?plugin=attach&pcmd=info $ param " ;
783
783
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 );
785
785
786
786
return array ('msg ' => $ msg , 'redirect ' => $ redirect );
787
787
@@ -1109,7 +1109,7 @@ function toString($flat,$fromall=FALSE,$mode="")
1109
1109
if ($ this ->is_popup ) {
1110
1110
continue ;
1111
1111
}
1112
- $ _files [0 ] = htmlspecialchars ($ file );
1112
+ $ _files [0 ] = $ this -> func -> htmlspecialchars ($ file );
1113
1113
}
1114
1114
ksort ($ _files );
1115
1115
$ _file = $ _files [0 ];
@@ -1170,7 +1170,7 @@ function toString($flat,$fromall=FALSE,$mode="")
1170
1170
$ showall = ($ fromall && $ this ->max < $ this ->count )? " [ <a href= \"{$ showall_href }\">Show All</a> ] " : "" ;
1171
1171
if ($ this ->is_popup ) {
1172
1172
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> ' ;
1174
1174
} else {
1175
1175
$ showall = '' ;
1176
1176
}
@@ -1338,11 +1338,11 @@ function toString($page='',$flat=FALSE)
1338
1338
$ hiddens = array ();
1339
1339
$ hiddens ['plugin ' ] = 'attach ' ;
1340
1340
$ 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 ' ]) : '' ;
1342
1342
foreach ($ otherkeys as $ key ) {
1343
1343
if (isset ($ this ->root ->vars [$ key ])) {
1344
1344
$ 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 ]);
1346
1346
}
1347
1347
}
1348
1348
@@ -1372,7 +1372,7 @@ function toString($page='',$flat=FALSE)
1372
1372
if ($ this ->root ->vars ['basedir ' ] === $ dir ) {
1373
1373
$ defaultpage = $ this ->root ->vars ['base ' ];
1374
1374
}
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> ' ;
1376
1376
}
1377
1377
$ 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> ' ;
1378
1378
}
@@ -1412,7 +1412,7 @@ function toString($page='',$flat=FALSE)
1412
1412
$ _class = 'attachable ' ;
1413
1413
if ($ this ->cont ['UA_PROFILE ' ] !== 'default ' ) $ _attachable = '↑ ' ;
1414
1414
}
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> ' ;
1416
1416
}
1417
1417
}
1418
1418
$ otherPages [] = '</optgroup> ' ;
@@ -1425,14 +1425,14 @@ function toString($page='',$flat=FALSE)
1425
1425
if ($ this ->func ->check_readable ($ row [0 ], false , false )) {
1426
1426
if (in_array ($ row [0 ], $ shown )) continue ;
1427
1427
$ selected = ($ row [0 ] === $ page )? ' selected="selected" ' : '' ;
1428
- $ _page = htmlspecialchars ($ row [0 ]);
1428
+ $ _page = $ this -> func -> htmlspecialchars ($ row [0 ]);
1429
1429
$ _attachable = '' ;
1430
1430
$ _class = 'readable ' ;
1431
1431
if ($ attach ->attachable ($ _page )) {
1432
1432
$ _class = 'attachable ' ;
1433
1433
if ($ this ->cont ['UA_PROFILE ' ] !== 'default ' ) $ _attachable = '↑ ' ;
1434
1434
}
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> ' ;
1436
1436
}
1437
1437
}
1438
1438
$ otherPages [] = '</optgroup> ' ;
@@ -1441,7 +1441,7 @@ function toString($page='',$flat=FALSE)
1441
1441
$ thisPage = '<option value="">--- ' . $ this ->root ->_attach_messages ['msg_page_select ' ] . ' ---</option> ' ;
1442
1442
if ($ this ->root ->vars ['basedir ' ] === $ this ->root ->mydirname ) {
1443
1443
$ 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> ' ;
1445
1445
}
1446
1446
if (! empty ($ this ->root ->vars ['refer ' ])) $ thisPage .= '<option value="#"> ' .$ this ->root ->_attach_messages ['msg_show_all_pages ' ].'</option> ' ;
1447
1447
$ base = rawurlencode ($ this ->root ->vars ['base ' ]);
@@ -1470,7 +1470,7 @@ function xpwiki_dir_selector_change(dir) {
1470
1470
EOD ;
1471
1471
}
1472
1472
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 ' ]) : '' ;
1474
1474
$ hidden = '' ;
1475
1475
unset($ hiddens ['word ' ]);
1476
1476
foreach ($ hiddens as $ key => $ val ) {
0 commit comments