]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/common.php
fix ModPlus 'remote profile options' popup for Realtime
[quix0rs-gnu-social.git] / lib / common.php
index 94540e3a8520d8c8c7eb6db42928aaa0ba3eefa3..db111df5f9e3996ea958cdb9850ab0e7a9564e6a 100644 (file)
@@ -36,6 +36,7 @@ define('AVATAR_MINI_SIZE', 24);
 
 define('NOTICES_PER_PAGE', 20);
 define('PROFILES_PER_PAGE', 20);
+define('MESSAGES_PER_PAGE', 20);
 
 define('FOREIGN_NOTICE_SEND', 1);
 define('FOREIGN_NOTICE_RECV', 2);
@@ -100,7 +101,11 @@ function _have_config()
     return StatusNet::haveConfig();
 }
 
-function __autoload($cls)
+/**
+ * Wrapper for class autoloaders.
+ * This used to be the special function name __autoload(), but that causes bugs with PHPUnit 3.5+
+ */
+function autoload_sn($cls)
 {
     if (file_exists(INSTALLDIR.'/classes/' . $cls . '.php')) {
         require_once(INSTALLDIR.'/classes/' . $cls . '.php');
@@ -116,6 +121,8 @@ function __autoload($cls)
     }
 }
 
+spl_autoload_register('autoload_sn');
+
 // XXX: how many of these could be auto-loaded on use?
 // XXX: note that these files should not use config options
 // at compile time since DB config options are not yet loaded.