<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — minor change in restore functions]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=5988</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5988&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in minor change in restore functions.]]></description>
		<lastBuildDate>Mon, 19 Oct 2015 08:16:39 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: minor change in restore functions]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=24538#p24538</link>
			<description><![CDATA[<p>you are right.</p>]]></description>
			<author><![CDATA[null@example.com (serbanc)]]></author>
			<pubDate>Mon, 19 Oct 2015 08:16:39 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=24538#p24538</guid>
		</item>
		<item>
			<title><![CDATA[Re: minor change in restore functions]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=24535#p24535</link>
			<description><![CDATA[<p>Blindly rewriting the input seems dangerous enough as it is. Your proposal means any sequence of digits followed by an underscore will be replaced, whereas it can currently only happen to the string &quot;0_&quot;.</p><p>I suggest line 305 be removed. Or at the very least be changed to consider some context. To make it foolproof we would need a parser for SQL, but extending the matched strings to each of the &quot;allowed commands&quot; might be good enough. At least until someone starts storing SQL queries in the database...</p><p>I&#039;m thinking something like<br />preg_replace(&quot;/CREATE TABLE \d+_/i&quot;, &quot;CREATE TABLE &quot;.$connection[&#039;tbpref&#039;], $line);<br />preg_replace(&quot;/INSERT INTO \d+_/i&quot;, &quot;INSERT INTO &quot;.$connection[&#039;tbpref&#039;], $line);<br />...</p><p>It might work, but it&#039;s not pretty.</p>]]></description>
			<author><![CDATA[null@example.com (tm)]]></author>
			<pubDate>Sun, 18 Oct 2015 05:32:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=24535#p24535</guid>
		</item>
		<item>
			<title><![CDATA[minor change in restore functions]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=24534#p24534</link>
			<description><![CDATA[<p>Gents,<br />I propose changing the line 305 in /admin/db/maintenance_db.inc from:<br />$line = str_replace(&quot;0_&quot;, $connection[&quot;tbpref&quot;], $line);<br />to<br />$line = preg_replace(&#039;/\d+_/&#039;, $connection[&#039;tbpref&#039;], $line);</p><p>This way, any restore with any prefix will be converted to current table prefix.</p><p>Regards,<br />Serban</p>]]></description>
			<author><![CDATA[null@example.com (serbanc)]]></author>
			<pubDate>Sat, 17 Oct 2015 21:09:12 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=24534#p24534</guid>
		</item>
	</channel>
</rss>
