mirror of
https://github.com/mrclay/minify.git
synced 2025-08-30 17:19:54 +02:00
rework classloader
- make it available in config - always use classloader, no manual require - compatible for future composer alternative
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
$pathToLib = dirname(dirname(__DIR__)) . '/min/lib';
|
||||
|
||||
require "$pathToLib/Minify/Loader.php";
|
||||
Minify_Loader::register();
|
||||
|
||||
$cli = new MrClay\Cli;
|
||||
|
||||
|
@@ -4,7 +4,6 @@
|
||||
$pathToLib = dirname(dirname(__DIR__)) . '/min/lib';
|
||||
|
||||
require "$min_libPath/Minify/Loader.php";
|
||||
Minify_Loader::register();
|
||||
|
||||
$cli = new MrClay\Cli;
|
||||
|
||||
|
@@ -4,9 +4,6 @@
|
||||
|
||||
require dirname(__FILE__) . '/../min/config.php';
|
||||
|
||||
require "$min_libPath/Minify/Loader.php";
|
||||
Minify_Loader::register();
|
||||
|
||||
$minifyCachePath = isset($min_cachePath)
|
||||
? $min_cachePath
|
||||
: '';
|
||||
|
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
require dirname(__FILE__) . '/../../min/lib/Minify/Loader.php';
|
||||
|
||||
function getPost($key) {
|
||||
return get_magic_quotes_gpc()
|
||||
? stripslashes($_POST[$key])
|
||||
|
@@ -3,6 +3,8 @@
|
||||
* Fetch and minify a URL (auto-detect HTML/JS/CSS)
|
||||
*/
|
||||
|
||||
require dirname(__FILE__) . '/../../min/lib/Minify/Loader.php';
|
||||
|
||||
function getPost($key) {
|
||||
if (! isset($_POST[$key])) {
|
||||
return null;
|
||||
|
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
require dirname(__FILE__) . '/../../min/lib/Minify/Loader.php';
|
||||
|
||||
header('Content-Type: text/html;charset=utf-8');
|
||||
|
||||
function h($str) { return htmlspecialchars($str, ENT_QUOTES); }
|
||||
@@ -55,4 +58,4 @@ if (isset($_POST['css'])) {
|
||||
<p><label>input CSS: <textarea name="css" cols="80" rows="5"><?php echo h(getPost('css', $defaultCss)); ?></textarea></label></p>
|
||||
<p><input type="submit" value="rewrite()" /></p>
|
||||
</form>
|
||||
<?php echo $out; ?>
|
||||
<?php echo $out; ?>
|
||||
|
Reference in New Issue
Block a user