streams/Zotlabs/Update/_1252.php

43 lines
928 B
PHP
Raw Normal View History

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