<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Error in admin.class.php"]]></title>
		<link>https://proxy2.de/forum/posts/list/3.php</link>
		<description><![CDATA[Latest messages posted in the topic "Error in admin.class.php"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Error in admin.class.php</title>
				<description><![CDATA[ I found this small error in the lib/admin.class.php.<br /> If you have magic_quotes turned off, you can't update entries in the admin section if there is any single quote in any field.<br /> Simply add this line<br /> [code]reset&#40;$_POST&#41;;[/code]<br /> just after<br /> [code]function update_record&#40;$entry_id,$tbl=&quot;gb&quot;&#41; &#123;<br />     global $_POST;<br />     $gb_tbl = &#40;$tbl==&quot;priv&quot;&#41; ? $this-&gt;table&#91;'priv'&#93; &#58; $this-&gt;table&#91;'data'&#93;;[/code]<br /> <br /> and the problem is solved.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4522/15649.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4522/15649.php</link>
				<pubDate><![CDATA[Sun, 17 Apr 2005 20:57:01]]> GMT</pubDate>
				<author><![CDATA[ Anonymous]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ fixed.<br /> Yes, it's still not 100% bug free.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4522/15650.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4522/15650.php</link>
				<pubDate><![CDATA[Sun, 17 Apr 2005 21:48:21]]> GMT</pubDate>
				<author><![CDATA[ Webmaster]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ I replaced the whole of <br /> [code]        if &#40;!get_magic_quotes_gpc&#40;&#41; &#41; &#123;<br />             while &#40;list&#40;$var, $value&#41;=each&#40;$HTTP_POST_VARS&#41;&#41; &#123;<br />                 $HTTP_POST_VARS&#91;$var&#93;=addslashes&#40;$value&#41;;<br />             &#125;<br />         &#125;<br />         reset&#40;$HTTP_POST_VARS&#41;;<br />         while &#40;list&#40;$var, $value&#41;=each&#40;$HTTP_POST_VARS&#41;&#41; &#123;<br />             $HTTP_POST_VARS&#91;$var&#93;=trim&#40;$value&#41;;<br />         &#125;[/code]<br /> with<br /> [code]				$magicq = get_magic_quotes_gpc&#40;&#41;;<br />         while &#40;list&#40;$var, $value&#41;=each&#40;$_POST&#41;&#41; &#123;<br />             if &#40;$magicq&#41; &#123;<br />                 $_POST&#91;$var&#93; = trim&#40;$value&#41;;<br />             &#125; else &#123;<br />                 $_POST&#91;$var&#93; = addslashes&#40;trim&#40;&#40;$value&#41;&#41;&#41;;<br />             &#125;    <br />         &#125;[/code]]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4522/15651.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4522/15651.php</link>
				<pubDate><![CDATA[Sun, 17 Apr 2005 23:17:29]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ You forgot to add the reset($_POST) function. You don't where the array pointer is. You have to use reset() if you want to traverse the array again using each.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4522/15656.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4522/15656.php</link>
				<pubDate><![CDATA[Mon, 18 Apr 2005 08:30:56]]> GMT</pubDate>
				<author><![CDATA[ Anonymous]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ There should be no need to reset the array as it has not been looped. I will test it with magic quotes turned off on my test server but it worked fine on my website.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4522/15659.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4522/15659.php</link>
				<pubDate><![CDATA[Mon, 18 Apr 2005 10:46:54]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ The script has already looped the each($_POST). It's in the first lines of the admin.php.<br /> You wrote the code better, but that doesn't solve the bug I found it on my server.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4522/15660.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4522/15660.php</link>
				<pubDate><![CDATA[Mon, 18 Apr 2005 11:23:59]]> GMT</pubDate>
				<author><![CDATA[ Anonymous]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ I'll throw in a reset then. From what you have said about the bug something must be causing a problem earlier in the script when magic quotes are off. I'll go through code later and see if I can't tighten anything up.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4522/15661.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4522/15661.php</link>
				<pubDate><![CDATA[Mon, 18 Apr 2005 11:33:22]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ When magic quotes are on, those lines aren't needed so you don't notice the bug.]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4522/15662.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4522/15662.php</link>
				<pubDate><![CDATA[Mon, 18 Apr 2005 12:05:29]]> GMT</pubDate>
				<author><![CDATA[ Anonymous]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Actually I see what you are on about. I have gone back to the original code as I felt mine increased processing time because it had to read the variable with each item in the array. Anyway I am now using<br /> [code]reset&#40;$_POST&#41;;<br /> if &#40;!get_magic_quotes_gpc&#40;&#41;&#41; &#123;<br />    while &#40;list&#40;$var, $value&#41;=each&#40;$_POST&#41;&#41; &#123; <br />       $_POST&#91;$var&#93;=addslashes&#40;$value&#41;; <br />    &#125; <br /> &#125; else &#123;<br />    while &#40;list&#40;$var, $value&#41;=each&#40;$_POST&#41;&#41; &#123; <br />       $_POST&#91;$var&#93;=trim&#40;$value&#41;; <br />    &#125;<br /> &#125;[/code]]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4522/15669.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4522/15669.php</link>
				<pubDate><![CDATA[Mon, 18 Apr 2005 17:49:48]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
			<item>
				<title></title>
				<description><![CDATA[ Obviously I meant<br /> [code]$_POST&#91;$var&#93;=addslashes&#40;trim&#40;$value&#41;&#41;;[/code]]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/4522/15672.php</guid>
				<link>https://proxy2.de/forum/posts/preList/4522/15672.php</link>
				<pubDate><![CDATA[Mon, 18 Apr 2005 21:41:16]]> GMT</pubDate>
				<author><![CDATA[ Carbonize]]></author>
			</item>
	</channel>
</rss>