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:
@@ -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;
|
||||
}
|
Reference in New Issue
Block a user