function _have_config()
{
- return StatusNet::haveConfig();
+ return GNUsocial::haveConfig();
}
+function common_get_temp_dir()
+{
+ // Try to get it from php.ini first
+ $temp_path = trim(ini_get('upload_tmp_dir'));
+
+ // Is it empty?
+ if (strlen($temp_path) == 0) {
+ // Then try sys_get_temp_dir()
+ $temp_path = trim(sys_get_temp_dir());
+
+ // Still empty?
+ if (strlen($temp_path) == 0) {
+ // Then set it to /tmp (ugly)
+ // @TODO Hard-coded non-Windows stuff!
+ $temp_path = '/tmp';
+ }
+ }
+
+ // Return found path
+ return $temp_path;
+}
+
function GNUsocial_class_autoload($cls)
{
if (file_exists(INSTALLDIR.'/classes/' . $cls . '.php')) {
* @return boolean continuation flag
*/
- function prepare($args)
+ function prepare(array $args=array())
{
- StatusNet::setApi(true); // reduce exception reports to aid in debugging
+ GNUsocial::setApi(true); // reduce exception reports to aid in debugging
parent::prepare($args);
*/
class OembedproxyAction extends OembedAction
{
- function handle($args)
+ function handle(array $args=array())
{
// Trigger short error responses; not a human-readable web page.
- StatusNet::setApi(true);
+ GNUsocial::setApi(true);
// We're not a general oEmbed proxy service; limit to valid sessions.
$token = $this->trimmed('token');