Skip to content
This repository
  • 2 commits
  • 3 files changed
  • 0 comments
  • 1 contributor
3  oxy.php
@@ -98,10 +98,11 @@ public static function __getParentClass() {
98 98
 <?if(count($method->assets)):?>
99 99
                     $class = $this->__getClass();
100 100
                     $last = $this->__lastMetaModified();
  101
+                    $css = 'css-' . $class;
101 102
 <?foreach($method->assets as $asset):?>
102 103
                     $this->asset_<?=$asset->name?>_<?=$asset->type?>(
103 104
                         '<?=$method->path?>', 
104  
-                        'css-<?=$class->name?>',
  105
+                        $css,
105 106
                         $class,
106 107
                         $last
107 108
                     );
26  oxygen.class.php
@@ -151,7 +151,7 @@ public function compileAssets() {
151 151
             $result = array();
152 152
             foreach ($this->scope->assets as $type => $assets) {
153 153
                 $names = array();
154  
-                $last = 0;
  154
+                $last = 1;
155 155
                 foreach($assets as $css => $asset) {
156 156
                     $time = $asset['class']->compile(
157 157
                         $asset['source'],
@@ -165,9 +165,9 @@ public function compileAssets() {
165 165
                     $names[] = $asset['destination'];
166 166
                 }
167 167
                 $bundle = md5(implode(':',$names));
168  
-                $bundle_path = OXYGEN_ASSET_ROOT 
169  
-                    . DIRECTORY_SEPARATOR . $type 
170  
-                    . DIRECTORY_SEPARATOR . $bundle 
  168
+                $bundle_path = OXYGEN_ASSET_ROOT
  169
+                    . DIRECTORY_SEPARATOR . $type
  170
+                    . DIRECTORY_SEPARATOR . $bundle
171 171
                     . '.' . $type;
172 172
                 $m = self::modificationTime($bundle_path);
173 173
                 if ($last > $m) {
@@ -283,7 +283,7 @@ private function compileItem($normalDir, $genPath, $className, $yaml, $path, $bo
283 283
             $ref = $ancestor
284 284
                 ? new ReflectionClass($ancestor)
285 285
                 : null
286  
-            ;            
  286
+            ;
287 287
             $ancestor_access = array();
288 288
 
289 289
             # ===  VIEWS ====
@@ -339,7 +339,7 @@ private function compileItem($normalDir, $genPath, $className, $yaml, $path, $bo
339 339
                             'absPath'  => $file,
340 340
                             'baseName' => basename($file),
341 341
                             'type'     => $type,
342  
-                            'genPath'  => OXYGEN_ASSET_ROOT . DIRECTORY_SEPARATOR 
  342
+                            'genPath'  => OXYGEN_ASSET_ROOT . DIRECTORY_SEPARATOR
343 343
                                         . $type . $path . DIRECTORY_SEPARATOR
344 344
                                         . basename($file),
345 345
                             'access'   => $view->access
@@ -391,7 +391,6 @@ private function compileItem($normalDir, $genPath, $className, $yaml, $path, $bo
391 391
                     ftruncate($f, 0);
392 392
                     fwrite($f, $generated);
393 393
                     flock($f, LOCK_UN);
394  
-                    echo "compiled";
395 394
                 }
396 395
                 fclose($f);
397 396
             } catch (Exception $e) {
@@ -444,6 +443,7 @@ public function __construct($privateCacheRoot, $compileRoot = false, $assetRoot
444 443
             define('OXYGEN_BASE', dirname(__FILE__) . DIRECTORY_SEPARATOR);
445 444
             define('OXYGEN_ICONS_ROOT', OXYGEN_BASE . 'lib/silk-icons/icons');
446 445
             assert('is_string($privateCacheRoot)');
  446
+            self::getWritableDir($privateCacheRoot);
447 447
             assert('is_dir($privateCacheRoot)');
448 448
             assert('is_writable($privateCacheRoot)');
449 449
             define('OXYGEN_CACHE_ROOT', $privateCacheRoot);
@@ -478,7 +478,7 @@ public function __construct($privateCacheRoot, $compileRoot = false, $assetRoot
478 478
                 : OXYGEN_ROOT
479 479
             ;
480 480
 
481  
-            $HTTP_HOST = $scope->HTTP_HOST = isset($_SERVER['HTTP_HOST']) 
  481
+            $HTTP_HOST = $scope->HTTP_HOST = isset($_SERVER['HTTP_HOST'])
482 482
                 ? $_SERVER['HTTP_HOST']
483 483
                 : 'localhost'
484 484
             ;
@@ -499,8 +499,8 @@ public function __construct($privateCacheRoot, $compileRoot = false, $assetRoot
499 499
                 try {
500 500
                     $bundle = $match[1];
501 501
                     $type  = $match[2];
502  
-                    $bundle_path = OXYGEN_ASSET_ROOT 
503  
-                    . DIRECTORY_SEPARATOR . $type 
  502
+                    $bundle_path = OXYGEN_ASSET_ROOT
  503
+                    . DIRECTORY_SEPARATOR . $type
504 504
                     . DIRECTORY_SEPARATOR . $bundle
505 505
                     . '.' . $type;
506 506
                     $m = filemtime($bundle_path);
@@ -509,7 +509,7 @@ public function __construct($privateCacheRoot, $compileRoot = false, $assetRoot
509 509
                         if ($etag === $_SERVER['HTTP_IF_NONE_MATCH']) {
510 510
                             header('HTTP/1.1 304 Not modified');
511 511
                             exit;
512  
-                        } 
  512
+                        }
513 513
                     }
514 514
                     header("Etag: $etag");
515 515
                     header(self::$mime[$type]);
@@ -521,11 +521,11 @@ public function __construct($privateCacheRoot, $compileRoot = false, $assetRoot
521 521
                 }
522 522
             }
523 523
 
524  
-            define('OXYGEN_ROOT_URL',  
  524
+            define('OXYGEN_ROOT_URL',
525 525
                 ($is_https ? 'https://' : 'http://') . $HTTP_HOST . $uri
526 526
             );
527 527
 
528  
-            
  528
+
529 529
             $scope->Oxygen    = array($this,'itself');
530 530
             $scope->o         = $this;
531 531
             $scope->_SESSION  = $scope->Oxygen_Session();
9  oxygen.oxy.php
@@ -115,21 +115,22 @@ public function put_inspected($value) {
115 115
                     Oxygen::closeAll();
116 116
                     $class = $this->__getClass();
117 117
                     $last = $this->__lastMetaModified();
  118
+                    $css = 'css-' . $class;
118 119
                     $this->asset_inspected_css(
119 120
                         '/oxygen', 
120  
-                        'css-Oxygen',
  121
+                        $css,
121 122
                         $class,
122 123
                         $last
123 124
                     );
124 125
                     $this->asset_inspected_less(
125 126
                         '/oxygen', 
126  
-                        'css-Oxygen',
  127
+                        $css,
127 128
                         $class,
128 129
                         $last
129 130
                     );
130 131
                     $this->asset_inspected_js(
131 132
                         '/oxygen', 
132  
-                        'css-Oxygen',
  133
+                        $css,
133 134
                         $class,
134 135
                         $last
135 136
                     );
@@ -173,7 +174,7 @@ private function put_oxy($class) {
173 174
         # END VIEWS.
174 175
 
175 176
         public function __lastMetaModified() {
176  
-            return 1339256399;
  177
+            return 1339276099;
177 178
         }
178 179
     }
179 180
 

No commit comments for this range

Something went wrong with that request. Please try again.