From 9abd95fad3784a10fc48bc40f9b8a75d7d74edda Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 31 Mar 2016 16:06:03 -0700 Subject: static App --- mod/profile_photo.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'mod/profile_photo.php') diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 789989ff2..bac93555f 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -67,7 +67,7 @@ function profile_photo_init(&$a) { return; } - $channel = $a->get_channel(); + $channel = App::get_channel(); profile_load($a,$channel['channel_address']); } @@ -171,7 +171,7 @@ function profile_photo_post(&$a) { return; } - $channel = $a->get_channel(); + $channel = App::get_channel(); // If setting for the default profile, unset the profile photo flag from any other photos I own @@ -236,7 +236,7 @@ function profile_photo_post(&$a) { require_once('include/attach.php'); - $res = attach_store($a->get_channel(), get_observer_hash(), '', array('album' => t('Profile Photos'), 'hash' => $hash)); + $res = attach_store(App::get_channel(), get_observer_hash(), '', array('album' => t('Profile Photos'), 'hash' => $hash)); logger('attach_store: ' . print_r($res,true)); @@ -290,7 +290,7 @@ function profile_photo_content(&$a) { return; } - $channel = $a->get_channel(); + $channel = App::get_channel(); $newuser = false; @@ -389,12 +389,12 @@ function profile_photo_content(&$a) { intval(local_channel()) ); - if(! x($a->data,'imagecrop')) { + if(! x(App::$data,'imagecrop')) { $tpl = get_markup_template('profile_photo.tpl'); $o .= replace_macros($tpl,array( - '$user' => $a->channel['channel_address'], + '$user' => App::$channel['channel_address'], '$lbl_upfile' => t('Upload File:'), '$lbl_profiles' => t('Select a profile:'), '$title' => t('Upload Profile Photo'), @@ -404,7 +404,7 @@ function profile_photo_content(&$a) { '$profile0' => $profiles[0], '$form_security_token' => get_form_security_token("profile_photo"), // FIXME - yuk - '$select' => sprintf('%s %s', t('or'), ($newuser) ? '' . t('skip this step') . '' : '' . t('select a photo from your photo albums') . '') + '$select' => sprintf('%s %s', t('or'), ($newuser) ? '' . t('skip this step') . '' : '' . t('select a photo from your photo albums') . '') )); call_hooks('profile_photo_content_end', $o); @@ -412,13 +412,13 @@ function profile_photo_content(&$a) { return $o; } else { - $filename = $a->data['imagecrop'] . '-' . $a->data['imagecrop_resolution']; - $resolution = $a->data['imagecrop_resolution']; + $filename = App::$data['imagecrop'] . '-' . App::$data['imagecrop_resolution']; + $resolution = App::$data['imagecrop_resolution']; $tpl = get_markup_template("cropbody.tpl"); $o .= replace_macros($tpl,array( '$filename' => $filename, '$profile' => intval($_REQUEST['profile']), - '$resource' => $a->data['imagecrop'] . '-' . $a->data['imagecrop_resolution'], + '$resource' => App::$data['imagecrop'] . '-' . App::$data['imagecrop_resolution'], '$image_url' => z_root() . '/photo/' . $filename, '$title' => t('Crop Image'), '$desc' => t('Please adjust the image cropping for optimum viewing.'), @@ -459,9 +459,9 @@ function profile_photo_crop_ui_head(&$a, $ph, $hash, $smallest){ } - $a->data['imagecrop'] = $hash; - $a->data['imagecrop_resolution'] = $smallest; - $a->page['htmlhead'] .= replace_macros(get_markup_template("crophead.tpl"), array()); + App::$data['imagecrop'] = $hash; + App::$data['imagecrop_resolution'] = $smallest; + App::$page['htmlhead'] .= replace_macros(get_markup_template("crophead.tpl"), array()); return; } -- cgit v1.2.3