<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -73,6 +73,7 @@ $twig_filters = array(
     // debugging
     'inspect' =&gt;          'twig_inspect_filter',
 
+    'uploaded' =&gt;         'uploaded',
     'fallback' =&gt;         'oneof',
     'selected' =&gt;         'twig_selected_filter',
     'checked' =&gt;          'twig_checked_filter',</diff>
      <filename>includes/class/Twig/runtime.php</filename>
    </modified>
    <modified>
      <diff>@@ -929,7 +929,7 @@
      */
     function upload($file, $extension = null, $path = &quot;&quot;, $put = false) {
         $file_split = explode(&quot;.&quot;, $file['name']);
-        $dir = MAIN_DIR.Config::current()-&gt;uploads_path.$path;
+        $dir = rtrim(MAIN_DIR.Config::current()-&gt;uploads_path.$path, &quot;/&quot;);
 
         if (!file_exists($dir))
             mkdir($dir);
@@ -969,12 +969,12 @@
         $file_clean = sanitize($file_clean, false).&quot;.&quot;.$file_ext;
         $filename = unique_filename($file_clean, $path);
 
-        $message = __(&quot;Couldn't upload file. CHMOD &lt;code&gt;&quot;.MAIN_DIR.Config::current()-&gt;uploads_path.&quot;&lt;/code&gt; to 777 and try again. If this problem persists, it's probably timing out; in which case, you must contact your system administrator to increase the maximum POST and upload sizes.&quot;);
+        $message = __(&quot;Couldn't upload file. CHMOD &lt;code&gt;&quot;.$dir.&quot;&lt;/code&gt; to 777 and try again. If this problem persists, it's probably timing out; in which case, you must contact your system administrator to increase the maximum POST and upload sizes.&quot;);
 
         if ($put) {
-            if (!@copy($file['tmp_name'], $dir.$filename))
+            if (!@copy($file['tmp_name'], $dir.&quot;/&quot;.$filename))
                 error(__(&quot;Error&quot;), $message);
-        } elseif (!@move_uploaded_file($file['tmp_name'], $dir.$filename))
+        } elseif (!@move_uploaded_file($file['tmp_name'], $dir.&quot;/&quot;.$filename))
             error(__(&quot;Error&quot;), $message);
 
         return $filename;</diff>
      <filename>includes/helpers.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7266ecf9e8350a23eb169ace2817abfce6713520</id>
    </parent>
  </parents>
  <author>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </author>
  <url>http://github.com/vito/chyrp/commit/311a2bf6645405323c51da7564880d83f0a44375</url>
  <id>311a2bf6645405323c51da7564880d83f0a44375</id>
  <committed-date>2008-11-15T15:30:09-08:00</committed-date>
  <authored-date>2008-11-15T15:30:09-08:00</authored-date>
  <message>* Added an &quot;uploaded&quot; Twig filter for referencing an uploaded file.
* Fixed upload() and custom paths.</message>
  <tree>34bbd9d12ee38f9e65da0a9b49e792288a92d228</tree>
  <committer>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </committer>
</commit>
