mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-10 18:38:49 +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
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
function fromapp_install() {
|
||||
|
||||
|
@ -32,8 +33,8 @@ function fromapp_settings_post($a,$post) {
|
|||
if(! local_user() || (! x($_POST,'fromapp-submit')))
|
||||
return;
|
||||
|
||||
set_pconfig(local_user(),'fromapp','app',$_POST['fromapp-input']);
|
||||
set_pconfig(local_user(),'fromapp','force',intval($_POST['fromapp-force']));
|
||||
PConfig::set(local_user(),'fromapp','app',$_POST['fromapp-input']);
|
||||
PConfig::set(local_user(),'fromapp','force',intval($_POST['fromapp-force']));
|
||||
|
||||
info( t('Fromapp settings updated.') . EOL);
|
||||
}
|
||||
|
@ -49,11 +50,11 @@ function fromapp_settings(&$a,&$s) {
|
|||
|
||||
/* Get the current state of our config variable */
|
||||
|
||||
$fromapp = get_pconfig(local_user(),'fromapp','app');
|
||||
$fromapp = PConfig::get(local_user(),'fromapp','app');
|
||||
if($fromapp === false)
|
||||
$fromapp = '';
|
||||
|
||||
$force = intval(get_pconfig(local_user(),'fromapp','force'));
|
||||
$force = intval(PConfig::get(local_user(),'fromapp','force'));
|
||||
|
||||
$force_enabled = (($force) ? ' checked="checked" ' : '');
|
||||
|
||||
|
@ -90,8 +91,8 @@ function fromapp_post_hook(&$a,&$item) {
|
|||
if(local_user() != $item['uid'])
|
||||
return;
|
||||
|
||||
$app = get_pconfig(local_user(), 'fromapp', 'app');
|
||||
$force = intval(get_pconfig(local_user(), 'fromapp','force'));
|
||||
$app = PConfig::get(local_user(), 'fromapp', 'app');
|
||||
$force = intval(PConfig::get(local_user(), 'fromapp','force'));
|
||||
|
||||
if(($app === false) || (! strlen($app)))
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue