Issue 3873

Replace deprecated functions with new syntax
This commit is contained in:
Adam Magness 2017-11-06 18:55:24 -05:00
parent 72474dc2f6
commit 48dcbc6f3f
61 changed files with 1036 additions and 920 deletions

View file

@ -16,6 +16,8 @@
*
*/
use Friendica\Core\Config;
function js_upload_install() {
register_hook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
@ -45,7 +47,7 @@ function js_upload_form(&$a,&$b) {
$cancel = t('Cancel');
$failed = t('Failed');
$maximagesize = intval(get_config('system','maximagesize'));
$maximagesize = intval(Config::get('system','maximagesize'));
$b['addon_text'] .= <<< EOT
@ -141,7 +143,7 @@ function js_upload_post_init(&$a,&$b) {
// max file size in bytes
$sizeLimit = get_config('system','maximagesize'); //6 * 1024 * 1024;
$sizeLimit = Config::get('system','maximagesize'); //6 * 1024 * 1024;
$uploader = new qqFileUploader($allowedExtensions, $sizeLimit);
@ -197,7 +199,7 @@ class qqUploadedFileXhr {
function save() {
$input = fopen("php://input", "r");
$upload_dir = get_config('system','tempdir');
$upload_dir = Config::get('system','tempdir');
if(! $upload_dir)
$upload_dir = sys_get_temp_dir();
@ -315,7 +317,7 @@ class qqFileUploader {
// }
$maximagesize = get_config('system','maximagesize');
$maximagesize = Config::get('system','maximagesize');
if(($maximagesize) && ($size > $maximagesize)) {
return array('error' => t('Image exceeds size limit of ') . $maximagesize );