streams/Zotlabs/Update/_1194.php

24 lines
584 B
PHP
Raw Normal View History

<?php
namespace Zotlabs\Update;
2021-12-02 23:02:31 +00:00
class _1194
{
public function run()
{
$r = q("select id, resource_id from item where resource_type = 'nwiki'");
if ($r) {
foreach ($r as $rv) {
$mimetype = get_iconfig($rv['id'], 'wiki', 'mimeType');
2021-12-03 03:01:39 +00:00
q(
"update item set mimetype = '%s' where resource_type = 'nwikipage' and resource_id = '%s'",
2021-12-02 23:02:31 +00:00
dbesc($mimetype),
dbesc($rv['resource_id'])
);
}
}
2021-12-02 23:02:31 +00:00
return UPDATE_SUCCESS;
}
2021-12-03 03:01:39 +00:00
}