aboutsummaryrefslogblamecommitdiffstats
path: root/Zotlabs/Update/_1194.php
blob: 916723eaaa31687b6835a666a203926e74269395 (plain) (tree)





















                                                                                                                     
<?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;
}


}