$cols) { foreach($cols as $col) { $q .= sprintf("UPDATE %s SET %s = replace(%s, '%s', '%s');\r\n", dbesc($table), dbesc($col), dbesc($col), dbesc($zot_xchan), dbesc($zot6_xchan) ); } } } if($q) file_put_contents($path, $q); $o = '

' . t('Update to Hubzilla 5.0 setp 2') . '


'; $o .= '

' . t('To complete the update please run') . '

'; if(ACTIVE_DBTYPE == DBTYPE_MYSQL) $o .= 'source ' . $_SERVER["DOCUMENT_ROOT"] . '/' . $path . '

from the mysql console.

'; else $o .= '\i ' . $_SERVER["DOCUMENT_ROOT"] . '/' . $path . '

from the postgresql console.

'; $o .= '

' . t('INFO: this command can take a very long time depending on your DB size.') . '

'; return $o; } function get_core_cols() { $core = [ 'abconfig' => ['xchan'], 'abook' => ['abook_xchan'], 'app' => ['app_author'], 'attach' => ['creator', 'allow_cid', 'deny_cid'], 'channel' => ['channel_allow_cid', 'channel_deny_cid'], 'chat' => ['chat_xchan'], 'chatpresence' => ['cp_xchan'], 'chatroom' => ['allow_cid', 'deny_cid'], 'config' => ['v'], 'dreport' => ['dreport_recip', 'dreport_xchan'], 'event' => ['event_xchan', 'allow_cid', 'deny_cid'], 'iconfig' => ['v'], 'item' => ['owner_xchan', 'author_xchan', 'source_xchan', 'route', 'allow_cid', 'deny_cid'], 'mail' => ['from_xchan', 'to_xchan'], 'menu_item' => ['allow_cid', 'deny_cid'], 'obj' => ['allow_cid', 'deny_cid'], 'pconfig' => ['v'], 'pgrp_member' => ['xchan'], 'photo' => ['xchan', 'allow_cid', 'deny_cid'], 'source' => ['src_channel_xchan', 'src_xchan'], 'updates' => ['ud_hash'], 'xchat' => ['xchat_xchan'], 'xconfig' => ['xchan', 'v'], 'xign' => ['xchan'], 'xlink' => ['xlink_xchan', 'xlink_link'], // 'xprof' => ['xprof_hash'], 'xtag' => ['xtag_hash'], ]; return $core; } }