aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1194.php
blob: 916723eaaa31687b6835a666a203926e74269395 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

namespace Zotlabs\Update;

class _1194 {
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');
			q("update item set mimetype = '%s' where resource_type = 'nwikipage' and resource_id = '%s'",
				dbesc($mimetype),
				dbesc($rv['resource_id'])
			);
		}
	}

	return UPDATE_SUCCESS;
}


}