diff options
Diffstat (limited to 'install')
-rw-r--r-- | install/update.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php index ce9a50913..8c9f83033 100644 --- a/install/update.php +++ b/install/update.php @@ -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; +}
\ No newline at end of file |