nucleusの本体を改造してurlを操作する

java使い、intvalの仕様に驚くで少しかきましたが、
nucleusの本体を少し改造しました。
改造した箇所は2箇所です。
1つめは、/item/xxx/catid/xxというリンクを生成しなくしました。
2つめは、/item/123ABC/や/item/333/hogehogeのような、
ぼくの意図しないurlに対するリクエストにレスポンスを返さないようにしました。


1つめは、globalfunctions.phpのcreateLink()を改造します。
といっても1行だけで、最後のreturnするところを
return addLinkParams($url, “”);
にします。
2つめは、nucleusのルートフォルダ/itemを改造しました。

if ($itemid == 0) {
if(count($data) == 2) {
if(intval($data[1]) <= 0) {
$itemid = -1;
} else {
if(ereg("[0-9]+$|[0-9]+#more$",$data[1],$b)) {
$itemid = intval($b[0]);
} else {
$itemid = -1;
}
}
} else {
$itemid = -1;
}
}
selector();

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Comments

コメントはまだありません。

コメントする

(必須)

(必須)