Changeset 270 in t29-www


Ignore:
Timestamp:
Jun 1, 2012, 7:29:04 PM (7 years ago)
Author:
sven
Message:

Killed nasty bug so CSS compression takes effect. Compression ratio about 50-70% just by killing white space and comments.

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/cache.php

    r265 r270  
    207207                          use($register_shutdown_func, $shutdown_func_is_filter, $t) {
    208208                                if($shutdown_func_is_filter) {
    209                                         $content = ob_get_flush();
     209                                        $content = ob_get_clean();
    210210                                        if($t->debug)
    211211                                                // can print output since OutputBuffering is finished
    212212                                                print 't29Cache: Applying user filter to output' . PHP_EOL;
    213                                         $t->write_cache(call_user_func($register_shutdown_func, $content));
     213                                        $content = call_user_func($register_shutdown_func, $content);
     214                                        print $content;
     215                                        $t->write_cache($content);
    214216                                } else {
    215217                                        call_user_func($register_shutdown_func);
  • lib/ressourceloader.php

    r269 r270  
    11<?php
    22/**
    3  * t29REssourceLoader classes.
     3 * t29RessourceLoader classes.
    44 * This file behaves to loader.php like template.php behaves to technikum29.php.
    55 *
     
    104104                global $lib;
    105105                require "$lib/CSSMin.php";
    106                 return "foo";
     106               
     107                # compression: 40kb to 16kb
    107108                $minified = CSSMin::minify($code);
    108109                return $this->conf['header'] . $minified;
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License