Ignore:
Timestamp:
10/15/07 23:08:28 (12 years ago)
Author:
ray
Message:
  • added Xinha copyright notice to XinhaCore?.js and about popup (see #916)
  • compress.php now adds a prefix to each file stating that this is a compressed file an uncompressed version of which can be found on Xinha.org; XinhaCore?.js additionally keeps copyright & licensing info
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/contrib/compress.php

    r823 r905  
    2828                        $url  = $durl . '/' . $file; 
    2929 
    30                         if(preg_match("/.svn|lang/",$path)) continue; 
     30                        if(preg_match("/\.svn|lang/",$path)) continue; 
    3131                         
    3232                        if(is_dir($path)) 
     
    4949$cwd = getcwd(); 
    5050print "Processing ".count($return)." files<br />"; 
     51 
     52$prefix = "/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */"; 
     53$core_prefix = ' 
     54  /*-------------------------------------------------------------------------- 
     55    --  Xinha (is not htmlArea) - http://xinha.org 
     56    -- 
     57    --  Use of Xinha is granted by the terms of the htmlArea License (based on 
     58    --  BSD license)  please read license.txt in this package for details. 
     59    -- 
     60    --  Copyright (c) 2005-2007 Xinha Developer Team and contributors 
     61    --   
     62    --  Xinha was originally based on work by Mihai Bazon which is: 
     63    --      Copyright (c) 2003-2004 dynarch.com. 
     64    --      Copyright (c) 2002-2003 interactivetools.com, inc. 
     65    --      This copyright notice MUST stay intact for use. 
     66    -------------------------------------------------------------------------*/ 
     67'; 
    5168foreach ($return as $file) 
    5269{ 
     
    5572        flush(); 
    5673        copy($file,$file."_uncompr.js"); 
    57         exec("java -jar ${cwd}/dojo_js_compressor.jar -c ${file}_uncompr.js > $file 2>&1"); 
     74 
     75        exec("echo \"".(preg_match('/XinhaCore.js$/',$file) ? $prefix.$core_prefix : $prefix)."\" > $file && java -jar ${cwd}/dojo_js_compressor.jar -c ${file}_uncompr.js >> $file 2>&1"); 
    5876        if (preg_match('/js: ".*?", line \d+:/',file_get_contents($file))) 
    5977        { 
Note: See TracChangeset for help on using the changeset viewer.