Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba

Where to put custom sapphire core classes


Go to End
Reply


2 Posts   1114 Views

Avatar
Kalileo

Community Member, 127 Posts

29 March 2010 at 3:41pm

If I want to add a class, such as Malte's "class UTF8MySQLDatabase extends MySQLDatabase" I assumed I could just put it in mysite/code and it would be picked up there automatically. However, if I do that I get a "Fatal Error" :

[Sun Mar 28 19:14:17 2010] [error] [client xxx.xxx.xx.xxx] PHP Fatal error:  Class 'UTF8MySQLDatabase' not found in /....../htdocs/sapphire/core/model/DB.php on line 94, referer: http://mysite.com/.../

So the question is, where can I put it? Obviously it works if I put it in the sapphire core next to MySQLDatabase, but there must be a better way. Is there (using SS 2.4 beta)?

Avatar
Kalileo

Community Member, 127 Posts

29 March 2010 at 3:52pm

Here's the link to the class Malte's UTF8MySQLDatabase class in case you need more info about what I'm trying to do.