<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -98,7 +98,7 @@ class Gettext
   end
 
   def scan_normal(text, line, filename, clean_filename)
-    text.gsub(/__\((&quot;|')([^&quot;]+)\1#{@domain}\)/) do
+    text.gsub(/__\((&quot;|')([^\1]+)\1#{@domain}\)/) do
       if @translations[$2].nil?
         @translations[$2] = { :places =&gt; [clean_filename + &quot;:&quot; + line.to_s],
                               :filter =&gt; false,
@@ -110,7 +110,7 @@ class Gettext
   end
 
   def scan_filter(text, line, filename, clean_filename)
-    text.gsub(/_f\((&quot;|')([^&quot;]+)\1, .*?#{@domain}\)/) do
+    text.gsub(/_f\((&quot;|')([^\1]+)\1, .*?#{@domain}\)/) do
       if @translations[$2].nil?
         @translations[$2] = { :places =&gt; [clean_filename + &quot;:&quot; + line.to_s],
                               :filter =&gt; true,
@@ -122,7 +122,7 @@ class Gettext
   end
 
   def scan_plural(text, line, filename, clean_filename)
-    text.gsub(/_p\((&quot;|')([^&quot;]+)\1, (&quot;|')([^&quot;]+)\3, .*?#{@domain}\)/) do
+    text.gsub(/_p\((&quot;|')([^\1]+)\1, (&quot;|')([^\3]+)\3, .*?#{@domain}\)/) do
       if @translations[$2].nil?
         @translations[$2] = { :places =&gt; [clean_filename + &quot;:&quot; + line.to_s],
                               :filter =&gt; true,
@@ -134,7 +134,7 @@ class Gettext
   end
 
   def scan_twig(text, line, filename, clean_filename)
-    text.gsub(/(&quot;|')([^&quot;]+)\1 ?\| ?translate(?!_plural)#{@twig_domain}(?! ?\| ?format)/) do
+    text.gsub(/(&quot;|')([^\1]+)\1 ?\| ?translate(?!_plural)#{@twig_domain}(?! ?\| ?format)/) do
       if @translations[$2].nil?
         @translations[$2] = { :places =&gt; [clean_filename + &quot;:&quot; + line.to_s],
                               :filter =&gt; false,
@@ -146,7 +146,7 @@ class Gettext
   end
 
   def scan_twig_filter(text, line, filename, clean_filename)
-    text.gsub(/(&quot;|')([^&quot;]+)\1 ?\| ?translate(?!_plural)#{@twig_domain} ?\| ?format\(.*?\).*?/) do
+    text.gsub(/(&quot;|')([^\1]+)\1 ?\| ?translate(?!_plural)#{@twig_domain} ?\| ?format\(.*?\).*?/) do
       if @translations[$2].nil?
         @translations[$2] = { :places =&gt; [clean_filename + &quot;:&quot; + line.to_s],
                               :filter =&gt; true,
@@ -158,7 +158,7 @@ class Gettext
   end
 
   def scan_twig_plural(text, line, filename, clean_filename)
-    text.gsub(/(&quot;|')([^&quot;]+)\1 ?\| ?translate_plural\((&quot;|')([^&quot;]+)\3, .*?#{@domain}\) ?\| ?format\(.*?\)/) do
+    text.gsub(/(&quot;|')([^\1]+)\1 ?\| ?translate_plural\((&quot;|')([^\3]+)\3, .*?#{@domain}\) ?\| ?format\(.*?\)/) do
       if @translations[$2].nil?
         @translations[$2] = { :places =&gt; [clean_filename + &quot;:&quot; + line.to_s],
                               :filter =&gt; true,</diff>
      <filename>gettext.rb</filename>
    </modified>
    <modified>
      <diff>@@ -193,6 +193,14 @@
 			return $query;
 		}
 
+		/**
+		 * Function: tablefy
+		 * Automatically prepends tables and table prefixes to a field if it doesn't already have them.
+		 *
+		 * Parameters:
+		 *     $field - The field to &quot;tablefy&quot;.
+		 *     $tables - An array of tables. The first one will be used for prepending.
+		 */
 		public static function tablefy(&amp;$field, $tables) {
 			if (!preg_match_all(&quot;/(\(|^)?([a-z_\.]+)/&quot;, $field, $matches))
 				return;
@@ -207,7 +215,7 @@
 				# Does it not already have a table specified?
 				if (!substr_count($full, &quot;.&quot;)) {
 						                   # Don't replace things that are already either prefixed or paramized.
-					$field = preg_replace(&quot;/([^\.:'_]|^)&quot;.preg_quote($full, &quot;/&quot;).&quot;/&quot;,
+					$field = preg_replace(&quot;/([^\.:'\&quot;_]|^)&quot;.preg_quote($full, &quot;/&quot;).&quot;/&quot;,
 					                      &quot;\\1&quot;.$paren.&quot;__&quot;.$tables[0].&quot;.&quot;.$name,
 					                      $field,
 					                      1);
@@ -215,7 +223,7 @@
 					# Okay, it does, but is the table prefixed?
 					if (substr($full, 0, 2) != &quot;__&quot;) {
 						                       # Don't replace things that are already either prefixed or paramized.
-						$field = preg_replace(&quot;/([^\.:'_]|^)&quot;.preg_quote($full, &quot;/&quot;).&quot;/&quot;,
+						$field = preg_replace(&quot;/([^\.:'\&quot;_]|^)&quot;.preg_quote($full, &quot;/&quot;).&quot;/&quot;,
 						                      &quot;\\1&quot;.$paren.&quot;__&quot;.$name,
 						                      $field,
 						                      1);</diff>
      <filename>includes/class/QueryBuilder.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5650e9ed3092294fb418d7a0c2e1e706e8510a43</id>
    </parent>
  </parents>
  <author>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </author>
  <url>http://github.com/vito/chyrp/commit/c252c563f30d461d23c3172e68cab4db2de1921e</url>
  <id>c252c563f30d461d23c3172e68cab4db2de1921e</id>
  <committed-date>2008-07-23T17:46:41-07:00</committed-date>
  <authored-date>2008-07-23T17:46:41-07:00</authored-date>
  <message>* Improved QueryBuilder::tablefy
* Improved gettext scanner</message>
  <tree>941bd081477c4438f03df798bfc4897fc90e2f93</tree>
  <committer>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </committer>
</commit>
