http://atutor.ca/atutor/mantis/view.php?id=4669
authorharris wong <hwong@ocad.ca>
Fri, 17 Dec 2010 17:48:09 +0000 (17:48 -0000)
committerharris wong <hwong@ocad.ca>
Fri, 17 Dec 2010 17:48:09 +0000 (17:48 -0000)
docs/admin/index.php
docs/svn.php

index cc2aee4..e7d11d5 100644 (file)
@@ -229,7 +229,29 @@ if ($_config['check_version']) {
                                <dd><?php echo $num_users; ?></dd>
 
                                <dt><?php echo _AT('atutor_version'); ?>:</dt>
-                               <dd><?php echo _AT('atutor_version_text', VERSION, urlencode(VERSION)); ?></dd>
+                <?php
+                    require('../svn.php');
+                    if (!empty($svn_data)) {
+                        $svn_data   = explode("\n", $svn_data);
+                        if (substr($svn_data[1], 0, 1) == 'r') {
+                            $svn_data = $svn_data[1];
+                        } else if (substr($svn_data[2], 0, 1) == 'r') {
+                            $svn_data = $svn_data[2];
+                        }
+
+                        if (count($svn_data) > 1) {
+                            $build = 'unknown';
+                            $build_date = date('Y-m-d H:i:s');
+                        } else {
+                            $svn_data   = explode(' ', $svn_data);
+
+                            $build      = $svn_data[0];
+                            $build_date = $svn_data[4] .' '. $svn_data[5];
+                        }
+                        $build_str = '(' . $build . ' - '.$build_date . ')';
+                    }
+                ?>
+                               <dd><?php echo _AT('atutor_version_text', VERSION . $build_str, urlencode(VERSION)); ?></dd>
 
                                <dt><?php echo _AT('php_version'); ?>:</dt>
                                <dd><?php echo PHP_VERSION; ?></dd>
index 06220a1..a411f4f 100644 (file)
@@ -11,6 +11,9 @@
 
 // $Id$
 
+/* If this file is from the trunk, it is *supposed* to have comments only. */
+/* http://atutor.ca/atutor/mantis/view.php?id=4669 */
+
 /* created by the bundle script.                     */
 /* the resulting file will look something like this: */
 /* $svn_data = '