<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -199,6 +199,6 @@
 			if (Trigger::current()-&gt;exists(&quot;delete_&quot;.$model))
 				Trigger::current()-&gt;call(&quot;delete_&quot;.$model, new $class($id));
 
-			SQL::current()-&gt;delete(pluralize($model), &quot;id = :id&quot;, array(&quot;:id&quot; =&gt; $id));
+			SQL::current()-&gt;delete(pluralize($model), array(&quot;id&quot; =&gt; $id));
 		}
 	}</diff>
      <filename>includes/class/Model.php</filename>
    </modified>
    <modified>
      <diff>@@ -46,7 +46,7 @@
 
 			$sql = SQL::current();
 
-			if ($sql-&gt;count(&quot;sessions&quot;, &quot;id = :id&quot;, array(&quot;:id&quot; =&gt; $id)))
+			if ($sql-&gt;count(&quot;sessions&quot;, array(&quot;id&quot; =&gt; $id)))
 				$sql-&gt;update(&quot;sessions&quot;,
 				             array(&quot;id&quot; =&gt; $id),
 				             array(&quot;data&quot; =&gt; $data,</diff>
      <filename>includes/class/Session.php</filename>
    </modified>
    <modified>
      <diff>@@ -471,10 +471,8 @@
 						Post::delete($post-&gt;id);
 				elseif ($_POST['posts'] == &quot;move&quot;)
 					$sql-&gt;update(&quot;posts&quot;,
-					             &quot;user_id = :deleting_id&quot;,
-					             array(&quot;user_id&quot; =&gt; &quot;:user_id&quot;),
-					             array(&quot;:user_id&quot; =&gt; $_POST['move_posts'],
-					                   &quot;:deleting_id&quot; =&gt; $user-&gt;id));
+					             array(&quot;user_id&quot; =&gt; $user-&gt;id),
+					             array(&quot;user_id&quot; =&gt; $_POST['move_posts']));
 			}
 
 			if (isset($_POST['pages'])) {
@@ -483,10 +481,8 @@
 						Page::delete($page-&gt;id);
 				elseif ($_POST['pages'] == &quot;move&quot;)
 					$sql-&gt;update(&quot;pages&quot;,
-					             &quot;user_id = :deleting_id&quot;,
-					             array(&quot;user_id&quot; =&gt; &quot;:user_id&quot;),
-					             array(&quot;:user_id&quot; =&gt; $_POST['move_pages'],
-					                   &quot;:deleting_id&quot; =&gt; $user-&gt;id));
+					             array(&quot;user_id&quot; =&gt; $user-&gt;id),
+					             array(&quot;user_id&quot; =&gt; $_POST['move_pages']));
 			}
 
 			User::delete($_POST['id']);
@@ -883,26 +879,23 @@
 				$import = YAML::load($_FILES['groups_file']['tmp_name']);
 
 				foreach ($import[&quot;groups&quot;] as $name =&gt; $permissions)
-					if (!$sql-&gt;count(&quot;groups&quot;, &quot;name = :name&quot;, array(&quot;:name&quot; =&gt; $name)))
+					if (!$sql-&gt;count(&quot;groups&quot;, array(&quot;name&quot; =&gt; $name)))
 						$trigger-&gt;call(&quot;import_chyrp_group&quot;, Group::add($name, (array) $permissions));
 
 				foreach ($import[&quot;permissions&quot;] as $id =&gt; $name)
