Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
Some lines where space-indented, some by 2 spaces. Converted all indent
spaces to tabs.
  • Loading branch information
gbirke committed Nov 20, 2015
1 parent e43b5a1 commit 5f497cd
Showing 1 changed file with 47 additions and 47 deletions.
94 changes: 47 additions & 47 deletions inc/config.sample.inc.php
Expand Up @@ -45,11 +45,11 @@

if ( empty($myDomain) ) {
if ( !empty($_SERVER['HTTP_HOST'] ) ) {
$myDomain = $_SERVER['HTTP_HOST'];
$myDomain = $_SERVER['HTTP_HOST'];
} else if ( !empty($_SERVER['SERVER_NAME']) ) {
$myDomain = $_SERVER['SERVER_NAME'];
$myDomain = $_SERVER['SERVER_NAME'];
} else {
$myDomain = false;
$myDomain = false;
}
}

Expand All @@ -68,12 +68,12 @@
}

if ( $devMode ) {
error_reporting( E_ALL );
ini_set( "display_errors", 1 );
error_reporting( E_ALL );
ini_set( "display_errors", 1 );
}

if ( $devMode && $cliMode ) { // dev mode, use local resources
if ( !function_exists('debug') ) {
if ( !function_exists('debug') ) {
function debug($location, $msg = "", $var = "nothing9874325") {
$s = "";

Expand All @@ -85,7 +85,7 @@ function debug($location, $msg = "", $var = "nothing9874325") {
}
}

if ( !function_exists('backtrace') ) {
if ( !function_exists('backtrace') ) {
function backtrace($label) {
debug_print_backtrace();
}
Expand All @@ -110,14 +110,14 @@ function backtrace($label) {

$firephp->registerExceptionHandler(false);

if ( !function_exists('debug') ) {
if ( !function_exists('debug') ) {
function debug($location, $name = "", $var = "") {
global $firephp;
$firephp->log($var, $location . ': ' . $name);
}
}

if ( !function_exists('backtrace') ) {
if ( !function_exists('backtrace') ) {
function backtrace($label) {
global $firephp;
$firephp->trace($label);
Expand Down Expand Up @@ -146,51 +146,51 @@ function debug() {
if ( defined('SETUP_WIKI_BOXES') && isset($wbWikiUrl) ) {
debug(__FILE__, "setting up wiki boxes", $wbWikiUrl);

require_once("wikibox.class.php");
if ( $wbInternalCacheMode ) {
$buff = new LocalCache($wbCachePrefix, $wbInternalCacheMode);
$wbRipCache = new BufferedFileCache($buff, $wbCacheDir, $wbCachePrefix);
$wbRipCache->buffer_expiry = $wbCacheBufferDuration;
} else if ( $wbMemcachedServer ) {
$buff = new MemcachedCache($wbMemcachedServer, $wbCachePrefix);
$wbRipCache = new BufferedFileCache($buff, $wbCacheDir, $wbCachePrefix);
$wbRipCache->buffer_expiry = $wbCacheBufferDuration;
} else {
$wbRipCache = new FileCache($wbCacheDir, $wbCachePrefix);
}

if ( $wbImageCacheDir ) {
$wbImageCache = new FileCache($wbImageCacheDir, $wbCachePrefix);
$wbImageCache->serialize = false; // raw data, not serialized
$wbImageCache->suffix = ""; // keep extension
$wbImageCache->fmode = 0644; //make cached files readable
}

$wbPageCacheList = new FreshCacheList( "$wbCacheDir/{$wbCachePrefix}page-cache.list" );
$wbImageCacheList = new FreshCacheList( "$wbImageCacheDir/{$wbCachePrefix}image-cache.list" );
require_once("wikibox.class.php");

if ( $wbInternalCacheMode ) {
$buff = new LocalCache($wbCachePrefix, $wbInternalCacheMode);
$wbRipCache = new BufferedFileCache($buff, $wbCacheDir, $wbCachePrefix);
$wbRipCache->buffer_expiry = $wbCacheBufferDuration;
} else if ( $wbMemcachedServer ) {
$buff = new MemcachedCache($wbMemcachedServer, $wbCachePrefix);
$wbRipCache = new BufferedFileCache($buff, $wbCacheDir, $wbCachePrefix);
$wbRipCache->buffer_expiry = $wbCacheBufferDuration;
} else {
$wbRipCache = new FileCache($wbCacheDir, $wbCachePrefix);
}

if ( $wbImageCacheDir ) {
$wbImageCache = new FileCache($wbImageCacheDir, $wbCachePrefix);
$wbImageCache->serialize = false; // raw data, not serialized
$wbImageCache->suffix = ""; // keep extension
$wbImageCache->fmode = 0644; //make cached files readable
}

$wbPageCacheList = new FreshCacheList( "$wbCacheDir/{$wbCachePrefix}page-cache.list" );
$wbImageCacheList = new FreshCacheList( "$wbImageCacheDir/{$wbCachePrefix}image-cache.list" );

$cookieJarParams = array(
'expire' => time() + 604800, /* 1 week */
#'secure' => false,
#'domain' => 'www.wikipedia.de',
'path' => '/wpde'
);
$featurebox = new WikiBox( $wbWikiUrl, $wbRipCache, null, new CookieJar( $cookieJarParams ) );
$featurebox->setImageCache($wbImageCache, $wbImageCachePath, $wbImageCacheExceptions);
$featurebox->purge = $purge;
$featurebox->cache_duration = $wbCacheDuration;
$featurebox->page_cache_list = $wbPageCacheList;
$featurebox->image_cache_list = $wbImageCacheList;
$featurebox->bannerWasClosedCookieName = $wbBannerWasClosedCookie;

$bannerbox = new WikiBox( $wbWikiUrl, $wbRipCache, null, new CookieJar( $cookieJarParams ) );
$bannerbox->setImageCache($wbImageCache, $wbImageCachePath, $wbImageCacheExceptions);
$bannerbox->purge = $purge;
$bannerbox->cache_duration = $wbCacheDuration;
$bannerbox->page_cache_list = $wbPageCacheList;
$bannerbox->image_cache_list = $wbImageCacheList;
$bannerbox->bannerWasClosedCookieName = $wbBannerWasClosedCookie;
$featurebox = new WikiBox( $wbWikiUrl, $wbRipCache, null, new CookieJar( $cookieJarParams ) );
$featurebox->setImageCache($wbImageCache, $wbImageCachePath, $wbImageCacheExceptions);
$featurebox->purge = $purge;
$featurebox->cache_duration = $wbCacheDuration;
$featurebox->page_cache_list = $wbPageCacheList;
$featurebox->image_cache_list = $wbImageCacheList;
$featurebox->bannerWasClosedCookieName = $wbBannerWasClosedCookie;

$bannerbox = new WikiBox( $wbWikiUrl, $wbRipCache, null, new CookieJar( $cookieJarParams ) );
$bannerbox->setImageCache($wbImageCache, $wbImageCachePath, $wbImageCacheExceptions);
$bannerbox->purge = $purge;
$bannerbox->cache_duration = $wbCacheDuration;
$bannerbox->page_cache_list = $wbPageCacheList;
$bannerbox->image_cache_list = $wbImageCacheList;
$bannerbox->bannerWasClosedCookieName = $wbBannerWasClosedCookie;
}

$featuretest = @$_GET['featuretest'];
Expand Down

0 comments on commit 5f497cd

Please sign in to comment.