Improvements and typos

This commit is contained in:
genuineparts 2025-06-23 20:13:52 +02:00
parent 3bdbc74b0e
commit 5b27274fa7
13 changed files with 78 additions and 75 deletions

View file

@ -1,4 +1,4 @@
<?php
<?php global $session;
/**
* Project: astat - simple site engine
* File: /modules/text/edit.apnl.php
@ -91,7 +91,7 @@ class edit_text_panel extends admin_module{
while($rowa=$db->fetch_array($resultn)){
$cat[$rowa["c_id"]]=TRUE;
}
$resultk=$db->query("SELECT `id`,`categoryname` FROM `" . $config["prefix"] . "article_categorys` WHERE `active`='true'");
$resultk=$db->query("SELECT `id`,`categoryname` FROM `" . $config["prefix"] . "article_categories` WHERE `active`='true'");
while($row=$db->fetch_array($resultk)){
if($cat[$row["id"]]==TRUE){
$row["checked"]="checked=\"checked\"";
@ -132,7 +132,7 @@ class edit_text_panel extends admin_module{
}else{
$result = $db->query("SELECT a.title,a.id,a.active,a.date,a.url,u.username FROM `" . $config["prefix"] . "article` a LEFT JOIN `" . $config["prefix"] . "users` u on a.`author`=u.`uid`");
while($row=$db->fetch_array($result, $db->ASSOC)){
$cresult=$db->query("SELECT a.`categoryname` FROM `" . $config["prefix"] . "article_categorys` a LEFT JOIN `" . $config["prefix"] . "article_category` c on a.`id`=c.`c_id` WHERE c.`a_id`='".$row["id"]."'");
$cresult=$db->query("SELECT a.`categoryname` FROM `" . $config["prefix"] . "article_categories` a LEFT JOIN `" . $config["prefix"] . "article_category` c on a.`id`=c.`c_id` WHERE c.`a_id`='".$row["id"]."'");
while($crow=$db->fetch_array($cresult, $db->ASSOC)){
if(!$row["categoryname"]){
$row["categoryname"]=$crow["categoryname"];