-					if (!$sql-&gt;count(&quot;permissions&quot;, &quot;id = :id&quot;, array(&quot;:id&quot; =&gt; $id)))
-						$sql-&gt;insert(&quot;permissions&quot;,
-						             array(&quot;id&quot; =&gt; &quot;:id&quot;, &quot;name&quot; =&gt; &quot;:name&quot;),
-						             array(&quot;:id&quot; =&gt; $id, &quot;:name&quot; =&gt; $name));
+					if (!$sql-&gt;count(&quot;permissions&quot;, array(&quot;id&quot; =&gt; $id)))
+						$sql-&gt;insert(&quot;permissions&quot;, array(&quot;id&quot; =&gt; $id, &quot;name&quot; =&gt; $name));
 			}
 
 			if (isset($_FILES['users_file']) and $_FILES['users_file']['error'] == 0) {
 				$users = YAML::load($_FILES['users_file']['tmp_name']);
 
 				foreach ($users as $login =&gt; $user) {
-					$group_id = $sql-&gt;select(&quot;groups&quot;, &quot;id&quot;, &quot;name = :name&quot;, &quot;id DESC&quot;,
-					                         array(&quot;:name&quot; =&gt; $user[&quot;group&quot;]))-&gt;fetchColumn();
+					$group_id = $sql-&gt;select(&quot;groups&quot;, &quot;id&quot;, array(&quot;name&quot; =&gt; $user[&quot;group&quot;]), &quot;id DESC&quot;)-&gt;fetchColumn();
 
 					$group = ($group_id) ? $group_id : $config-&gt;default_group ;
 
-					if (!$sql-&gt;count(&quot;users&quot;, &quot;login = :login&quot;, array(&quot;:login&quot; =&gt; $login)))
+					if (!$sql-&gt;count(&quot;users&quot;, array(&quot;login&quot; =&gt; $login)))
 						$user = User::add($login,
 						                  $user[&quot;password&quot;],
 						                  $user[&quot;email&quot;],
@@ -920,8 +913,7 @@
 					$chyrp = $entry-&gt;children(&quot;http://chyrp.net/export/1.0/&quot;);
 
 					$login = $entry-&gt;author-&gt;children(&quot;http://chyrp.net/export/1.0/&quot;)-&gt;login;
-					$user_id = $sql-&gt;select(&quot;users&quot;, &quot;id&quot;, &quot;login = :login&quot;, &quot;id DESC&quot;,
-					                        array(&quot;:login&quot; =&gt; $login))-&gt;fetchColumn();
+					$user_id = $sql-&gt;select(&quot;users&quot;, &quot;id&quot;, array(&quot;login&quot; =&gt; $login), &quot;id DESC&quot;)-&gt;fetchColumn();
 
 					$data = Post::xml2arr($entry-&gt;content);
 
@@ -951,8 +943,7 @@
 					$attr  = $entry-&gt;attributes(&quot;http://chyrp.net/export/1.0/&quot;);
 
 					$login = $entry-&gt;author-&gt;children(&quot;http://chyrp.net/export/1.0/&quot;)-&gt;login;
-					$user_id = $sql-&gt;select(&quot;users&quot;, &quot;id&quot;, &quot;login = :login&quot;, &quot;id DESC&quot;,
-					                        array(&quot;:login&quot; =&gt; $login))-&gt;fetchColumn();
+					$user_id = $sql-&gt;select(&quot;users&quot;, &quot;id&quot;, array(&quot;login&quot; =&gt; $login), &quot;id DESC&quot;)-&gt;fetchColumn();
 
 					$page = Page::add($entry-&gt;title,
 					                  $entry-&gt;content,</diff>
      <filename>includes/controller/Admin.php</filename>
    </modified>
    <modified>
      <diff>@@ -246,7 +246,7 @@
 		                      &quot;/(vert|ind)ices$/i&quot; =&gt; &quot;\\1ex&quot;,
 		                      &quot;/(matr)ices$/i&quot; =&gt; &quot;\\1ix&quot;,
 		                      &quot;/(x|ch|ss|sh)es$/i&quot; =&gt; &quot;\\1&quot;,
-		                      &quot;/([m|l])ice$/i&quot; =&gt; &quot;\\1ouse&quot;,
+		                      &quot;/([ml])ice$/i&quot; =&gt; &quot;\\1ouse&quot;,
 		                      &quot;/(quiz)zes$/i&quot; =&gt; &quot;\\1&quot;);
 
 		$replaced = preg_replace(array_keys($replacements), array_values($replacements), $string, 1);</diff>
      <filename>includes/helpers.php</filename>
    </modified>
    <modified>
      <diff>@@ -106,9 +106,9 @@
 				return false;
 
 			$sql = SQL::current();
-			$sql-&gt;update(&quot;groups&quot;, &quot;id = :id&quot;,
-			             array(&quot;name&quot; =&gt; &quot;:name&quot;, &quot;permissions&quot; =&gt; &quot;:permissions&quot;),
-			             array(&quot;:name&quot; =&gt; $name, &quot;:permissions&quot; =&gt; YAML::dump($permissions), &quot;:id&quot; =&gt; $this-&gt;id));
+			$sql-&gt;update(&quot;groups&quot;,
+			             array(&quot;id&quot; =&gt; $this-&gt;id),
+			             array(&quot;name&quot; =&gt; $name, &quot;permissions&quot; =&gt; YAML::dump($permissions)));
 
 			Trigger::current()-&gt;call(&quot;update_group&quot;, $this, $name, $permissions);
 		}
@@ -135,11 +135,11 @@
 		static function add_permission($id, $name = null) {
 			$sql = SQL::current();
 
-			if ($sql-&gt;count(&quot;permissions&quot;, &quot;id = :id&quot;, array(&quot;:id&quot; =&gt; $id)))
+			if ($sql-&gt;count(&quot;permissions&quot;, array(&quot;id&quot; =&gt; $id)))
 				return; # Permission already exists.
 
 			fallback($name, camelize($id, true));
-			$sql-&gt;insert(&quot;permissions&quot;, array(&quot;id&quot; =&gt; &quot;:id&quot;, &quot;name&quot; =&gt; &quot;:name&quot;), array(&quot;:id&quot; =&gt; $id, &quot;:name&quot; =&gt; $name));
+			$sql-&gt;insert(&quot;permissions&quot;, array(&quot;id&quot; =&gt; $id, &quot;name&quot; =&gt; $name));
 		}
 
 		/**
@@ -150,7 +150,7 @@
 		 *     $id - The ID of the permission to remove.
 		 */
 		static function remove_permission($id) {
-			SQL::current()-&gt;delete(&quot;permissions&quot;, &quot;id = :id&quot;, array(&quot;:id&quot; =&gt; $id));
+			SQL::current()-&gt;delete(&quot;permissions&quot;, array(&quot;id&quot; =&gt; $id));
 		}
 
 		/**
@@ -163,8 +163,7 @@
 
 			return (isset($this-&gt;size)) ? $this-&gt;size :
 			       $this-&gt;size = SQL::current()-&gt;count(&quot;users&quot;,
-			                                           &quot;group_id = :group_id&quot;,
-			                                           array(&quot;:group_id&quot; =&gt; $this-&gt;id)) ;
+			                                           array(&quot;group_id&quot; =&gt; $this-&gt;id)) ;
 		}
 
 		/**</diff>
      <filename>includes/model/Group.php</filename>
    </modified>
    <modified>
      <diff>@@ -114,26 +114,14 @@
 
 			$sql = SQL::current();
 			$sql-&gt;update(&quot;pages&quot;,
-			             &quot;id = :id&quot;,
-			             array(
-			                 &quot;title&quot; =&gt; &quot;:title&quot;,
-			                 &quot;body&quot; =&gt; &quot;:body&quot;,
-			                 &quot;parent_id&quot; =&gt; &quot;:parent_id&quot;,
-			                 &quot;show_in_list&quot; =&gt; &quot;:show_in_list&quot;,
-			                 &quot;list_order&quot; =&gt; &quot;:list_order&quot;,
-			                 &quot;updated_at&quot; =&gt; &quot;:updated_at&quot;,
-			                 &quot;url&quot; =&gt; &quot;:url&quot;
-			             ),
-			             array(
-			                 &quot;:title&quot; =&gt; $title,
-			                 &quot;:body&quot; =&gt; $body,
-			                 &quot;:parent_id&quot; =&gt; $parent_id,
-			                 &quot;:show_in_list&quot; =&gt; $show_in_list,
-			                 &quot;:list_order&quot; =&gt; $list_order,
-			                 &quot;:updated_at&quot; =&gt; ($update_timestamp) ? datetime() : $this-&gt;updated_at,
-			                 &quot;:url&quot; =&gt; $url,
-			                 &quot;:id&quot; =&gt; $this-&gt;id
-			             ));
+			             array(&quot;id&quot; =&gt; $this-&gt;id),
+			             array(&quot;title&quot; =&gt; $title,
+			                   &quot;body&quot; =&gt; $body,
+			                   &quot;parent_id&quot; =&gt; $parent_id,
+			                   &quot;show_in_list&quot; =&gt; $show_in_list,
+			                   &quot;list_order&quot; =&gt; $list_order,
+			                   &quot;updated_at&quot; =&gt; ($update_timestamp) ? datetime() : $this-&gt;updated_at,
+			                   &quot;url&quot; =&gt; $url));
 
 			$trigger = Trigger::current();
 			$trigger-&gt;call(&quot;update_page&quot;, $this, $title, $body, $parent_id, $show_in_list, $list_order, $url, $update_timestamp);
@@ -167,7 +155,7 @@
 		 *     true - if a page with that ID is in the database.
 		 */
 		static function exists($page_id) {
-			return SQL::current()-&gt;count(&quot;pages&quot;, &quot;id = :id&quot;, array(&quot;:id&quot; =&gt; $post_id));
+			return SQL::current()-&gt;count(&quot;pages&quot;, array(&quot;id&quot; =&gt; $post_id));
 		}
 
 		/**
@@ -181,11 +169,7 @@
 		 *     $url - The unique version of the passed clean URL. If it's not used, it's the same as $clean. If it is, a number is appended.
 		 */
 		static function check_url($clean) {
-			$sql = SQL::current();
-			$count = $sql-&gt;count(&quot;pages&quot;,
-			                     &quot;clean = :clean&quot;,
-			                     array(&quot;:clean&quot; =&gt; $clean));
-
+			$count = SQL::current()-&gt;count(&quot;pages&quot;, array(&quot;clean&quot; =&gt; $clean));
 			return (!$count or empty($clean)) ? $clean : $clean.&quot;-&quot;.($count + 1) ;
 		}
 </diff>
      <filename>includes/model/Page.php</filename>
    </modified>
    <modified>
      <diff>@@ -184,12 +184,9 @@
 
 			if (empty($clean) or empty($url))
 				$sql-&gt;update(&quot;posts&quot;,
-				             &quot;id = :id&quot;,
-				             array(&quot;clean&quot; =&gt; &quot;:clean&quot;,
-				                   &quot;url&quot; =&gt; &quot;:url&quot;),
-				             array(&quot;:clean&quot; =&gt; $feather.&quot;.&quot;.$id,
-				                   &quot;:url&quot; =&gt; $feather.&quot;.&quot;.$id,
-				                   &quot;:id&quot; =&gt; $id));
+				             array(&quot;id&quot; =&gt; $id),
+				             array(&quot;clean&quot; =&gt; $feather.&quot;.&quot;.$id,
+				                   &quot;url&quot; =&gt; $feather.&quot;.&quot;.$id));
 
 			if ($trackbacks !== &quot;&quot;) {
 				$trackbacks = explode(&quot;,&quot;, $trackbacks);
@@ -269,22 +266,14 @@
 
 			$sql = SQL::current();
 			$sql-&gt;update(&quot;posts&quot;,
-			             &quot;id = :id&quot;,
-			             array(&quot;xml&quot; =&gt; &quot;:xml&quot;,
-			                   &quot;pinned&quot; =&gt; &quot;:pinned&quot;,
-			                   &quot;status&quot; =&gt; &quot;:status&quot;,
-			                   &quot;clean&quot; =&gt; &quot;:clean&quot;,
-			                   &quot;url&quot; =&gt; &quot;:url&quot;,
-			                   &quot;created_at&quot; =&gt; &quot;:created_at&quot;,
-			                   &quot;updated_at&quot; =&gt; &quot;:updated_at&quot;),
-			             array(&quot;:xml&quot; =&gt; $xml-&gt;asXML(),
-			                   &quot;:pinned&quot; =&gt; $pinned,
-			                   &quot;:status&quot; =&gt; $status,
-			                   &quot;:clean&quot; =&gt; $slug,
-			                   &quot;:url&quot; =&gt; $slug,
-			                   &quot;:created_at&quot; =&gt; $created_at,
-			                   &quot;:updated_at&quot; =&gt; $updated_at,
-			                   &quot;:id&quot; =&gt; $this-&gt;id));
+			             array(&quot;id&quot; =&gt; $this-&gt;id),
+			             array(&quot;xml&quot; =&gt; $xml-&gt;asXML(),
+			                   &quot;pinned&quot; =&gt; $pinned,
+			                   &quot;status&quot; =&gt; $status,
+			                   &quot;clean&quot; =&gt; $slug,
+			                   &quot;url&quot; =&gt; $slug,
+			                   &quot;created_at&quot; =&gt; $created_at,
+			                   &quot;updated_at&quot; =&gt; $updated_at));
 
 			$trigger = Trigger::current();
 			$trigger-&gt;call(&quot;update_post&quot;, $this, $values, $user, $pinned, $status, $slug, $created_at, $updated_at, $options);
@@ -402,7 +391,7 @@
 		 *     true - if a post with that ID is in the database.
 		 */
 		static function exists($post_id) {
-			return SQL::current()-&gt;count(&quot;posts&quot;, &quot;id = :id&quot;, array(&quot;:id&quot; =&gt; $post_id));
+			return SQL::current()-&gt;count(&quot;posts&quot;, array(&quot;id&quot; =&gt; $post_id));
 		}
 
 		/**
@@ -416,11 +405,7 @@
 		 *     $url - The unique version of the passed clean URL. If it's not used, it's the same as $clean. If it is, a number is appended.
 		 */
 		static function check_url($clean) {
-			$sql = SQL::current();
-			$count = $sql-&gt;count(&quot;posts&quot;,
-			                     &quot;clean = :clean&quot;,
-			                     array(&quot;:clean&quot; =&gt; $clean));
-
+			$count = SQL::current()-&gt;count(&quot;posts&quot;, array(&quot;clean&quot; =&gt; $clean));
 			return (!$count or empty($clean)) ? $clean : $clean.&quot;-&quot;.($count + 1) ;
 		}
 
@@ -712,14 +697,21 @@
 		 */
 		static function arr2xml(&amp;$object, $data) {
 			foreach ($data as $key =&gt; $val) {
-				if (is_int($key) and (empty($val) or trim($val) == &quot;&quot;)) {
+				if (is_int($key) and (empty($val) or (is_string($val) and trim($val) == &quot;&quot;))) {
 					unset($data[$key]);
 					continue;
 				}
 
 				if (is_array($val)) {
-					$xml = $object-&gt;addChild($key);
-					self::arr2xml($xml, $val);
+					if (in_array(0, array_keys($val))) { # Numeric-indexed things need to be added as duplicates
+						foreach ($val as $dup) {
+							$xml = $object-&gt;addChild($key);
+							arr2xml($xml, $dup);
+						}
+					} else {
+						$xml = $object-&gt;addChild($key);
+						arr2xml($xml, $val);
+					}
 				} else
 					$object-&gt;addChild($key, fix($val, false, false));
 			}
@@ -770,15 +762,10 @@
 				if (in_array($attr, $times)) {
 					$where[] = strtoupper($attr).&quot;(created_at) = :created_&quot;.$attr;
 					$params[':created_'.$attr] = $get[$attr];
-				} elseif ($attr == &quot;author&quot;)
-					$where[&quot;user_id&quot;] = SQL::current()-&gt;select(&quot;users&quot;,
-					                                      &quot;id&quot;,
-					                                      &quot;login = :login&quot;,
-					                                      &quot;id&quot;,
-					                                      array(
-					                                          &quot;:login&quot; =&gt; $get['author']
-					                                      ), 1)-&gt;fetchColumn();
-				elseif ($attr == &quot;feathers&quot;)
+				} 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;)
 					$where[&quot;feather&quot;] = depluralize($get['feathers']);
 				else {
 					$tokens = array($where, $params, $attr);
@@ -789,8 +776,7 @@
 						if (!isset($get[$attr]))
 							continue;
 
-						$where[] = $attr.&quot; = :attr&quot;.$attr;
-						$params[&quot;:attr&quot;.$attr] = $get[$attr];
+						$where[$attr] = $get[$attr];
 					}
 				}
 </diff>
      <filename>includes/model/Post.php</filename>
    </modified>
    <modified>
      <diff>@@ -115,23 +115,13 @@
 
 			$sql = SQL::current();
 			$sql-&gt;update(&quot;users&quot;,
-			             &quot;id = :id&quot;,
-			             array(
-			                 &quot;login&quot; =&gt; &quot;:login&quot;,
-			                 &quot;password&quot; =&gt; &quot;:password&quot;,
-			                 &quot;email&quot; =&gt; &quot;:email&quot;,
-			                 &quot;full_name&quot; =&gt; &quot;:full_name&quot;,
-			                 &quot;website&quot; =&gt; &quot;:website&quot;,
-			                 &quot;group_id&quot; =&gt; &quot;:group_id&quot;),
-			             array(
-			                 &quot;:login&quot; =&gt; strip_tags($login),
-			                 &quot;:password&quot; =&gt; $password,
-			                 &quot;:email&quot; =&gt; strip_tags($email),
-			                 &quot;:full_name&quot; =&gt; strip_tags($full_name),
-			                 &quot;:website&quot; =&gt; strip_tags($website),
-			                 &quot;:group_id&quot; =&gt; $group_id,
-			                 &quot;:id&quot; =&gt; $this-&gt;id
-			            ));
+			             array(&quot;id&quot; =&gt; $this-&gt;id),
+			             array(&quot;login&quot; =&gt; strip_tags($login),
+			                   &quot;password&quot; =&gt; $password,
+			                   &quot;email&quot; =&gt; strip_tags($email),
+			                   &quot;full_name&quot; =&gt; strip_tags($full_name),
+			                   &quot;website&quot; =&gt; strip_tags($website),
+			                   &quot;group_id&quot; =&gt; $group_id));
 
 			Trigger::current()-&gt;call(&quot;update_user&quot;, $this, $login, $password, $full_name, $email, $website, $group_id);
 		}</diff>
      <filename>includes/model/User.php</filename>
    </modified>
    <modified>
      <diff>@@ -288,21 +288,14 @@
 			$config-&gt;set(&quot;default_group&quot;, $group_id[&quot;member&quot;]);
 			$config-&gt;set(&quot;guest_group&quot;, $group_id[&quot;guest&quot;]);
 
-			if (!$sql-&gt;select(&quot;users&quot;, &quot;id&quot;, &quot;login = :login&quot;, null, array(&quot;:login&quot; =&gt; $_POST['login']))-&gt;fetchColumn())
+			if (!$sql-&gt;select(&quot;users&quot;, &quot;id&quot;, array(&quot;login&quot; =&gt; $_POST['login']))-&gt;fetchColumn())
 				$sql-&gt;insert(&quot;users&quot;,
-				             array(&quot;login&quot; =&gt; &quot;:login&quot;,
-				                   &quot;password&quot; =&gt; &quot;:password&quot;,
-				                   &quot;email&quot; =&gt; &quot;:email&quot;,
-				                   &quot;website&quot; =&gt; &quot;:website&quot;,
-				                   &quot;group_id&quot; =&gt; &quot;:group_id&quot;,
-				                   &quot;joined_at&quot; =&gt; &quot;:joined_at&quot;),
-				             array(&quot;:login&quot; =&gt; $_POST['login'],
-				                   &quot;:password&quot; =&gt; md5($_POST['password_1']),
-				                   &quot;:email&quot; =&gt; $_POST['email'],
-				                   &quot;:website&quot; =&gt; $config-&gt;url,
-				                   &quot;:group_id&quot; =&gt; $group_id[&quot;admin&quot;],
-				                   &quot;:joined_at&quot; =&gt; datetime()
-				             ));
+				             array(&quot;login&quot; =&gt; $_POST['login'],
+				                   &quot;password&quot; =&gt; md5($_POST['password_1']),
+				                   &quot;email&quot; =&gt; $_POST['email'],
+				                   &quot;website&quot; =&gt; $config-&gt;url,
+				                   &quot;group_id&quot; =&gt; $group_id[&quot;admin&quot;],
+				                   &quot;joined_at&quot; =&gt; datetime()));
 
 			$installed = true;
 		}</diff>
      <filename>install.php</filename>
    </modified>
    <modified>
      <diff>@@ -198,10 +198,8 @@
 		static function trackback_receive($url, $title, $excerpt, $blog_name) {
 			$sql = SQL::current();
 			$count = $sql-&gt;count(&quot;comments&quot;,
-			                     array(&quot;post_id = :id&quot;,
-			                           &quot;author_url = :url&quot;),
-			                     array(&quot;:id&quot; =&gt; $_GET['id'],
-			                           &quot;:url&quot; =&gt; $_POST['url']));
+			                     array(&quot;post_id&quot; =&gt; $_GET['id'],
+			                           &quot;author_url&quot; =&gt; $_POST['url']));
 			if ($count)
 				trackback_respond(true, __(&quot;A ping from that URL is already registered.&quot;, &quot;comments&quot;));
 
