Skip to content

Instantly share code, notes, and snippets.

<?php defined('SYSPATH') or die('No direct access');
$config['(.*)'] = 'pages/static/$1';
<?php
/**
* Provides simple file-based caching for strings and arrays:
*
* // Set the "foo" cache
* Kohana::cache('foo', 'hello, world');
*
* // Get the "foo" cache
* $foo = Kohana::cache('foo');
<?php
$protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';
$domain = $_SERVER['SERVER_NAME'];
$path = $_SERVER['REQUEST_URI'];
if (strpos($domain, 'www.') === 0)
{
// Remove the www from the domain
$domain = substr($domain, 4);
<?php defined('SYSPATH') OR die('No direct access allowed.');
class arr extends arr_Core {
public static function is_assoc(array $array)
{
// Keys of the array
$keys = array_keys($array);
// If the array keys of the keys match the keys, then the array must
# Manual hunk edit mode -- see bottom for a quick guide
@@ -17,6 +17,15 @@
const VERSION = '3.0';
const CODENAME = 'renaissance';
- // Save the cache on shutdown?
+ // The header that is used for file security. This is added to all
+ // generated PHP files to prevent direct inclusion from scripts run
+ // outside of Kohana.
+ const FILE_HEADER = "<?php defined('SYSPATH') or die('No direct access');\n\n";
<?php defined('SYSPATH') or die('No direct access');
return array
(
'title' => 'Kohana Authentication',
'author' => 'Kohana Team',
'version' => '3.0',
'description' => 'Provides simple and secure username/password authentication.',
'website' => 'http://kohanaphp.com/modules/auth',
'update' => 'http://update.kohanaphp.com/module/auth',
Index: /Volumes/Webserver/Checkout/mukuru/system/libraries/Router.php
===================================================================
--- /Volumes/Webserver/Checkout/mukuru/system/libraries/Router.php (revision 4024)
+++ /Volumes/Webserver/Checkout/mukuru/system/libraries/Router.php (working copy)
@@ -35,12 +35,6 @@
*/
public static function setup()
{
- if ( ! empty($_SERVER['QUERY_STRING']))
- {
<?
// Ensure we're dealing with local
return (bool) filter_var($ip_address, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_IPV4);
<VirtualHost *:80>
ServerName svn.mukurutrac.ath.cx
ServerAdmin support@mukuru.com
DocumentRoot /var/svn/
<Location />
DAV svn
SVNParentPath "/var/svn/"
AuthPAM_Enabled On
AuthPAM_FallThrough Off
<?php
public function index($product = NULL)
{
// Load the product
$product = ORM::factory('product', $product);
if ( ! View::is_cached('product_intel_25'))
{
// Cache the product details page