]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
authorZach Copley <zach@status.net>
Wed, 17 Nov 2010 22:16:08 +0000 (22:16 +0000)
committerZach Copley <zach@status.net>
Wed, 17 Nov 2010 22:16:08 +0000 (22:16 +0000)
1  2 
lib/util.php

diff --combined lib/util.php
index 68592bf74654f60e50a110a9cfa582e94297bc36,49566c4d41e74b94e18ca43a6a3237a45998f27c..ce5da1cd8134fa050087511392d0c9f2aed06a24
@@@ -848,7 -848,7 +848,7 @@@ function common_linkify($url) 
  
          $canon = File_redirection::_canonUrl($url);
  
-         $longurl_data = File_redirection::where($canon);
+         $longurl_data = File_redirection::where($canon, common_config('attachments', 'process_links'));
          if (is_array($longurl_data)) {
              $longurl = $longurl_data['url'];
          } elseif (is_string($longurl_data)) {
      $f = File::staticGet('url', $longurl);
  
      if (empty($f)) {
-         // XXX: this writes to the database. :<
-         $f = File::processNew($longurl);
+         if (common_config('attachments', 'process_links')) {
+             // XXX: this writes to the database. :<
+             $f = File::processNew($longurl);
+         }
      }
  
      if (!empty($f)) {
@@@ -1499,7 -1501,6 +1501,7 @@@ function common_request_id(
  function common_log($priority, $msg, $filename=null)
  {
      if(Event::handle('StartLog', array(&$priority, &$msg, &$filename))){
 +      $msg = (empty($filename)) ? $msg : basename($filename) . ' - ' . $msg;
          $msg = '[' . common_request_id() . '] ' . $msg;
          $logfile = common_config('site', 'logfile');
          if ($logfile) {