git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 93fabd71 authored by Clint Adams's avatar Clint Adams

Try URL encoding change again.

parent 5b422bf5
......@@ -160,7 +160,7 @@ function getAlbumArt($artist, $album) {
$Access_Key_ID = '1EST86JB355JBS3DFE82'; // this is mattl's personal key :)
$SearchIndex = 'Music';
$Keywords = urlencode($artist . ' ' . $album);
$Keywords = rawurlencode($artist . ' ' . $album);
$Operation = 'ItemSearch';
$Version = '2007-07-16';
$ResponseGroup = 'ItemAttributes,Images';
......@@ -201,13 +201,13 @@ function validateMBID($input) {
function forwardScrobble($userid, $artist, $album, $track, $time, $mbid, $source, $rating, $length) {
global $adodb, $lastfm_key, $lastfm_secret;
$artist = urlencode($artist);
$track = urlencode($track);
$album = urlencode($album);
$mbid = urlencode($mbid);
$source = urlencode($source);
$rating = urlencode($rating);
$length = urlencode($length);
$artist = rawurlencode($artist);
$track = rawurlencode($track);
$album = rawurlencode($album);
$mbid = rawurlencode($mbid);
$source = rawurlencode($source);
$rating = rawurlencode($rating);
$length = rawurlencode($length);
$res = $adodb->CacheGetAll(600, 'SELECT * FROM Service_Connections WHERE userid = ' . $userid . ' AND forward = 1');
foreach ($res as &$row) {
......
......@@ -300,9 +300,9 @@ class Auth_OpenID {
$pairs = array();
foreach ($data as $key => $value) {
if (is_array($value)) {
$pairs[] = urlencode($value[0])."=".urlencode($value[1]);
$pairs[] = rawurlencode($value[0])."=".rawurlencode($value[1]);
} else {
$pairs[] = urlencode($key)."=".urlencode($value);
$pairs[] = rawurlencode($key)."=".rawurlencode($value);
}
}
return implode("&", $pairs);
......
......@@ -58,7 +58,7 @@ $smarty->assign('extra_head_links', array(
'rel' => 'meta',
'type' => 'application/rdf+xml',
'title' => 'Album Metadata',
'href' => $base_url . '/rdf.php?fmt=xml&page=' . urlencode(htmlentities(str_replace($base_url, '', $album->getURL())))
'href' => $base_url . '/rdf.php?fmt=xml&page=' . rawurlencode(htmlentities(str_replace($base_url, '', $album->getURL())))
)
));
......
......@@ -371,7 +371,7 @@ function go_get_album_art($artist, $album){
$Access_Key_ID = '1EST86JB355JBS3DFE82'; // this is mattl's personal key :)
$SearchIndex = 'Music';
$Keywords = urlencode($artist . ' ' . $album);
$Keywords = rawurlencode($artist . ' ' . $album);
$Operation = 'ItemSearch';
$Version = '2007-07-16';
$ResponseGroup = 'ItemAttributes,Images';
......
......@@ -317,7 +317,7 @@ class Server {
}
return $base_url . '/user/' . rewrite_encode($username) . $component;
} else {
return $base_url . "/user-{$component}.php?user=" . urlencode($username);
return $base_url . "/user-{$component}.php?user=" . rawurlencode($username);
}
}
......@@ -326,7 +326,7 @@ class Server {
if ($friendly_urls) {
return $base_url . '/group/' . rewrite_encode($groupname);
} else {
return $base_url . '/group.php?group=' . urlencode($groupname);
return $base_url . '/group.php?group=' . rawurlencode($groupname);
}
}
......@@ -336,9 +336,9 @@ class Server {
return $base_url . '/artist/' . rewrite_encode($artist) . '/' . $component;
} else {
if ($component) {
return $base_url . '/artist-' . $component . '.php?artist=' . urlencode($artist);
return $base_url . '/artist-' . $component . '.php?artist=' . rawurlencode($artist);
} else {
return $base_url . '/artist.php?artist=' . urlencode($artist);
return $base_url . '/artist.php?artist=' . rawurlencode($artist);
}
}
}
......@@ -348,7 +348,7 @@ class Server {
if ($friendly_urls) {
return Server::getArtistURL($artist) . '/manage';
} else {
return $base_url . '/artist-manage.php?artist=' . urlencode($artist);
return $base_url . '/artist-manage.php?artist=' . rawurlencode($artist);
}
}
......@@ -357,7 +357,7 @@ class Server {
if ($friendly_urls) {
return Server::getArtistURL($artist) . '/album/add';
} else {
return $base_url . '/album-add.php?artist=' . urlencode($artist);
return $base_url . '/album-add.php?artist=' . rawurlencode($artist);
}
}
......@@ -366,7 +366,7 @@ class Server {
if ($friendly_urls) {
return $base_url . '/artist/' . rewrite_encode($artist) . '/album/' . rewrite_encode($album);
} else {
return $base_url . '/album.php?artist=' . urlencode($artist) . '&album=' . urlencode($album);
return $base_url . '/album.php?artist=' . rawurlencode($artist) . '&album=' . rawurlencode($album);
}
}
......@@ -375,7 +375,7 @@ class Server {
if ($friendly_urls) {
return Server::getAlbumURL($artist, $album) . '/track/add';
} else {
return $base_url . '/track-add.php?artist=' . urlencode($artist) . '&album=' . urlencode($album);
return $base_url . '/track-add.php?artist=' . rawurlencode($artist) . '&album=' . rawurlencode($album);
}
}
......@@ -394,11 +394,11 @@ class Server {
}
} else {
if($component) {
$trackurl = $base_url . '/track-' . $component . '.php?artist=' . urlencode($artist)
. '&album=' . urlencode($album) . '&track=' . urlencode($track);
$trackurl = $base_url . '/track-' . $component . '.php?artist=' . rawurlencode($artist)
. '&album=' . rawurlencode($album) . '&track=' . rawurlencode($track);
} else {
$trackurl = $baseurl . '/track.php?artist=' . urlencode($artist)
. '&album=' . urlencode($album) . '&track=' . urlencode($track);
$trackurl = $baseurl . '/track.php?artist=' . rawurlencode($artist)
. '&album=' . rawurlencode($album) . '&track=' . rawurlencode($track);
}
}
......@@ -412,7 +412,7 @@ class Server {
} else if ($friendly_urls) {
return $base_url . '/artist/' . rewrite_encode($artist) . '/track/' . rewrite_encode($track) . '/edit';
} else {
return $base_url . '/track-add.php?artist=' . urlencode($artist) . '&album=' . urlencode($album) . '&track=' . urlencode($track);
return $base_url . '/track-add.php?artist=' . rawurlencode($artist) . '&album=' . rawurlencode($album) . '&track=' . rawurlencode($track);
}
}
......@@ -421,7 +421,7 @@ class Server {
if ($friendly_urls) {
return $base_url . '/artist/' . rewrite_encode($artist) . '/album/' . rewrite_encode($album) . '/edit';
} else {
return $base_url . '/album-add.php?artist=' . urlencode($artist) . '&album=' . urlencode($album);
return $base_url . '/album-add.php?artist=' . rawurlencode($artist) . '&album=' . rawurlencode($album);
}
}
......@@ -430,7 +430,7 @@ class Server {
if ($friendly_urls) {
return $base_url . '/tag/' . rewrite_encode($tag);
} else {
return $base_url . '/tag.php?tag=' . urlencode($tag);
return $base_url . '/tag.php?tag=' . rawurlencode($tag);
}
}
......
......@@ -33,7 +33,7 @@ if (isset($_POST['install'])) {
//Get the database connection string
$dbms = $_POST['dbms'];
if ($dbms == 'sqlite') {
$filename = urlencode($_POST['filename']);
$filename = rawurlencode($_POST['filename']);
$connect_string = 'sqlite://' . $filename;
} else {
$connect_string = $dbms . '://' . $_POST['username'] . ':' . $_POST['password'] . '@' . $_POST['hostname'] . ':' . $_POST['port'] . '/' . $_POST['dbname'];
......
......@@ -61,7 +61,7 @@ if ($_REQUEST['country']) {
'rel' => 'meta',
'type' => 'application/rdf+xml',
'title' => 'FOAF',
'href' => $base_url . '/rdf.php?fmt=xml&page=' . urlencode(str_replace($base_url, '', $_SERVER['REQUEST_URI']))
'href' => $base_url . '/rdf.php?fmt=xml&page=' . rawurlencode(str_replace($base_url, '', $_SERVER['REQUEST_URI']))
)
));
......
......@@ -66,7 +66,7 @@ $smarty->assign('extra_head_links', array(
'rel' => 'meta',
'type' => 'application/rdf+xml',
'title' => 'Track Metadata',
'href' => $base_url . '/rdf.php?fmt=xml&page=' . urlencode(str_replace($base_url, '', $track->getURL()))
'href' => $base_url . '/rdf.php?fmt=xml&page=' . rawurlencode(str_replace($base_url, '', $track->getURL()))
)
));
......
......@@ -59,7 +59,7 @@ $smarty->assign('extra_head_links', array(
'rel' => 'meta',
'type' => 'application/rdf+xml',
'title' => 'FOAF',
'href' => $base_url . '/rdf.php?fmt=xml&page=' . urlencode(str_replace($base_url, '', $user->getURL('groups')))
'href' => $base_url . '/rdf.php?fmt=xml&page=' . rawurlencode(str_replace($base_url, '', $user->getURL('groups')))
)
));
......
......@@ -91,7 +91,7 @@ $smarty->assign('extra_head_links', array(
'rel' => 'meta',
'type' => 'application/rdf+xml',
'title' => 'FOAF',
'href' => $base_url . '/rdf.php?fmt=xml&page=' . urlencode(str_replace($base_url, '', $user->getURL()))
'href' => $base_url . '/rdf.php?fmt=xml&page=' . rawurlencode(str_replace($base_url, '', $user->getURL()))
)
));
$smarty->display('user-journal.tpl');
......@@ -65,7 +65,7 @@ if (isset($user->name)) {
'rel' => 'alternate',
'type' => 'application/rss+xml',
'title' => 'RSS 1.0 Feed (Recent plays)',
'href' => $base_url . '/rdf.php?fmt=rss&page=' . urlencode(str_replace($base_url, '', $user->getURL('recent-tracks')))
'href' => $base_url . '/rdf.php?fmt=rss&page=' . rawurlencode(str_replace($base_url, '', $user->getURL('recent-tracks')))
),
array(
'rel' => 'alternate',
......@@ -77,7 +77,7 @@ if (isset($user->name)) {
'rel' => 'meta',
'type' => 'application/rdf+xml',
'title' => 'FOAF',
'href' => $base_url . '/rdf.php?fmt=xml&page=' . urlencode(str_replace($base_url, '', $user->getURL()))
'href' => $base_url . '/rdf.php?fmt=xml&page=' . rawurlencode(str_replace($base_url, '', $user->getURL()))
)
));
......
......@@ -65,13 +65,13 @@ $smarty->assign('extra_head_links', array(
'rel' => 'alternate',
'type' => 'application/rss+xml',
'title' => 'RSS 1.0 Feed (Recent plays)',
'href' => $base_url . '/rdf.php?fmt=rss&page=' . urlencode(str_replace($base_url, '', $user->getURL('recent-tracks')))
'href' => $base_url . '/rdf.php?fmt=rss&page=' . rawurlencode(str_replace($base_url, '', $user->getURL('recent-tracks')))
),
array(
'rel' => 'meta',
'type' => 'application/rdf+xml',
'title' => 'FOAF',
'href' => $base_url . '/rdf.php?fmt=xml&page=' . urlencode(str_replace($base_url, '', $user->getURL()))
'href' => $base_url . '/rdf.php?fmt=xml&page=' . rawurlencode(str_replace($base_url, '', $user->getURL()))
)
));
......
......@@ -88,7 +88,7 @@ if (isset($user->name)) {
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'FOAF',
'href' => $base_url . '/rdf.php?fmt=xml&page=' . urlencode(str_replace($base_url, '', $user->getURL()))
'href' => $base_url . '/rdf.php?fmt=xml&page=' . rawurlencode(str_replace($base_url, '', $user->getURL()))
),
array(
'rel' => 'stylesheet',
......
......@@ -89,7 +89,7 @@ class ARC2 {
if (@include_once($path)) return 1;
/* try other path */
if ($prefix != 'ARC2') {
$path = $inc_path . strtolower($prefix) . '/' . $prefix . '_' . urlencode($f) . '.php';
$path = $inc_path . strtolower($prefix) . '/' . $prefix . '_' . rawurlencode($f) . '.php';
if (file_exists($path)) return include_once($path);
/* safe-mode hack */
if (@include_once($path)) return 1;
......@@ -123,7 +123,7 @@ class ARC2 {
/* */
static function toUTF8($v) {
if (urlencode($v) === $v) return $v;
if (rawurlencode($v) === $v) return $v;
//if (utf8_decode($v) == $v) return $v;
$v = (strpos(utf8_decode(str_replace('?', '', $v)), '?') === false) ? utf8_decode($v) : $v;
/* custom hacks, mainly caused by bugs in PHP's json_decode */
......
......@@ -41,9 +41,9 @@ if (!$num) {
$lang = 'en';
$uri = sprintf('http://ws.geonames.org/searchJSON?q=%s&maxRows=%d&lang=%s&style=full',
urlencode($query),
rawurlencode($query),
$num,
urlencode($lang));
rawurlencode($lang));
if (function_exists('curl_init')) {
# We'll try to use cURL if the extension is installed on this server.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment