Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:ufrgs-hyman/meican

Conflicts:
	bootstrap.php
	config/main.php
	libs/view.php
  • Loading branch information...
commit b2f9bd07cbebdc65991f507b7e5ce421261ab3cc 2 parents e3845ef + e0f7ee6
@labianchin labianchin authored
View
20 .htaccess
@@ -4,3 +4,23 @@
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
+<IfModule mod_headers.c>
+ # 1 YEAR
+ <FilesMatch "\.(ico|pdf|flv)$">
+ Header set Cache-Control "max-age=29030400, public"
+ </FilesMatch>
+ # 1 WEEK
+ <FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
+ Header set Cache-Control "max-age=604800, public"
+ </FilesMatch>
+ # 2 DAYS
+# <FilesMatch "\.(xml|txt|css|js)$">
+# Header set Cache-Control "max-age=86400, proxy-revalidate"
+# </FilesMatch>
+</IfModule>
+<IfModule mod_deflate.c>
+ <FilesMatch "\.(js|css)$">
+ SetOutputFilter DEFLATE
+ </FilesMatch>
+ AddOutputFilterByType DEFLATE text/text text/plain text/css application/x-javascript application/javascript text/javascript text/html
+</IfModule>
View
2  assets.php
@@ -97,7 +97,7 @@ function compress($path, $name, $type) {
header("Content-Type: ". $fileType);
header("Expires: ". gmdate("D, j M Y H:i:s", time() + 86400) ." GMT");
header("Cache-Control: public, max-age=86400"); // HTTP/1.1
-//header("Pragma: cache_asset"); // HTTP/1.0
+header("Pragma: cache_asset"); // HTTP/1.0
$time = round(getMicrotime() - $TIME_START, 4);
print "/* time: $time s */".$output;
View
6 config/main.php
@@ -15,7 +15,11 @@
),
'Asset' => array(
+<<<<<<< HEAD
//'compress' => true,
+=======
+ 'compress' => true,
+>>>>>>> e0f7ee6560f12cfdfefd7bc8dab41b1a9e6ec26e
'filter' => array(
'css' => 'assets.php',
'js' => 'assets.php'
@@ -43,7 +47,7 @@
"defaultDatabase" => 'mysql',
"dbConfig" => null,
"defaultLang" => 'pt_BR.utf8',
- "debug" => 2,
+ "debug" => 0,
"useACL" => false,
/**
* CUIDADO COM O ENDEREÇO PARA OS WEBSERVICES
View
1  index.php
@@ -12,6 +12,7 @@
define("APPLIBS", 'libs'.DS);
define("CAKE", LIBS);
define('APP', DS);
+define('APP_DIR', DS);
define("LOGS", ROOT.DS.'log'.DS);
@define ('__MEICAN', 1);
View
14 layouts/default.php
@@ -12,9 +12,16 @@
<link rel="stylesheet" type="text/css" href="<?php echo $base; ?>webroot/css/timePicker.css" />
<script type="text/javascript" src="<?php echo $base; ?>webroot/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $base; ?>webroot/js/jquery-ui-1.8.16.custom.min.js"></script>
- <script type="text/javascript" src="<?php echo $base; ?>webroot/js/jquery.pjax.js"></script>
- <script type="text/javascript" src="<?php echo $base; ?>webroot/js/ui.spinner.js"></script>
+
<?php
+ echo $this->script(array('cjs/jquery.pjax.js', 'cjs/ui.spinner.js', 'circuits/cjs/googlemaps.js', 'circuits/cjs/StyledMarker.js', 'cjs/main.js'));
+ /*<script type="text/javascript" src="<?php echo $base; ?>webroot/js/jquery.pjax.js"></script>
+ <script type="text/javascript" src="<?php echo $base; ?>webroot/js/ui.spinner.js"></script>
+
+ <script type ="text/javascript" src="<?php echo $base; ?>apps/circuits/webroot/js/googlemaps.js"></script>
+ <script type ="text/javascript" src="<?php echo $base; ?>apps/circuits/webroot/js/StyledMarker.js"></script>
+ <script type ="text/javascript" src="<?php echo $base; ?>webroot/js/main.js"></script>
+ */
//https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/themes/start/jquery-ui.css
/* <script type="text/javascript" src="<?php echo $base; ?>webroot/js/jquery.form.js"></script>
<script type="text/javascript" src="<?php echo $base; ?>apps/init/webroot/js/info_box.js"></script> */
@@ -22,9 +29,6 @@
<?php if (Configure::read('dataTables')): ?>
<script type="text/javascript" src="<?php echo $base; ?>webroot/js/jquery.dataTables.min.js"></script>
<?php endif; ?>
- <script type ="text/javascript" src="<?php echo $base; ?>apps/circuits/webroot/js/googlemaps.js"></script>
- <script type ="text/javascript" src="<?php echo $base; ?>apps/circuits/webroot/js/StyledMarker.js"></script>
- <script type ="text/javascript" src="<?php echo $base; ?>webroot/js/main.js"></script>
<script type ="text/javascript">
<?php // variavel para armazenar o ID quando a função setInterval() é usada
// cada vez que um link é carregado, é feito um clear na variável, para não carregar em páginas erradas ?>
View
23 libs/common.php
@@ -335,4 +335,27 @@ function getMicrotime() {
}
}
+/**
+ * Splits a dot syntax plugin name into its plugin and classname.
+ * If $name does not have a dot, then index 0 will be null.
+ *
+ * Commonly used like `list($plugin, $name) = pluginSplit($name);`
+ *
+ * @param string $name The name you want to plugin split.
+ * @param boolean $dotAppend Set to true if you want the plugin to have a '.' appended to it.
+ * @param string $plugin Optional default plugin to use if no plugin is found. Defaults to null.
+ * @return array Array with 2 indexes. 0 => plugin name, 1 => classname
+ * @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#pluginSplit
+ */
+function pluginSplit($name, $dotAppend = false, $plugin = null) {
+ if (strpos($name, '.') !== false) {
+ $parts = explode('.', $name, 2);
+ if ($dotAppend) {
+ $parts[0] .= '.';
+ }
+ return $parts;
+ }
+ return array($plugin, $name);
+}
+
?>
Please sign in to comment.
Something went wrong with that request. Please try again.