@@ -216,10 +214,8 @@
 		static function pingback($id, $to, $from, $title, $excerpt) {
 			$sql = SQL::current();
 			$count = $sql-&gt;count(&quot;comments&quot;,
-			                     array(&quot;post_id = :id&quot;,
-			                           &quot;author_url = :url&quot;),
-			                     array(&quot;:id&quot; =&gt; $id,
-			                           &quot;:url&quot; =&gt; $from));
+			                     array(&quot;post_id&quot; =&gt; $id,
+			                           &quot;author_url&quot; =&gt; $from));
 			if ($count)
 				return new IXR_Error(48, __(&quot;A ping from that URL is already registered.&quot;, &quot;comments&quot;));
 
@@ -232,11 +228,11 @@
 		}
 
 		static function delete_post($post) {
-			SQL::current()-&gt;delete(&quot;comments&quot;, &quot;post_id = :id&quot;, array(&quot;:id&quot; =&gt; $post-&gt;id));
+			SQL::current()-&gt;delete(&quot;comments&quot;, array(&quot;post_id&quot; =&gt; $post-&gt;id));
 		}
 
 		static function delete_user($user) {
-			SQL::current()-&gt;update(&quot;comments&quot;, &quot;user_id = :id&quot;, array(&quot;user_id&quot; =&gt; 0), array(&quot;:id&quot; =&gt; $user-&gt;id));
+			SQL::current()-&gt;update(&quot;comments&quot;, array(&quot;user_id&quot; =&gt; $user-&gt;id), array(&quot;user_id&quot; =&gt; 0));
 		}
 
 		static function admin_comment_settings() {
@@ -317,10 +313,8 @@
 			$where[] = &quot;status != 'spam'&quot;;
 
 			$visitor = Visitor::current();
-			if (!$visitor-&gt;group()-&gt;can(&quot;edit_comment&quot;, &quot;delete_comment&quot;, true)) {
-				$where[] = &quot;user_id = :visitor_id&quot;;
-				$params[&quot;:visitor_id&quot;] = $visitor-&gt;id;
-			}
+			if (!$visitor-&gt;group()-&gt;can(&quot;edit_comment&quot;, &quot;delete_comment&quot;, true))
+				$where[&quot;user_id&quot;] = $visitor-&gt;id;
 
 			AdminController::current()-&gt;context[&quot;comments&quot;] = new Paginator(Comment::find(array(&quot;placeholders&quot; =&gt; true, &quot;where&quot; =&gt; $where, &quot;params&quot; =&gt; $params)), 25);
 		}
