Commit 1e3ea1f0 authored by redflo's avatar redflo

Thanks to Peter Boisvert (pboisver) Keith Powers (k_w_powers) Robert (robbik) and anonymous

Fixed: 735910,736061,736012 and dups
parent dc0083c2
......@@ -613,7 +613,7 @@ class TikiLib {
if(!$user) return false;
$last = $this->getOne("select lastLogin from users_users where login='$user'");
$ret = Array();
$ret["lastVisit"] = $this->getOne("select lastLogin from users_users where login='$user'");
$ret["lastVisit"] = $last;
$ret["images"] = $this->getOne("select count(*) from tiki_images where created>$last");
$ret["pages"] = $this->getOne("select count(*) from tiki_pages where lastModif>$last");
$ret["files"] = $this->getOne("select count(*) from tiki_files where created>$last");
......@@ -3884,10 +3884,10 @@ class TikiLib {
preg_match_all("/\(\(($page_regex)\|(.+?)\)\)/",$data,$pages);
for($i=0;$i<count($pages[1]);$i++) {
$pattern = $pages[0][$i];
$pattern=str_replace('|','\|',$pattern);
$pattern=str_replace('(','\(',$pattern);
$pattern=str_replace(')','\)',$pattern);
$pattern=str_replace('/','\/',$pattern);
//$pattern=str_replace('|','\|',$pattern);
//$pattern=str_replace('(','\(',$pattern);
//$pattern=str_replace(')','\)',$pattern);
$pattern=str_replace('/','\/',preg_quote($pattern));
$pattern = "/".$pattern."/";
// Replace links to external wikis
......@@ -4014,9 +4014,10 @@ class TikiLib {
}
if( $this->is_cached($link) && $cachepages == 'y') {
$cosa="<a class=\"wikicache\" target=\"_blank\" href=\"tiki-view_cache.php?url=$link\">(cache)</a>";
$link2 = str_replace("/","\/",$link);
$link2 = str_replace("?","\?",$link2);
$link2 = str_replace("&","\&",$link2);
//$link2 = str_replace("/","\/",$link);
//$link2 = str_replace("?","\?",$link2);
//$link2 = str_replace("&","\&",$link2);
$link2=str_replace("/","\/",preg_quote($link));
$pattern = "/\[$link2\|([^\]\|]+)\|([^\]]+)\]/";
$data = preg_replace($pattern,"<a class='wiki' $target href='$link'>$1</a>",$data);
$pattern = "/\[$link2\|([^\]\|]+)\]/";
......@@ -4024,9 +4025,10 @@ class TikiLib {
$pattern = "/\[$link2\]/";
$data = preg_replace($pattern,"<a class='wiki' $target href='$link'>$link</a> $cosa",$data);
} else {
$link2 = str_replace("/","\/",$link);
$link2 = str_replace("?","\?",$link2);
$link2 = str_replace("&","\&",$link2);
//$link2 = str_replace("/","\/",$link);
//$link2 = str_replace("?","\?",$link2);
//$link2 = str_replace("&","\&",$link2);
$link2=str_replace("/","\/",preg_quote($link));
$pattern = "/\[$link2\|([^\]\|]+)([^\]])*\]/";
$data = preg_replace($pattern,"<a class='wiki' $target href='$link'>$1</a>",$data);
$pattern = "/\[$link2\]/";
......
......@@ -108,7 +108,7 @@
<tr>
<td class="odd"><input type="checkbox" name="perm[{$perms[user].permName}]" {if $perms[user].hasPerm eq 'y'}checked="checked"{/if}/></td>
<td class="odd">{$perms[user].permName}</td>
<td class="odd"><select name="level[{$perms[user].permName}]"><select name="level">{html_options output=$levels values=$levels selected=$perms[user].level}</select></td>
<td class="odd"><select name="level[{$perms[user].permName}]">{html_options output=$levels values=$levels selected=$perms[user].level}</select></td>
<!--<td class="odd">{$perms[user].hasPerm}</td>-->
<td class="odd">{$perms[user].type}</td>
<td class="odd">{$perms[user].permDesc}</td>
......
......@@ -46,7 +46,7 @@ if(!$tikilib->page_exists($page)) {
die;
}
if(isset($_REQUEST["delete"])) {
if(isset($_REQUEST["delete"]) && isset($_REQUEST["hist"])) {
foreach(array_keys($_REQUEST["hist"]) as $version) {
$tikilib->remove_version($_REQUEST["page"],$version);
}
......
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