<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -191,7 +191,7 @@
 
 		public static function build_conditions($conds, &amp;$params, $tables = null) {
 			foreach ($conds as $key =&gt; $val) {
-				if (is_numeric($key)) # Full expression
+				if (is_int($key)) # Full expression
 					$cond = $val;
 				else { # Key =&gt; Val expression
 					if (is_string($val) and $val[0] == &quot;:&quot;)
@@ -199,30 +199,34 @@
 					else {
 						if (substr($key, -4) == &quot; not&quot;) { # Negation
 							$key = substr($key, 0, -4);
+							$param = str_replace(array(&quot;(&quot;, &quot;)&quot;), &quot;_&quot;, $key);
 							if (is_array($val))
 								$cond = $key.&quot; NOT IN &quot;.self::build_in($val);
 							elseif ($val === null)
 								$cond = $key.&quot; IS NOT NULL&quot;;
 							else {
-								$cond = $key.&quot; != :&quot;.$key;
-								$params[&quot;:&quot;.$key] = $val;
+								$cond = $key.&quot; != :&quot;.$param;
+								$params[&quot;:&quot;.$param] = $val;
 							}
 						} elseif (substr($key, -5) == &quot; like&quot;) { # LIKE
 							$key = substr($key, 0, -5);
-							$cond = $key.&quot; LIKE :&quot;.$key;
-							$params[&quot;:&quot;.$key] = $val;
+							$param = str_replace(array(&quot;(&quot;, &quot;)&quot;), &quot;_&quot;, $key);
+							$cond = $key.&quot; LIKE :&quot;.$param;
+							$params[&quot;:&quot;.$param] = $val;
 						} elseif (substr($key, -9) == &quot; not like&quot;) { # NOT LIKE
 							$key = substr($key, 0, -9);
-							$cond = $key.&quot; NOT LIKE :&quot;.$key;
-							$params[&quot;:&quot;.$key] = $val;
+							$param = str_replace(array(&quot;(&quot;, &quot;)&quot;), &quot;_&quot;, $key);
+							$cond = $key.&quot; NOT LIKE :&quot;.$param;
+							$params[&quot;:&quot;.$param] = $val;
 						} else { # Equation
 							if (is_array($val))
 								$cond = $key.&quot; IN &quot;.self::build_in($val);
 							elseif ($val === null)
 								$cond = $key.&quot; IS NULL&quot;;
 							else {
-								$cond = $key.&quot; = :&quot;.$key;
-								$params[&quot;:&quot;.$key] = $val;
+								$param = str_replace(array(&quot;(&quot;, &quot;)&quot;), &quot;_&quot;, $key);
+								$cond = $key.&quot; = :&quot;.$param;
+								$params[&quot;:&quot;.$param] = $val;
 							}
 						}
 					}</diff>
      <filename>includes/class/QueryBuilder.php</filename>
    </modified>
    <modified>
      <diff>@@ -1106,10 +1106,9 @@
 		foreach ($matches as $match) {
 			list($test, $equals,) = explode(&quot;:&quot;, $match);
 
-			if (in_array($test, $times)) {
-				$where[] = strtoupper($test).&quot;(created_at) = :created_&quot;.$test;
-				$params[&quot;:created_&quot;.$test] = $equals;
-			} elseif ($test == &quot;author&quot;) {
+			if (in_array($test, $times))
+				$where[strtoupper($test).&quot;(created_at)&quot;] = $equals;
+			elseif ($test == &quot;author&quot;) {
 				$user = new User(null, array(&quot;where&quot; =&gt; array(&quot;login&quot; =&gt; $equals)));
 				$where[&quot;user_id&quot;] = $user-&gt;id;
 			} elseif ($test == &quot;group&quot;) {</diff>
      <filename>includes/helpers.php</filename>
    </modified>
    <modified>
      <diff>@@ -748,10 +748,9 @@
 			preg_match_all(&quot;/\(([^\)]+)\)/&quot;, Config::current()-&gt;post_url, $matches);
 			$params = array();
 			foreach ($matches[1] as $attr)
-				if (in_array($attr, $times)) {
-					$where[] = strtoupper($attr).&quot;(created_at) = :created_&quot;.$attr;
-					$params[':created_'.$attr] = $get[$attr];
-				} elseif ($attr == &quot;author&quot;) {
+				if (in_array($attr, $times))
+					$where[strtoupper($attr).&quot;(created_at)&quot;] = $get[$attr];
+				elseif ($attr == &quot;author&quot;) {
 					$user = new User(array(&quot;where&quot; =&gt; array(&quot;login&quot; =&gt; $get['author'])));
 					$where[&quot;user_id&quot;] = $user-&gt;id;
 				} elseif ($attr == &quot;feathers&quot;)</diff>
      <filename>includes/model/Post.php</filename>
    </modified>
    <modified>
      <diff>@@ -446,25 +446,21 @@
 			if (!in_array(XML_RPC_FEATHER, Config::current()-&gt;enabled_feathers))
 				throw new Exception(_f(&quot;The %s feather is not enabled.&quot;, array(XML_RPC_FEATHER)));
 
-			$where = array('feather = :feather');
-			$params = array(':feather' =&gt; XML_RPC_FEATHER);
+			$where = array('feather' =&gt; XML_RPC_FEATHER);
 
 			if ($user-&gt;group()-&gt;can('view_own_draft', 'view_draft'))
-				$where[] = 'status IN ( &quot;public&quot;, &quot;draft&quot; )';
+				$where['status'] = array('public', 'draft');
 			else
-				$where[] = 'status = &quot;public&quot;';
+				$where['status'] = 'public';
 
-			if (!$user-&gt;group()-&gt;can('view_draft', 'edit_draft', 'edit_post', 'delete_draft', 'delete_post')) {
-				$where[] = 'user_id = :user_id';
-				$params[':user_id'] = $user-&gt;id;
-			}
+			if (!$user-&gt;group()-&gt;can('view_draft', 'edit_draft', 'edit_post', 'delete_draft', 'delete_post'))
+				$where['user_id'] = $user-&gt;id;
 
 			return Post::find(
 				array(
 					'where'  =&gt; $where,
 					'order'  =&gt; 'created_at DESC, id DESC',
-					'limit'  =&gt; $limit,
-					'params' =&gt; $params),
+					'limit'  =&gt; $limit),
 				array('filter' =&gt; false));
 		}
 
@@ -492,11 +488,8 @@
 				null,
 				array(
 					'where' =&gt; array(
-						'login = :login',
-						'password = :password'),
-					'params' =&gt; array(
-						':login' =&gt; $login,
-						':password' =&gt; md5($password))));
+						'login' =&gt; $login,
+						'password' =&gt; md5($password))));
 
 			if ($user-&gt;no_results)
 				throw new Exception(__(&quot;Login incorrect.&quot;));</diff>
      <filename>includes/xmlrpc.php</filename>
    </modified>
    <modified>
      <diff>@@ -60,10 +60,11 @@
 					                                 &quot;MONTH(created_at) AS month&quot;,
 					                                 &quot;created_at AS created_at&quot;,
 					                                 &quot;COUNT(id) AS posts&quot;),
