Some fixes from the platform
Use JDatabase instead of MySQL queries
Correct query format
Correct query format
Remove unnecessary empty()
There is no $request here

Is this the right way to define $request to get the limitstart parameter?
There is no $return here
Fix var name
The registry variable is named $config here
Fix silly typo
Fix getTemplate() issue which caused an undefined variable to be called.
changes for loadmodule styles
changing to default module style #1
removing commented code lines #1
Conditional to show header
Field mapping for core_urls field is wrong for weblinks.
Restore weblinks image code to layout.
 # [#31166] Undefined property: JTableCorecontent::$metakey. Thanks
Fedik Zinchuk
(Fix #1285)
 # [#30756] Blog layout has duplicate elements with "icons" ID. Thanks
David Hurley.
reverted small unwanted change