Some bugfixes

This commit is contained in:
ivan 2017-10-01 11:02:50 +03:00
parent 8ebd1c6396
commit 0bb1d3aa66
2 changed files with 3 additions and 2 deletions

View File

@ -224,7 +224,7 @@ if ($_SESSION["SessionStatus"]==(md5($GBadmin.$GBpassword))) {
$_SESSION["DeleteStatus"]="deletion";
foreach($AdminEntries as $e=>$Entry) if (isset($_POST["cb$e"])) $_SESSION["DeleteEntries"][]=$e;
if (isset($_SESSION["DeleteEntries"])) if (!count($_SESSION["DeleteEntries"])) $_SESSION["DeleteStatus"]="";
} if (isset($_POST["submiteedit"])) if (($_POST["submiteedit"])&&($_SESSION["EditStatus"])) {
} if (isset($_POST["submiteedit"])) if (($_POST["submiteedit"])&&(isset($_SESSION["EditStatus"]))) {
$AdminEntries[($_SESSION["EditStatus"]-1)][0]=$_POST["editname"];
if (isset($_POST["editfrom"])) $AdminEntries[($_SESSION["EditStatus"]-1)][1]=$_POST["editfrom"];
else $AdminEntries[($_SESSION["EditStatus"]-1)][1]="";

View File

@ -62,7 +62,7 @@ function CheckFile() {
}
function AddHttp($Link) {
if (!preg_match("~^(?:f|ht)tps?://~i",$Link)) {
if (!$Link=="") if (!preg_match("~^(?:f|ht)tps?://~i",$Link)) {
$Link = "http://".$Link;
}
return $Link;
@ -260,6 +260,7 @@ function EntriesView() {
$EntriesReplySorted=$Entries;
if (isset($Entries)) foreach($Entries as $Entry) {
if (isset($Entry[9])) {
unset($a); unset($b);
foreach($EntriesReplySorted as $n=>$EntrySort) if ($EntrySort[5]==$Entry[5]) $a=$n;
foreach($EntriesReplySorted as $n=>$EntrySort) if ($EntrySort[5]==$Entry[9]) $b=$n;
if (isset($b)) {