Beispiel #1
0
 private function getCSSPathname($path)
 {
     if (preg_match('/\\.min\\.css$/', $path)) {
         return $path;
     }
     $altPath = Yii::getRootPath() . preg_replace('/\\.css$/', '.min.css', $path);
     if (!YII_DEBUG && file_exists($altPath)) {
         return preg_replace('/\\.css$/', '.min.css', $path);
     } else {
         return $path;
     }
 }
Beispiel #2
0
 private function getCSSPathname($path)
 {
     if (preg_match('/\\.min\\.css$/', $path)) {
         return $path;
     }
     $fileName = str_replace('/', DIRECTORY_SEPARATOR, str_replace(Yii::app()->baseUrl, '', $path));
     $altPath = Yii::getRootPath() . preg_replace('/\\.css(\\?\\d+)?$/', '.min.css', $fileName);
     if (!YII_DEBUG && file_exists($altPath)) {
         return preg_replace('/\\.css(\\?\\d+)?$/', '.min.css\\1', $path);
     } else {
         return $path;
     }
 }
Beispiel #3
0
 public function actionLicense()
 {
     $this->headerTitle = Yii::t('mobile', 'License');
     $basePath = Yii::getRootPath();
     $filename = implode(DIRECTORY_SEPARATOR, array($basePath, 'LICENSE.txt'));
     $fh = fopen($filename, 'r');
     $license = fread($fh, filesize($filename));
     $license = preg_replace('/\\n/', '<br>', $license);
     fclose($fh);
     $this->render('license', array('license' => $license));
 }