Changeset 1012

Show
Ignore:
Timestamp:
04/25/06 05:30:26 (2 years ago)
Author:
anarcat
Message:

bring back the version in the left menu. we do it on build as before,
editing local.php, but not exactly as before as local.php is now
dynamic. we therefore rely of it containing a special string which
we replace in debian/rules. admins can disable the version display by
setting it to empty in /etc/alternc/local.sh

Closes: #637

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bureau/admin/menu.php

    r993 r1012  
    5555 
    5656<p> <a href="http://alternc.org"><img src="alternc.png" width="120" height="82" border="0" alt="AlternC" /></a> 
    57 <?php if ($L_SHOWVERSION) { echo "<br />v. $L_VERSION"; } ?> 
     57<?php echo "$L_VERSION"; ?> 
    5858</p> 
    5959</body> 
  • trunk/bureau/class/local.php

    r921 r1012  
    11<?php 
    22/* Read global variables (AlternC configuration) */ 
     3 
     4$L_VERSION="v. @@REPLACED_DURING_BUILD@@"; 
    35 
    46/* To ease the transition, we define a lookup table for old names */ 
  • trunk/debian/rules

    r917 r1012  
    4646        cp -r bureau/* debian/alternc/var/alternc/bureau 
    4747        (cd src && $(MAKE) install DESTDIR=$(CURDIR)/debian/alternc) 
     48 
     49        VERSION=`sed -ne 's/^[^(]*(\([^)]*\)).*/\1/;1p' debian/changelog` 
     50        sed -i -e "s/@@REPLACED_DURING_BUILD@@/${VERSION}/" debian/alternc/var/alternc/bureau/class/local.php 
    4851 
    4952        # Fix permisions