Closed sirnone closed 6 years ago
@ximex can we merge?
@Fasse no. I will push some fixes today and i hope the rest tomorrow
Ok, no problem
There were many SELECT *
added.
Wouldn't it good if we change all SELECT *
to SELECT column_name, ...
to see exactly what columns we get and only return the columns we need?
Yes, I would also prefer a SELECT column_name
syntax.
more fixes are coming tomorrow.
But please someone fix the $user
bug
The $user bug ?!?
Look comment above. $user
is not defined
Which comment? I cant See a comment with $user!
The rest comes tomorrow. There are 4 files (htmlpage.php
, tablecategory.php
, tablemenu.php
, menu_function.php
) left where i have more to fix/improve.
@sirnone @Fasse could someone else does the SELECT *
changes?
@sirnone @Fasse i think there are two foreign keys missing
ALTER TABLE %PREFIX%_menu
ADD CONSTRAINT %PREFIX%_fk_men_men_parent FOREIGN KEY (men_men_id_parent) REFERENCES %PREFIX%_menu (men_id) ON DELETE SET NULL ON UPDATE RESTRICT,
ADD CONSTRAINT %PREFIX%_fk_men_com_id FOREIGN KEY (men_com_id) REFERENCES %PREFIX%_categories (cat_id) ON DELETE RESTRICT ON UPDATE RESTRICT;
I'm happy now -> could be merged. Maybe i find some more but that could be done later in master too
@ximex please test your changes:
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /admidio/adm_program/system/classes/htmlpage.php:750 Stack trace: #0 /admidio/adm_program/index.php(64): HtmlPage->showMainMenu() #1 {main} thrown in /admidio/adm_program/system/classes/htmlpage.php on line 750
@Fasse hmmm don't know were this changes get lost...
it's done :)
Sooo. I have done a quick overview. Things i found:
__DIR__
$g_root_path
-> useADMIDIO_URL
insteadI will fix most of this after fixing this i will look again more in detail
@sirnone most of this things shouldn't happen with a good IDE. What IDE do you use?