@@ -358,7 +352,7 @@
 					if ($comment-&gt;status == &quot;spam&quot;)
 						$false_positives[] = $comment-&gt;signature;
 
-					$sql-&gt;update(&quot;comments&quot;, &quot;id = :id&quot;, array(&quot;status&quot; =&gt; &quot;:status&quot;), array(&quot;:id&quot; =&gt; $comment-&gt;id, &quot;:status&quot; =&gt; &quot;denied&quot;));
+					$sql-&gt;update(&quot;comments&quot;, array(&quot;id&quot; =&gt; $comment-&gt;id), array(&quot;status&quot; =&gt; &quot;denied&quot;));
 				}
 
 				Flash::notice(__(&quot;Selected comments denied.&quot;, &quot;comments&quot;));
@@ -372,7 +366,7 @@
 					if ($comment-&gt;status == &quot;spam&quot;)
 						$false_positives[] = $comment-&gt;signature;
 
-					$sql-&gt;update(&quot;comments&quot;, &quot;id = :id&quot;, array(&quot;status&quot; =&gt; &quot;:status&quot;), array(&quot;:id&quot; =&gt; $comment-&gt;id, &quot;:status&quot; =&gt; &quot;approved&quot;));
+					$sql-&gt;update(&quot;comments&quot;, array(&quot;id&quot; =&gt; $comment-&gt;id), array(&quot;status&quot; =&gt; &quot;approved&quot;));
 				}
 
 				Flash::notice(__(&quot;Selected comments approved.&quot;, &quot;comments&quot;));
