streams/Zotlabs/Update/_1097.php

25 lines
600 B
PHP
Raw Normal View History

<?php
namespace Zotlabs\Update;
2021-12-02 23:02:31 +00:00
class _1097
{
public function run()
{
2021-12-02 23:02:31 +00:00
// fix some mangled hublocs from a bug long ago
2021-12-02 23:02:31 +00:00
$r = q("select hubloc_id, hubloc_addr from hubloc where hubloc_addr like '%%/%%'");
if ($r) {
foreach ($r as $rr) {
2021-12-03 03:01:39 +00:00
q(
"update hubloc set hubloc_addr = '%s' where hubloc_id = %d",
2021-12-02 23:02:31 +00:00
dbesc(substr($rr['hubloc_addr'], 0, strpos($rr['hubloc_addr'], '/'))),
intval($rr['hubloc_id'])
);
}
}
return UPDATE_SUCCESS;
}
2021-12-03 03:01:39 +00:00
}