Jump to:

5554 Posts in 1742 Topics by 1227 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Where to put custom sapphire core classes

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

Page: 1
Go to End
Author Topic: 981 Views
  • Kalileo
    Avatar
    Community Member
    127 Posts

    Where to put custom sapphire core classes Link to this post

    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)?

  • Kalileo
    Avatar
    Community Member
    127 Posts

    Re: Where to put custom sapphire core classes Link to this post

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

    981 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.