Skip to content

Commit

Permalink
Prefer target Textile in restricted mode.
Browse files Browse the repository at this point in the history
This drops direct Textile support and any Textile
dependency.

Always uses target installation's Textile, and does not
pack in the compiled contents.
  • Loading branch information
Jukka Svahn committed Jan 11, 2013
1 parent 2023a41 commit f117f00
Showing 1 changed file with 3 additions and 35 deletions.
38 changes: 3 additions & 35 deletions rah_plugcompile.php
Expand Up @@ -120,14 +120,6 @@ class rah_plugcompile {

static public $package_cache = NULL;

/**
* Stores Textile instance.
*
* @var Textile
*/

static public $classTextile = NULL;

/**
* Stores class instances.
*
Expand All @@ -154,23 +146,6 @@ public function __construct() {
self::$rundir = dirname(__FILE__);
}

if(self::$classTextile === NULL) {

self::$classTextile = false;

if(!class_exists('Textile') && file_exists(self::$rundir.'/classTextile.php')) {
@include_once self::$rundir.'/classTextile.php';
}

if(!class_exists('Textile') && defined('txpath')) {
@include_once txpath.'/lib/classTextile.php';
}

if(class_exists('Textile')) {
self::$classTextile = new Textile();
}
}

if($this->header === NULL) {
$this->header = implode("\n", array(
'# Name: {name} v{version}',
Expand Down Expand Up @@ -323,16 +298,9 @@ protected function format_help() {
$this->pathinfo['extension'] == 'textile' ||
preg_match('/h1(\(.*\))?\./', $this->plugin['help'])
) {

if(self::$classTextile) {
$this->plugin['help'] = self::$classTextile->TextileThis($this->plugin['help']);
}

else {
$this->plugin['help_raw'] = $this->plugin['help'];
$this->plugin['allow_html_help'] = 0;
$this->plugin['help'] = '';
}
$this->plugin['help_raw'] = $this->plugin['help'];
$this->plugin['allow_html_help'] = 0;
$this->plugin['help'] = '';
}
}

Expand Down

0 comments on commit f117f00

Please sign in to comment.