2021-09-24 19:55:17 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Zotlabs\Update;
|
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
class _1252
|
|
|
|
{
|
2021-09-24 19:55:17 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
public function run()
|
|
|
|
{
|
|
|
|
$sys = get_sys_channel();
|
|
|
|
if ($sys) {
|
|
|
|
$sitename = get_config('system', 'sitename');
|
|
|
|
$siteinfo = get_config('system', 'siteinfo');
|
2021-09-24 19:55:17 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
if ($sitename) {
|
2021-12-03 03:01:39 +00:00
|
|
|
q(
|
|
|
|
"update channel set channel_name = '%s' where channel_id = %d",
|
2021-12-02 23:02:31 +00:00
|
|
|
dbesc($sitename),
|
|
|
|
intval($sys['channel_id'])
|
|
|
|
);
|
2021-12-03 03:01:39 +00:00
|
|
|
q(
|
|
|
|
"update profile set fullname = '%s' where uid = %d and is_default = 1",
|
2021-12-02 23:02:31 +00:00
|
|
|
dbesc($sitename),
|
|
|
|
intval($sys['channel_id'])
|
|
|
|
);
|
2021-12-03 03:01:39 +00:00
|
|
|
q(
|
|
|
|
"update xchan set xchan_name = '%s', xchan_name_date = '%s' where xchan_hash = '%s'",
|
2021-12-02 23:02:31 +00:00
|
|
|
dbesc($sitename),
|
|
|
|
dbesc(datetime_convert()),
|
|
|
|
dbesc($sys['channel_hash'])
|
|
|
|
);
|
|
|
|
}
|
|
|
|
if ($siteinfo) {
|
2021-12-03 03:01:39 +00:00
|
|
|
q(
|
|
|
|
"update profile set about = '%s' where uid = %d and is_default = 1",
|
2021-12-02 23:02:31 +00:00
|
|
|
dbesc($siteinfo),
|
|
|
|
intval($sys['channel_id'])
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return UPDATE_SUCCESS;
|
|
|
|
}
|
2021-09-24 19:55:17 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
public function verify()
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2021-09-24 19:55:17 +00:00
|
|
|
}
|