-					                           array(&quot;YEAR(created_at) = :year&quot;),
+					                           array(&quot;YEAR(created_at)&quot; =&gt; $_GET['year']),
 					                           &quot;created_at DESC, id DESC&quot;,
-					                           array(&quot;:year&quot; =&gt; $_GET['year']),
-					                           null, null,
+					                           array(),
+					                           null,
+					                           null,
 					                           array(&quot;YEAR(created_at)&quot;, &quot;MONTH(created_at)&quot;));
 				else
 					$timestamps = $sql-&gt;select(&quot;posts&quot;,
@@ -74,7 +75,8 @@
 					                           null,
 					                           &quot;created_at DESC, id DESC&quot;,
 					                           array(),
-					                           null, null,
+					                           null,
+					                           null,
 					                           array(&quot;YEAR(created_at)&quot;, &quot;MONTH(created_at)&quot;));
 
 				$archives = array();
@@ -101,8 +103,7 @@
 				                                                       &quot;month&quot; =&gt; strftime(&quot;%B&quot;, $timestamp),
 				                                                       &quot;day&quot; =&gt; strftime(&quot;%e&quot;, $timestamp),
 				                                                       &quot;timestamp&quot; =&gt; $timestamp,
-				                                                       &quot;depth&quot; =&gt; $depth)
-				                              ));
+				                                                       &quot;depth&quot; =&gt; $depth)));
 			}
 			break;
 		case &quot;login&quot;:</diff>
      <filename>index.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>af7fc7e2ca49b0d56dfb023d164259831e87d0c4</id>
    </parent>
  </parents>
  <author>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </author>
  <url>http://github.com/vito/chyrp/commit/303cba317d4ec3af39c8b45a66a761da0369bb4b</url>
  <id>303cba317d4ec3af39c8b45a66a761da0369bb4b</id>
  <committed-date>2008-09-02T14:28:18-07:00</committed-date>
  <authored-date>2008-09-02T14:28:18-07:00</authored-date>
  <message>More SQL interfacing touch-ups.</message>
  <tree>1d2503685eb52649d4f290dfb7bbeed3a8d88afd</tree>
  <committer>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </committer>
</commit>
