aboutsummaryrefslogtreecommitdiffstats
path: root/install/update.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-12 23:15:30 -0700
committerzotlabs <mike@macgirvin.com>2017-09-12 23:15:30 -0700
commit796228b7ad3cac90b23de2954445021578635105 (patch)
tree9e6170a02e2f100c47ba06a5b3026b957351801f /install/update.php
parent7489a4442ea2041450b3477400c0ecb29b8670d9 (diff)
downloadvolse-hubzilla-796228b7ad3cac90b23de2954445021578635105.tar.gz
volse-hubzilla-796228b7ad3cac90b23de2954445021578635105.tar.bz2
volse-hubzilla-796228b7ad3cac90b23de2954445021578635105.zip
wiki mimetype selection. We can add text/plain as soon as we add code to purify and render it specifically.
Diffstat (limited to 'install/update.php')
-rw-r--r--install/update.php18
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