<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Forum posts to 'Extending and hacking'</title>
		<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/</link>
		

		
		<item>
			<title>Re: temp fix for if Odd bug</title>
			<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/70653?showPost=70682</link>
			<description>i just uploaded to open.silverstripe.com - i added the file to the original trouble ticket. not sure if that's the right way to do it.&lt;br&gt;&lt;br&gt;Posted to: temp fix for if Odd bug</description>
			<pubDate>Tue, 13 May 2008 15:27:23 +1200</pubDate>
			<author> </author>
			<guid>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/70653?showPost=70682</guid>
		</item>
		
		<item>
			<title>Re: temp fix for if Odd bug</title>
			<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/70653?showPost=70662</link>
			<description>That fix looks good; can you post it to open.silverstripe.com so that we can integrate it with the core? :-)&lt;br&gt;&lt;br&gt;Posted to: temp fix for if Odd bug</description>
			<pubDate>Tue, 13 May 2008 14:35:57 +1200</pubDate>
			<author>Sam Minnee</author>
			<guid>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/70653?showPost=70662</guid>
		</item>
		
		<item>
			<title>temp fix for if Odd bug</title>
			<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/70653</link>
			<description>i noticed there was a 3-month old, [url=http://open.silverstripe.com/ticket/2243]low priority ticket[/url] for the  [b]if Odd[/b] failing. i came up with what is probably a dirty hack, but basically i changed:&lt;br /&gt;&lt;br /&gt;line 647 in VariableData.php from&lt;br /&gt;&lt;br /&gt;[code]&lt;br /&gt;function Odd() {&lt;br /&gt;	return !$this-&amp;gt;iteratorPos % 2;&lt;br /&gt;}&lt;br /&gt;[/code]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;to&lt;br /&gt;&lt;br /&gt;[code]&lt;br /&gt;function Odd() {&lt;br /&gt;	return !$this-&amp;gt;Even();&lt;br /&gt;}&lt;br /&gt;[/code]&lt;br /&gt;&lt;br /&gt;it seems to work, and so far hasn't caused any weird spikes in performance. hope this helps those of you in need of a quick fix, until someone who knows PHP can fix it properly.&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br&gt;Posted to: temp fix for if Odd bug</description>
			<pubDate>Tue, 13 May 2008 13:21:52 +1200</pubDate>
			<author> </author>
			<guid>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/70653</guid>
		</item>
		

	</channel>
</rss>
