From: Roland Haeder Date: Fri, 27 Feb 2015 15:55:03 +0000 (+0100) Subject: Merge branch 'nightly' of gitorious.org:social/mainline into nightly X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4f454abf7bc5d4a0e30a71e5ce5f73e71d40fff2;p=quix0rs-gnu-social.git Merge branch 'nightly' of gitorious.org:social/mainline into nightly Signed-off-by: Roland Haeder --- 4f454abf7bc5d4a0e30a71e5ce5f73e71d40fff2 diff --cc lib/apiaction.php index f1304a1d1e,062e6d0774..062e6d0774 mode 100644,100755..100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php diff --cc lib/framework.php index 283453f8eb,b71f365c24..6fe6028f6e --- a/lib/framework.php +++ b/lib/framework.php @@@ -102,31 -102,9 +102,31 @@@ function addPlugin($name, array $attrs= 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')) { diff --cc plugins/DomainStatusNetwork/actions/globalapi.php index faf38378ec,d47a254940..b283ce8da6 --- a/plugins/DomainStatusNetwork/actions/globalapi.php +++ b/plugins/DomainStatusNetwork/actions/globalapi.php @@@ -57,9 -57,9 +57,9 @@@ class GlobalApiAction extends Actio * @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); diff --cc plugins/LinkPreview/actions/oembedproxy.php index 095cfe03d7,97b0942441..c0473fb597 --- a/plugins/LinkPreview/actions/oembedproxy.php +++ b/plugins/LinkPreview/actions/oembedproxy.php @@@ -46,10 -46,10 +46,10 @@@ if (!defined('STATUSNET') && !defined(' */ 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');