@@ -383,7 +377,7 @@
 					if (!$comment-&gt;editable())
 						continue;
 
-					$sql-&gt;update(&quot;comments&quot;, &quot;id = :id&quot;, array(&quot;status&quot; =&gt; &quot;:status&quot;), array(&quot;:id&quot; =&gt; $comment-&gt;id, &quot;:status&quot; =&gt; &quot;spam&quot;));
+					$sql-&gt;update(&quot;comments&quot;, array(&quot;id&quot; =&gt; $comment-&gt;id), array(&quot;status&quot; =&gt; &quot;spam&quot;));
 
 					$false_negatives[] = $comment-&gt;signature;
 				}
@@ -443,9 +437,7 @@
 						                                    )&quot;),
 						                             &quot;created_at ASC&quot;,
 						                             array(&quot;:last_comment&quot; =&gt; $_POST['last_comment'],
-						                                   &quot;:current_ip&quot; =&gt; ip2long($_SERVER['REMOTE_ADDR']),
-						                                   &quot;:visitor_id&quot; =&gt; $visitor-&gt;id
-						                             ));
+						                                   &quot;:visitor_id&quot; =&gt; $visitor-&gt;id));
 
 						$ids = array();
 						while ($the_comment = $new_comments-&gt;fetchObject())
@@ -493,8 +485,7 @@
 				$comment = $comment-&gt;children(&quot;http://www.w3.org/2005/Atom&quot;);
 
 				$login = $comment-&gt;author-&gt;children(&quot;http://chyrp.net/export/1.0/&quot;)-&gt;login;
-				$user_id = $sql-&gt;select(&quot;users&quot;, &quot;id&quot;, &quot;login = :login&quot;, &quot;id DESC&quot;,
-				                        array(&quot;:login&quot; =&gt; $login))-&gt;fetchColumn();
+				$user_id = $sql-&gt;select(&quot;users&quot;, &quot;id&quot;, array(&quot;login&quot; =&gt; $login), &quot;id DESC&quot;)-&gt;fetchColumn();
 
 				Comment::add(unfix($comment-&gt;content),
 				             unfix($comment-&gt;author-&gt;name),
@@ -634,10 +625,7 @@
 				                                        )
 				                                    )&quot;),
 				                             &quot;created_at ASC&quot;, # order
