Wikimedia España
/
inscripciones
/
inscribirse
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52a1272
)
Se importa la función wikiencode() creada por jem
author
Platonides
<platonides@gmail.com>
Mon, 21 May 2018 20:55:14 +0000
(22:55 +0200)
committer
Platonides
<platonides@gmail.com>
Mon, 21 May 2018 21:28:26 +0000
(23:28 +0200)
html/wiki.php
patch
|
blob
|
blame
|
history
diff --git
a/html/wiki.php
b/html/wiki.php
index 35c6c3aaf59e758b3d3a2b803cfa95ad3a6a0573..916017f07b8131891b162a82d6791901c2ef82f4 100644
(file)
--- a/
html/wiki.php
+++ b/
html/wiki.php
@@
-13,3
+13,13
@@
function parsecfg ($F) { # Se admiten matrices numéricas
}
return $D;
}
+
+function wikiencode ($URLA, $URLB = NULL, $URLC = NULL, $MI = AZ, $MF = az) {
+ $Cambios = array (
+ "+" => "_", "%3A" => ":", "%2F" => "/", # Inversión de urlencodes
+ "-" => "%2D"
+ );
+ $U = strtr (urlencode ($URLB), $Cambios);
+ if (substr ($U, -1) == ".") $U = substr_replace ($U, "%2E", -1, 1); # Codificar puntos solo al final del URL
+ return $MI . $URLA . $U . $URLC . $MF;
+}