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

@ -7,6 +7,7 @@
* Author: Tony Baldwin <https://free-haven.org/profile/tony>
*/
use Friendica\Core\PConfig;
function planets_install() {
@ -78,7 +79,7 @@ function planets_post_hook($a, &$item) {
/* Retrieve our personal config setting */
$active = get_pconfig(local_user(), 'planets', 'enable');
$active = PConfig::get(local_user(), 'planets', 'enable');
if(! $active)
return;
@ -116,7 +117,7 @@ function planets_settings_post($a,$post) {
if(! local_user())
return;
if($_POST['planets-submit'])
set_pconfig(local_user(),'planets','enable',intval($_POST['planets']));
PConfig::set(local_user(),'planets','enable',intval($_POST['planets']));
}
@ -140,7 +141,7 @@ function planets_settings(&$a,&$s) {
/* Get the current state of our config variable */
$enabled = get_pconfig(local_user(),'planets','enable');
$enabled = PConfig::get(local_user(),'planets','enable');
$checked = (($enabled) ? ' checked="checked" ' : '');