-				                             array(&quot;:post_id&quot; =&gt; $post-&gt;id,
-				                                   &quot;:current_ip&quot; =&gt; ip2long($_SERVER['REMOTE_ADDR']),
-				                                   &quot;:visitor_id&quot; =&gt; $visitor-&gt;id
-				                             ));
+				                             array(&quot;:visitor_id&quot; =&gt; $visitor-&gt;id));
 
 				$post-&gt;comments = array();
 				foreach ($get_comments-&gt;fetchAll() as $comment)
@@ -672,7 +660,6 @@
 			                                                      )
 			                                                  )&quot;));
 
-			$options[&quot;params&quot;][&quot;:current_ip&quot;] = ip2long($_SERVER['REMOTE_ADDR']);
 			$options[&quot;params&quot;][&quot;:visitor_id&quot;] = Visitor::current()-&gt;id;
 
 			$options[&quot;group&quot;][] = &quot;id&quot;;</diff>
      <filename>modules/comments/comments.php</filename>
    </modified>
    <modified>
      <diff>@@ -203,22 +203,14 @@
 		public function update($author, $author_email, $author_url, $body, $status, $timestamp, $update_timestamp = true) {
 			$sql = SQL::current();
 			$sql-&gt;update(&quot;comments&quot;,
-			             &quot;id = :id&quot;,
-			             array(&quot;body&quot; =&gt; &quot;:body&quot;,
-			                   &quot;author&quot; =&gt; &quot;:author&quot;,
-			                   &quot;author_email&quot; =&gt; &quot;:author_email&quot;,
-			                   &quot;author_url&quot; =&gt; &quot;:author_url&quot;,
-			                   &quot;status&quot; =&gt; &quot;:status&quot;,
-			                   &quot;created_at&quot; =&gt; &quot;:created_at&quot;,
-			                   &quot;updated_at&quot; =&gt; &quot;:updated_at&quot;),
-			             array(&quot;:body&quot; =&gt; $body,
-			                   &quot;:author&quot; =&gt; strip_tags($author),
-			                   &quot;:author_email&quot; =&gt; strip_tags($author_email),
-			                   &quot;:author_url&quot; =&gt; strip_tags($author_url),
-			                   &quot;:status&quot; =&gt; $status,
-			                   &quot;:created_at&quot; =&gt; $timestamp,
-			                   &quot;:updated_at&quot; =&gt; ($update_timestamp) ? datetime() : $this-&gt;updated_at,
-			                   &quot;:id&quot; =&gt; $this-&gt;id));
+			             array(&quot;id&quot; =&gt; $this-&gt;id),
+			             array(&quot;body&quot; =&gt; $body,
+			                   &quot;author&quot; =&gt; strip_tags($author),
+			                   &quot;author_email&quot; =&gt; strip_tags($author_email),
+			                   &quot;author_url&quot; =&gt; strip_tags($author_url),
+			                   &quot;status&quot; =&gt; $status,
+			                   &quot;created_at&quot; =&gt; $timestamp,
+			                   &quot;updated_at&quot; =&gt; ($update_timestamp) ? datetime() : $this-&gt;updated_at));
 
 			Trigger::current()-&gt;call(&quot;update_comment&quot;, $this, $author, $author_email, $author_url, $body, $status, $timestamp, $update_timestamp);
 		}
