Subversion Repositories oidplus

Rev

Rev 660 | Rev 681 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 660 Rev 670
Line 261... Line 261...
261
                }
261
                }
262
        }
262
        }
263
 
263
 
264
        // Try to find out the SVN version using the shell
264
        // Try to find out the SVN version using the shell
265
        // We don't prioritize this method, because a failed shell access will flood the apache error log with STDERR messages
265
        // We don't prioritize this method, because a failed shell access will flood the apache error log with STDERR messages
266
        $output = @shell_exec('svnversion '.escapeshellarg($dir));
266
        $output = @shell_exec('svnversion '.escapeshellarg($dir).' 2>&1');
267
        $match = array();
267
        $match = array();
268
        if (preg_match('/\d+/', $output, $match)) {
268
        if (preg_match('/\d+/', $output, $match)) {
269
                return ($cachedVersion = $match[0]);
269
                return ($cachedVersion = $match[0]);
270
        }
270
        }
271
 
271
 
272
        $output = @shell_exec('svn info '.escapeshellarg($dir));
272
        $output = @shell_exec('svn info '.escapeshellarg($dir).' 2>&1');
273
        if (preg_match('/Revision:\s*(\d+)/m', $output, $match)) { // do not translate
273
        if (preg_match('/Revision:\s*(\d+)/m', $output, $match)) { // do not translate
274
                return ($cachedVersion = $match[1]);
274
                return ($cachedVersion = $match[1]);
275
        }
275
        }
276
 
276
 
277
        return false;
277
        return false;