|
|
@@ -39,16 +39,24 @@ class Dataoke
|
|
|
$q['original_id'] = $t['original_id'];
|
|
|
}
|
|
|
|
|
|
- if (count($q) > 0) {
|
|
|
- $s = "?" . http_build_query($q);
|
|
|
- } else {
|
|
|
- $s = "";
|
|
|
- }
|
|
|
+
|
|
|
if ($t['kw']) {
|
|
|
+ unset($q['kw']);
|
|
|
+ if (count($q) > 0) {
|
|
|
+ $s = "?" . http_build_query($q);
|
|
|
+ } else {
|
|
|
+ $s = "";
|
|
|
+ }
|
|
|
$new_url = "/kw/" . $t['kw'] . ".html" . $s;
|
|
|
$content = str_replace('"' . $url . '"', '"' . $new_url . '"', $content);
|
|
|
} else {
|
|
|
if ($t['cid']) {
|
|
|
+ unset($q['cid']);
|
|
|
+ if (count($q) > 0) {
|
|
|
+ $s = "?" . http_build_query($q);
|
|
|
+ } else {
|
|
|
+ $s = "";
|
|
|
+ }
|
|
|
$new_url = "/category/" . $t['cid'] . ".html".$s;
|
|
|
$content = str_replace('"' . $url . '"', '"' . $new_url . '"', $content);
|
|
|
} else {
|