aboutsummaryrefslogblamecommitdiffstats
path: root/Zotlabs/Update/_1097.php
blob: bfe04cf5f11d2453a7ffa87c7374ef6f84661eb6 (plain) (tree)






















                                                                                                   
<?php

namespace Zotlabs\Update;

class _1097 {
function run() {

	// fix some mangled hublocs from a bug long ago

	$r = q("select hubloc_id, hubloc_addr from hubloc where hubloc_addr like '%%/%%'");
	if($r) {
		foreach($r as $rr) {
			q("update hubloc set hubloc_addr = '%s' where hubloc_id = %d",
				dbesc(substr($rr['hubloc_addr'],0,strpos($rr['hubloc_addr'],'/'))),
				intval($rr['hubloc_id'])
			);
		}
	}
	return UPDATE_SUCCESS;
	
}


}