mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-09 18:08: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
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
abstract class wdcal_local
|
||||
{
|
||||
|
||||
|
@ -34,7 +36,7 @@ abstract class wdcal_local
|
|||
* @return wdcal_local
|
||||
*/
|
||||
static function getInstanceByUser($uid = 0) {
|
||||
$dateformat = get_pconfig($uid, "dav", "dateformat");
|
||||
$dateformat = PConfig::get($uid, "dav", "dateformat");
|
||||
$format = self::getInstance($dateformat);
|
||||
if ($format == null) $format = self::getInstance(self::LOCAL_US);
|
||||
return $format;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -23,7 +25,7 @@ function wdcal_addRequiredHeaders()
|
|||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/dav/wdcal/css/calendar.css' . '" media="all" />' . "\r\n";
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/dav/wdcal/css/main.css' . '" media="all" />' . "\r\n";
|
||||
|
||||
switch (get_config("system", "language")) {
|
||||
switch (Config::get("system", "language")) {
|
||||
case "de":
|
||||
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/dav/common/wdcal/js/wdCalendar_lang_DE.js"></script>' . "\r\n";
|
||||
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/dav/jqueryui/jquery.ui.datepicker-de.js"></script>' . "\r\n";
|
||||
|
@ -357,7 +359,7 @@ function wdcal_getSettingsPage(&$a)
|
|||
|
||||
if (isset($_REQUEST["save"])) {
|
||||
check_form_security_token_redirectOnErr('/dav/settings/', 'calprop');
|
||||
set_pconfig($a->user["uid"], "dav", "dateformat", $_REQUEST["wdcal_date_format"]);
|
||||
PConfig::set($a->user["uid"], "dav", "dateformat", $_REQUEST["wdcal_date_format"]);
|
||||
info(t('The new values have been saved.'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue