mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-12 03:18:48 +00:00
Issue 3873
Replace deprecated functions with new syntax
This commit is contained in:
parent
72474dc2f6
commit
48dcbc6f3f
61 changed files with 1036 additions and 920 deletions
|
@ -20,6 +20,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
function geonames_install() {
|
||||
|
||||
|
@ -91,8 +93,8 @@ function geonames_post_hook($a, &$item) {
|
|||
|
||||
/* Retrieve our personal config setting */
|
||||
|
||||
$geo_account = get_config('geonames', 'username');
|
||||
$active = get_pconfig(local_user(), 'geonames', 'enable');
|
||||
$geo_account = Config::get('geonames', 'username');
|
||||
$active = PConfig::get(local_user(), 'geonames', 'enable');
|
||||
|
||||
if((! $geo_account) || (! $active))
|
||||
return;
|
||||
|
@ -138,7 +140,7 @@ function geonames_post_hook($a, &$item) {
|
|||
function geonames_plugin_admin_post($a,$post) {
|
||||
if(! local_user() || (! x($_POST,'geonames-submit')))
|
||||
return;
|
||||
set_pconfig(local_user(),'geonames','enable',intval($_POST['geonames']));
|
||||
PConfig::set(local_user(),'geonames','enable',intval($_POST['geonames']));
|
||||
|
||||
info( t('Geonames settings updated.') . EOL);
|
||||
}
|
||||
|
@ -158,7 +160,7 @@ function geonames_plugin_admin(&$a,&$s) {
|
|||
if(! local_user())
|
||||
return;
|
||||
|
||||
$geo_account = get_config('geonames', 'username');
|
||||
$geo_account = Config::get('geonames', 'username');
|
||||
|
||||
if(! $geo_account)
|
||||
return;
|
||||
|
@ -169,7 +171,7 @@ function geonames_plugin_admin(&$a,&$s) {
|
|||
|
||||
/* Get the current state of our config variable */
|
||||
|
||||
$enabled = get_pconfig(local_user(),'geonames','enable');
|
||||
$enabled = PConfig::get(local_user(),'geonames','enable');
|
||||
|
||||
$checked = (($enabled) ? ' checked="checked" ' : '');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue