wiki mimetype selection. We can add text/plain as soon as we add code to purify and render it specifically.

This commit is contained in:
zotlabs
2017-09-12 23:15:30 -07:00
parent 7489a4442e
commit 796228b7ad
5 changed files with 32 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1194 );
define( 'UPDATE_VERSION' , 1195 );
/**
*
@@ -2992,3 +2992,19 @@ function update_r1193() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
function update_r1194() {
$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');
q("update item set mimetype = '%s' where resource_type = 'nwikipage' and resource_id = '%s'",
dbesc($mimetype),
dbesc($rv['resource_id'])
);
}
}
return UPDATE_SUCCESS;
}