Permalink
Browse files

added bin/flush_maps.php

  • Loading branch information...
jvinet committed Sep 23, 2010
1 parent 8ebcf22 commit 549e4d5ce3b99cdeaa89ff0fb72cfa7aa6491c63
Showing with 59 additions and 0 deletions.
  1. +16 −0 css/ui.css
  2. +41 −0 pronto/bin/flush_maps.php
  3. +1 −0 pronto/plugins/template/table.php
  4. +1 −0 pronto/profiles/web.php
View
@@ -41,6 +41,22 @@ div.link_button a span {
}
+/********************************************************************
+ * MODALS AND OVERLAYS
+ *******************************************************************/
+.overlay {
+ z-index: 99999;
+ display: none;
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ background: #000;
+ opacity: 0.5;
+}
+
+
/********************************************************************
* AJAX ELEMENTS
*******************************************************************/
View
@@ -0,0 +1,41 @@
+<?php
+/**
+ * PRONTO WEB FRAMEWORK
+ * @copyright Copyright (C) 2006, Judd Vinet
+ * @author Judd Vinet <jvinet@zeroflux.org>
+ *
+ * Description: Flush the Pronto class maps from the cache.
+ *
+ * NOTE: If using the SHM adapter, you may get "permission denied" errors
+ * when trying to connect to the cache. This is likely due to the
+ * fact that the UID of the web server is different than the UID that
+ * is running this script. By default, Pronto uses '0600' permissions
+ * on the cache, so only the UID that created the SHM segment can
+ * access it.
+ *
+ * A workaround is to enable DEBUG mode and hit an URL in your
+ * web app with "?cache_flush" appended to it.
+ *
+ * eg, http://localhost/myapp/?cache_flush
+ *
+ **/
+
+if(!file_exists('profiles/cmdline.php')) {
+ die("Run this script from your top-level app directory (eg, /var/www/html/app)\n");
+}
+require_once('profiles/cmdline.php');
+
+if(USE_CACHE === true && defined('CACHE_DRIVER')) {
+
+ echo "Flushing Pronto class maps from ".CACHE_DRIVER." cache...\n";
+ $cache =& Registry::get('pronto:cache');
+
+ $keys = array('map:pages','map:models','map:page_plugins','map:template_plugins');
+ foreach($keys as $k) {
+ echo "\tpronto:$k\n";
+ $cache->delete("pronto:$k");
+ }
+}
+
+
+?>
@@ -109,6 +109,7 @@ function build_table($params)
* - label :: header text label
* - align :: td alignment
* - type :: filter input type (text/select/date/none)
+ * - nosort :: set true to disable sorting on this column
* - flength :: length of filter field (for text fields only)
* - options :: options array for type==select
* - options_nokeys :: same as above, but use values in <option> fields instead of keys
View
@@ -87,6 +87,7 @@
}
$cache->gc();
Registry::set('pronto:cache', $cache);
+Registry::set('pronto:cache:main', $cache);
/************************************************************************
* MODULE INITIALIZATION

0 comments on commit 549e4d5

Please sign in to comment.