@@ -228,7 +220,7 @@
 			if ($trigger-&gt;exists(&quot;delete_comment&quot;))
 				$trigger-&gt;call(&quot;delete_comment&quot;, new self($comment_id));
 
-			SQL::current()-&gt;delete(&quot;comments&quot;, &quot;id = :id&quot;, array(&quot;:id&quot; =&gt; $comment_id));
+			SQL::current()-&gt;delete(&quot;comments&quot;, array(&quot;id&quot; =&gt; $comment_id));
 		}
 
 		public function editable() {
@@ -314,9 +306,7 @@
 		}
 
 		static function user_count($user_id) {
-			$sql = SQL::current();
-			$count = $sql-&gt;count(&quot;comments&quot;, &quot;user_id = :user_id&quot;,
-			                     array(&quot;:user_id&quot; =&gt; $user_id));
+			$count = SQL::current()-&gt;count(&quot;comments&quot;, array(&quot;user_id&quot; =&gt; $user_id));
 			return $count;
 		}
 </diff>
      <filename>modules/comments/model.Comment.php</filename>
    </modified>
    <modified>
      <diff>@@ -105,7 +105,7 @@
 			if (!isset($_POST['tags'])) return;
 
 			$sql = SQL::current();
-			$sql-&gt;delete(&quot;tags&quot;, &quot;post_id = :post_id&quot;, array(&quot;:post_id&quot; =&gt; $post-&gt;id));
+			$sql-&gt;delete(&quot;tags&quot;, array(&quot;post_id&quot; =&gt; $post-&gt;id));
 
 			$tags = explode(&quot;,&quot;, $_POST['tags']); // Split at the comma
 			$tags = array_map('trim', $tags); // Remove whitespace
