diff --git a/app/lib/UploadHandler.php b/app/lib/UploadHandler.php index 65bd462b..44d0ed4a 100644 --- a/app/lib/UploadHandler.php +++ b/app/lib/UploadHandler.php @@ -483,7 +483,7 @@ protected function orient_image($file_path) { protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, $index = null, $content_range = null) { - $file = new stdClass(); + $file = new \stdClass(); $file->name = $this->trim_file_name($name, $type, $index, $content_range); $file->size = $this->fix_integer_overflow(intval($size)); $file->type = $type; diff --git a/bower.json b/bower.json index 8b0b8b8f..c5fb89f7 100644 --- a/bower.json +++ b/bower.json @@ -20,6 +20,7 @@ "tests" ], "dependencies": { + "twbs-bootstrap-sass": "latest", "bootstrap": "latest", "fancybox": "~2.1.5", "flot": "latest", diff --git a/composer.json b/composer.json index 64c34d06..5fb2042c 100644 --- a/composer.json +++ b/composer.json @@ -1,17 +1,18 @@ { "require": { "leafo/lessphp": "v0.4.0", - "niahoo/altorouter": "dev-master", - "firephp/firephp-core": "dev-master", - "linkorb/jsmin-php": "dev-master", - "swiftmailer/swiftmailer": "5.2.*@dev", - "natxet/CssMin": "dev-master", + "niahoo/altorouter": "dev-master", + "firephp/firephp-core": "dev-master", + "linkorb/jsmin-php": "dev-master", + "swiftmailer/swiftmailer": "5.2.*@dev", + "natxet/CssMin": "dev-master", "kriswallsmith/assetic": "1.2.*@dev", "sybio/image-workshop": "dev-master", "guzzlehttp/guzzle": "4.0.*@dev", "symfony/css-selector": "2.4.*@dev", "symfony/dom-crawler": "2.4.*@dev", "suin/php-rss-writer": "dev-master", - "monolog/monolog": "1.6.*@dev" + "monolog/monolog": "1.6.*@dev", + "leafo/scssphp": "0.0.12" } } \ No newline at end of file diff --git a/composer.lock b/composer.lock index 1a00cba5..c4109e35 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "a30201119e3c31dfa061af98a23ff694", + "hash": "fb029e80feac8f54072ee54d7547be4b", "packages": [ { "name": "firephp/firephp-core", @@ -274,6 +274,52 @@ "homepage": "http://leafo.net/lessphp/", "time": "2013-08-09 17:09:19" }, + { + "name": "leafo/scssphp", + "version": "v0.0.12", + "source": { + "type": "git", + "url": "https://github.com/leafo/scssphp.git", + "reference": "ff76df3e45af45e808f3fcd516a2cb5cbc77f45e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/leafo/scssphp/zipball/ff76df3e45af45e808f3fcd516a2cb5cbc77f45e", + "reference": "ff76df3e45af45e808f3fcd516a2cb5cbc77f45e", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "php": ">=5.3.0", + "phpunit/phpunit": "3.7.*" + }, + "bin": [ + "pscss" + ], + "type": "library", + "autoload": { + "classmap": [ + "scss.inc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "GPL-3.0" + ], + "authors": [ + { + "name": "Leaf Corcoran", + "email": "leafot@gmail.com", + "homepage": "http://leafo.net" + } + ], + "description": "scssphp is a compiler for SCSS written in PHP.", + "homepage": "http://leafo.net/scssphp/", + "time": "2014-07-07 01:51:39" + }, { "name": "linkorb/jsmin-php", "version": "dev-master", @@ -841,6 +887,7 @@ "suin/php-rss-writer": 20, "monolog/monolog": 20 }, + "prefer-stable": false, "platform": [], "platform-dev": [] } diff --git a/lib/BaseController.php b/lib/BaseController.php index c53fe2ea..8d337818 100644 --- a/lib/BaseController.php +++ b/lib/BaseController.php @@ -7,6 +7,7 @@ use Exception; use FirePHP; use lessc; +use scssc; use Monolog\ErrorHandler; use Monolog\Handler\StreamHandler; use Monolog\Logger; @@ -170,18 +171,19 @@ public function setGeneralCss($generalCss) { $less->checkedCompile($less_fname, $css_fname); $this->generalCss[$key] = $file . '.css'; }*/ + $scss = new scssc(); foreach ($generalCss as $key => $val) { $file = strpos($val, "/") ? substr($val, strpos($val, "/") + 1) : $val; - $less_fname = LESSDIR . $val . ".less"; + $scss_fname = LESSDIR . $val . ".scss"; $css_fname = STYLESHEETSDIR . $file . ".css"; $cache_fname = CACHEDIR . $file . ".cache"; - $cache = (file_exists($cache_fname)) ? unserialize(file_get_contents($cache_fname)) : $less_fname; - $new_cache = lessc::cexecute($cache); + $cache = (file_exists($cache_fname)) ? unserialize(file_get_contents($cache_fname)) : $scss_fname; + $new_cache = $scss->cexecute($cache); if (!is_array($cache) || $new_cache['updated'] > $cache['updated']) { file_put_contents($cache_fname, serialize($new_cache)); file_put_contents($css_fname, $new_cache['compiled']); } - lessc::ccompile($less_fname, $css_fname); + lessc::ccompile($scss_fname, $css_fname); $this->generalCss[$key] = $file . '.css'; } /*$less_fname = LESSDIR . 'pages' . DS . $this->route['name'] . '.less';