<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>includes/interface/Feather.php</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,7 @@
 &lt;?php
 	/**
 	 * Class: Query
-	 * Handles a query based on the &lt;SQL.interface&gt;.
+	 * Handles a query based on the &lt;SQL.method&gt;.
 	 */
 	class Query {
 		# Variable: $query</diff>
      <filename>includes/class/Query.php</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@
 	class SQL {
 		# Array: $yaml
 		# An associative array of YAML-parsed settings.
-		# This is what gets altered/added to when using &lt;SQL.set.
+		# This is what gets altered/added to when using &lt;SQL.set&gt;.
 		public $yaml = array();
 
 		# Array: $debug
@@ -37,6 +37,10 @@
 			$this-&gt;connected = false;
 		}
 
+		/**
+		 * Function: method
+		 * Returns the proper method of connecting and interacting with the database.
+		 */
 		public function method() {
 			# We really don't need PDO anymore, since we have the two we supported with it hardcoded (kinda).
 			# Keeping this here for when/if we decide to add support for more database engines, like Postgres and MSSQL.</diff>
      <filename>includes/class/SQL.php</filename>
    </modified>
    <modified>
      <diff>@@ -43,6 +43,7 @@ $twig_filters = array(
 	'normalize' =&gt;        'normalize',
 	'truncate' =&gt;         'truncate',
 	'replace' =&gt;          'twig_replace_filter',
+	'match' =&gt;            'twig_match_filter',
 	'linebreaks' =&gt;       'nl2br',
 	'camelize' =&gt;         'camelize',
 	'strip_tags' =&gt;       'strip_tags',
@@ -273,7 +274,13 @@ function twig_is_odd_filter($value)
 
 function twig_replace_filter($str, $search, $replace)
 {
-	return str_replace($search, $replace, $str);
+	$func = ($str[0] == &quot;/&quot;) ? &quot;preg_replace&quot; : &quot;str_replace&quot; ;
+	return $func($search, $replace, $str);
+}
+
+function twig_match_filter($str, $match)
+{
+	return preg_match($match, $str);
 }
 
 </diff>
      <filename>includes/class/Twig/runtime.php</filename>
    </modified>
    <modified>
      <diff>@@ -174,11 +174,6 @@
 	#     &lt;Module&gt;
 	require_once INCLUDES_DIR.&quot;/class/Modules.php&quot;;
 
-	# File: Feather
-	# See Also:
-	#     &lt;Feather&gt;
-	require_once INCLUDES_DIR.&quot;/class/Feather.php&quot;;
-
 	# File: Feathers
 	# See Also:
 	#     &lt;Feathers&gt;
@@ -208,6 +203,11 @@
 	#     &lt;Admin Controller&gt;
 	require_once INCLUDES_DIR.&quot;/controller/Admin.php&quot;;
 
+	# File: Feather
+	# See Also:
+	#     &lt;Feather&gt;
+	require_once INCLUDES_DIR.&quot;/interface/Feather.php&quot;;
+
 	timer_start();
 
 	$flash = Flash::current();
@@ -322,9 +322,9 @@
 			$route-&gt;check_viewing_post();
 			$route-&gt;check_viewing_page(true);
 		}
-	}
 
-	$trigger-&gt;call(&quot;runtime&quot;);
+		$trigger-&gt;call(&quot;runtime&quot;);
+	}
 
 	# Array: $statuses
 	# An array of post statuses that &lt;Visitor&gt; can view.</diff>
      <filename>includes/common.php</filename>
    </modified>
    <modified>
      <diff>@@ -172,7 +172,7 @@
 
 	/**
 	 * Function: pluralize
-	 * Returns a pluralized string. This is a port of Rails' pluralizer.
+	 * Returns a pluralized string. This is a port of Rails's pluralizer.
 	 *
 	 * Parameters:
 	 *     $string - The string to pluralize.
@@ -183,6 +183,10 @@
 			return $pluralizations[$string];
 		else {
 			$uncountable = array(&quot;moose&quot;, &quot;sheep&quot;, &quot;fish&quot;, &quot;series&quot;, &quot;species&quot;, &quot;rice&quot;, &quot;money&quot;, &quot;information&quot;, &quot;equipment&quot;, &quot;piss&quot;);
+
+			if (in_array($string, $uncountable))
+				return $string;
+
 			$replacements = array(&quot;/person/i&quot; =&gt; &quot;people&quot;,
 			                      &quot;/man/i&quot; =&gt; &quot;men&quot;,
 			                      &quot;/child/i&quot; =&gt; &quot;children&quot;,
@@ -191,6 +195,7 @@
 			                      &quot;/(penis)$/i&quot; =&gt; &quot;\\1es&quot;, # Take that, Rails!
 			                      &quot;/(ax|test)is$/i&quot; =&gt; &quot;\\1es&quot;,
 			                      &quot;/(octop|vir)us$/i&quot; =&gt; &quot;\\1ii&quot;,
+			                      &quot;/(cact)us$/i&quot; =&gt; &quot;\\1i&quot;,
 			                      &quot;/(alias|status)$/i&quot; =&gt; &quot;\\1es&quot;,
 			                      &quot;/(bu)s$/i&quot; =&gt; &quot;\\1ses&quot;,
 			                      &quot;/(buffal|tomat)o$/i&quot; =&gt; &quot;\\1oes&quot;,
@@ -204,18 +209,9 @@
 			                      &quot;/([m|l])ouse$/i&quot; =&gt; &quot;\\1ice&quot;,
 			                      &quot;/(quiz)$/i&quot; =&gt; &quot;\\1zes&quot;);
 
-			$replaced = $string;
-			foreach ($replacements as $key =&gt; $val) {
-				if (in_array($string, $uncountable))
-					break;
-
-				$replaced = preg_replace($key, $val, $string);
-
-				if ($replaced != $string)
-					break;
-			}
+			$replaced = preg_replace(array_keys($replacements), array_values($replacements), $string, 1);
 
-			if ($replaced == $string and !in_array($string, $uncountable))
+			if ($replaced == $string)
 				return $string.&quot;s&quot;;
 			else
 				return $replaced;
@@ -239,7 +235,6 @@
 		if (isset($reversed[$string]))
 			return $reversed[$string];
 		else {
-			$uncountable = array(&quot;moose&quot;, &quot;sheep&quot;, &quot;fish&quot;, &quot;series&quot;, &quot;species&quot;, &quot;rice&quot;, &quot;money&quot;, &quot;information&quot;, &quot;equipment&quot;, &quot;piss&quot;);
 			$replacements = array(&quot;/people/i&quot; =&gt; &quot;person&quot;,
 			                      &quot;/^men/i&quot; =&gt; &quot;man&quot;,
 			                      &quot;/children/i&quot; =&gt; &quot;child&quot;,
@@ -247,7 +242,7 @@
 			                      &quot;/geese/i&quot; =&gt; &quot;goose&quot;,
 			                      &quot;/(penis)es$/i&quot; =&gt; &quot;\\1&quot;,
 			                      &quot;/(ax|test)es$/i&quot; =&gt; &quot;\\1is&quot;,
-			                      &quot;/(octop|vir)ii$/i&quot; =&gt; &quot;\\1us&quot;,
+			                      &quot;/(octopi|viri|cact)i$/i&quot; =&gt; &quot;\\1us&quot;,
 			                      &quot;/(alias|status)es$/i&quot; =&gt; &quot;\\1&quot;,
 			                      &quot;/(bu)ses$/i&quot; =&gt; &quot;\\1s&quot;,
 			                      &quot;/(buffal|tomat)oes$/i&quot; =&gt; &quot;\\1o&quot;,
@@ -262,18 +257,9 @@
 			                      &quot;/([m|l])ice$/i&quot; =&gt; &quot;\\1ouse&quot;,
 			                      &quot;/(quiz)zes$/i&quot; =&gt; &quot;\\1&quot;);
 
-			$replaced = $string;
-			foreach ($replacements as $key =&gt; $val) {
-				if (in_array($string, $uncountable))
-					break;
-
-				$replaced = preg_replace($key, $val, $string, 1);
-
-				if ($replaced != $string)
-					break;
-			}
+			$replaced = preg_replace(array_keys($replacements), array_values($replacements), $string, 1);
 
-			if ($replaced == $string and !in_array($string, $uncountable) and substr($string, -1) == &quot;s&quot;)
+			if ($replaced == $string and substr($string, -1) == &quot;s&quot;)
 				return substr($string, 0, -1);
 			else
 				return $replaced;</diff>
      <filename>includes/helpers.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,8 @@
 &lt;?php
 	require_once &quot;includes/common.php&quot;;
 
+	$trigger-&gt;call(&quot;top&quot;);
+
 	switch($route-&gt;action) {
 		case &quot;index&quot;: case &quot;search&quot;: case &quot;drafts&quot;: case &quot;feather&quot;:
 			$context = array(&quot;posts&quot; =&gt; $posts);</diff>
      <filename>index.php</filename>
    </modified>
    <modified>
      <diff>@@ -6,4 +6,4 @@ author:
   name: Alex Suraci
   url: http://i.am.toogeneric.com/
 notifications:
-  - Please make sure that /includes/cache is writable by the server. If you are not certain whether it is or not, CHMOD it to 777.
+  - Please make sure that /includes/caches is writable by the server. If you are not certain whether it is or not, CHMOD it to 777.</diff>
      <filename>modules/cacher/info.yaml</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>includes/class/Feather.php</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>7ec872a10a4e88fccdc1e45a1f75570d0db7ab75</id>
    </parent>
  </parents>
  <author>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </author>
  <url>http://github.com/vito/chyrp/commit/10325041c602fd9c9d19b20be17810975b6f3917</url>
  <id>10325041c602fd9c9d19b20be17810975b6f3917</id>
  <committed-date>2008-07-22T22:50:18-07:00</committed-date>
  <authored-date>2008-07-22T22:50:18-07:00</authored-date>
  <message>* Added a &quot;match&quot; Twig filter.
* Modified the &quot;replace&quot; Twig filter to use preg_replace if the search begins with &quot;/&quot;.
* Documentation updates.
* Moved the &quot;Feather&quot; interface to its own folder.
* Improved pluralize() and depluralize()
* Added the &quot;top&quot; Trigger back in.
* Only call the &quot;runtime&quot; filter if INDEX is true.</message>
  <tree>b0ebc8df4a9b79d1fa270fae04a8d5dfac678918</tree>
  <committer>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </committer>
</commit>