@@ -118,7 +118,7 @@
 			$tags_cleaned_string = (!empty($tags_cleaned)) ? &quot;{{&quot;.implode(&quot;}},{{&quot;, $tags_cleaned).&quot;}}&quot; : &quot;&quot; ;
 
 			if (empty($tags_string) and empty($tags_cleaned_string))
-				$sql-&gt;delete(&quot;tags&quot;, &quot;post_id = :post_id&quot;, array(&quot;:post_id&quot; =&gt; $post-&gt;id));
+				$sql-&gt;delete(&quot;tags&quot;, array(&quot;post_id&quot; =&gt; $post-&gt;id));
 			else
 				$sql-&gt;insert(&quot;tags&quot;, array(&quot;tags&quot; =&gt; &quot;:tags&quot;, &quot;clean&quot; =&gt; &quot;:clean&quot;, &quot;post_id&quot; =&gt; &quot;:post_id&quot;), array(
 				                 &quot;:tags&quot;    =&gt; $tags_string,
@@ -128,7 +128,7 @@
 		}
 
 		public function delete_post($post) {
-			SQL::current()-&gt;delete(&quot;tags&quot;, &quot;post_id = :post_id&quot;, array(&quot;:post_id&quot; =&gt; $post-&gt;id));
+			SQL::current()-&gt;delete(&quot;tags&quot;, array(&quot;post_id&quot; =&gt; $post-&gt;id));
 		}
 
 		public function parse_urls($urls) {
@@ -283,12 +283,9 @@
 				$names = str_replace(&quot;{{&quot;.$_POST['clean'].&quot;}}&quot;, &quot;{{&quot;.$_POST['name'].&quot;}}&quot;, $tag[&quot;tags&quot;]);
 				$clean = str_replace(&quot;{{&quot;.$_POST['clean'].&quot;}}&quot;, &quot;{{&quot;.sanitize($_POST['name']).&quot;}}&quot;, $tag[&quot;clean&quot;]);
 				$sql-&gt;update(&quot;tags&quot;,
-				             &quot;id = :id&quot;,
-				             array(&quot;tags&quot; =&gt; &quot;:tags&quot;,
-				                   &quot;clean&quot; =&gt; &quot;:clean&quot;),
-				             array(&quot;:id&quot; =&gt; $tag[&quot;id&quot;],
-				                   &quot;:tags&quot; =&gt; $names,
-				                   &quot;:clean&quot; =&gt; $clean));
+				             array(&quot;id&quot; =&gt; $tag[&quot;id&quot;]),
+				             array(&quot;id&quot; =&gt; $tag[&quot;id&quot;],
+				                   &quot;tags&quot; =&gt; $names));
 			}
 
 			Flash::notice(__(&quot;Tag renamed.&quot;, &quot;tags&quot;), &quot;/admin/?action=manage_tags&quot;);
@@ -595,7 +592,7 @@
 		}
 
 		public function posts_export($atom, $post) {
-			$tags = SQL::current()-&gt;select(&quot;tags&quot;, &quot;tags&quot;, &quot;post_id = :post_id&quot;, &quot;id DESC&quot;, array(&quot;:post_id&quot; =&gt; $post-&gt;id))-&gt;fetchColumn();
+			$tags = SQL::current()-&gt;select(&quot;tags&quot;, &quot;tags&quot;, array(&quot;post_id&quot; =&gt; $post-&gt;id), &quot;id DESC&quot;)-&gt;fetchColumn();
 			if (empty($tags)) return;
 
 			$atom.= &quot;		&lt;chyrp:tags&gt;&quot;.fix(implode(&quot;, &quot;, self::unlinked_tags($tags))).&quot;&lt;/chyrp:tags&gt;\r&quot;;</diff>
      <filename>modules/tags/tags.php</filename>
    </modified>
    <modified>
      <diff>@@ -309,10 +309,8 @@
 
 			echo _f(&quot;Sanitizing XML data of post #%d...&quot;, array($post-&gt;id)).
 			     test(SQL::current()-&gt;update(&quot;posts&quot;,
-			                                 &quot;id = :post_id&quot;,
-			                                 array(&quot;xml&quot; =&gt; &quot;:xml&quot;),
-			                                 array(&quot;:xml&quot; =&gt; $new_xml-&gt;asXML(),
-			                                       &quot;:post_id&quot; =&gt; $post-&gt;id)));
+			                                 array(&quot;id&quot; =&gt; $post-&gt;id),
+			                                 array(&quot;xml&quot; =&gt; $new_xml-&gt;asXML())));
 		}
 	}
 </diff>
      <filename>upgrade.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>812ffc472cb0d101b869c5476b5aefb3d5c04999</id>
    </parent>
  </parents>
  <author>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </author>
  <url>http://github.com/vito/chyrp/commit/e32209c7141f2f645a35b6d7c1504aa021090540</url>
  <id>e32209c7141f2f645a35b6d7c1504aa021090540</id>
  <committed-date>2008-09-01T20:36:23-07:00</committed-date>
  <authored-date>2008-09-01T20:36:23-07:00</authored-date>
  <message>* SQL interfacing cleanups
* Fixed arr2xml improperly handling numerically-indexed arrays</message>
  <tree>aa88d638881a452ba6d92df6bb2a9e8d3334b444</tree>
  <committer>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </committer>
</commit>
