diff options
| -rw-r--r-- | build.xml | 30 | ||||
| -rw-r--r-- | buildscripts/classtree/build.php | 5 | ||||
| -rw-r--r-- | buildscripts/index/build.php | 4 | ||||
| -rw-r--r-- | buildscripts/index/quickstart_index.php | 48 | ||||
| -rw-r--r-- | buildscripts/phing/tasks/QuickstartIndexTask.php | 6 | ||||
| -rw-r--r-- | demos/quickstart/protected/index/quickstart/_0.cfs | bin | 329302 -> 467144 bytes | |||
| -rw-r--r-- | demos/quickstart/protected/index/quickstart/segments | bin | 27 -> 27 bytes | |||
| -rw-r--r-- | framework/PradoBase.php | 2 | 
8 files changed, 57 insertions, 38 deletions
| @@ -1,6 +1,6 @@  <?xml version="1.0" encoding="UTF-8"?>  <!-- -  PRADO 3.0 build file - Copyright (C) 2006 PradoSoft +  PRADO 3.1 build file - Copyright (C) 2006 PradoSoft    Requirements    ============ @@ -42,8 +42,12 @@      <exclude name="**/.svn"/>      <exclude name="**/*.bak"/>      <exclude name="**/*~"/> -    <exclude name="**/pradolite.php" /> -    <exclude name="**/prado-cli.php" /> +    <exclude name="**/pradolite.php" /><!-- will be generated --> +    <exclude name="**/prado-cli.php" /><!-- will be copied later --> +    <exclude name="**/Configuration/**" /><!-- not ready yet --> +    <exclude name="**/Web/Security/**" /><!-- not ready yet --> +    <exclude name="**/TFeedService.php" /><!-- not ready yet --> +    <exclude name="**/IFeedContentProvider.php" /><!-- not ready yet -->      <include name="framework/**/*"/>    </fileset> @@ -62,13 +66,15 @@    </fileset>    <!-- -      Documentation +      Documentation ????    -->    <fileset dir="." id="docs">      <exclude name="**/.svn"/>      <exclude name="**/*.bak"/>      <exclude name="**/*~"/> -    <include name="docs/**/*"/> +    <exclude name="**/latex" /> +    <exclude name="**/sqlmap_tut.pdf" /> +    <include name="docs/specs/*"/>    </fileset>    <!-- @@ -83,9 +89,21 @@      <exclude name="**/runtime/*/**"/>      <exclude name="**/assets/*/**"/>      <exclude name="demos/blog/protected/Data/Blog.db" /> -    <include name="demos/**/*"/> +    <include name="demos/blog/**/*"/> +    <include name="demos/chat/**/*"/> +    <include name="demos/composer/**/*"/> +    <include name="demos/currency-converter/**/*"/> +    <include name="demos/helloworld/**/*"/> +    <include name="demos/personal/**/*"/> +    <include name="demos/quickstart/**/*"/> +    <include name="demos/soap/**/*"/> +    <include name="demos/sqlmap/**/*"/> +    <include name="demos/time-tracker/**/*"/>    </fileset> +  <!--
 +  		Test tools
 +  	-->
    <fileset dir="." id="test-tools">
      <include name="tests/test_tools/**/*"/>
    </fileset>
 diff --git a/buildscripts/classtree/build.php b/buildscripts/classtree/build.php index 7f5ddcd7..68e0ddc8 100644 --- a/buildscripts/classtree/build.php +++ b/buildscripts/classtree/build.php @@ -17,7 +17,10 @@ $exclusions=array(  	'.svn',
  	'/I18N/core',
  	'/3rdParty',
 -	'/Web/Security'
 +	'/Web/Security',
 +	'/Configuration',
 +	'/Web/Services/TFeedService.php',
 +	'/Web/Services/IFeedContentProvider.php'
  	);
  $a=new ClassTreeBuilder($frameworkPath,$exclusions);
  $a->buildTree();
 diff --git a/buildscripts/index/build.php b/buildscripts/index/build.php index 9ec0d659..0caaafb2 100644 --- a/buildscripts/index/build.php +++ b/buildscripts/index/build.php @@ -9,7 +9,7 @@  //quickstart source and the index data target directories.
 -$quickstart_source = realpath(dirname(__FILE__).'/../texbuilder/pages.php');
 +$quickstart_source = realpath(dirname(__FILE__).'/../texbuilder/quickstart/pages.php');
  $quickstart_base = realpath(dirname(__FILE__).'/../../demos/quickstart/protected/pages/');
  $quickstart_target = realpath(dirname(__FILE__).'/../../demos/quickstart/protected/index/quickstart/');
 @@ -46,7 +46,7 @@ if(isset($argv[1]))  		echo "Found ".count($hits)." for ".$query." in quick start\n";
  		foreach($hits as $hit)
  			echo "   ".$hit->title."\n";
 -			
 +
  		$a = new Zend_Search_Lucene($api_target);
  		$query = $argv[1];
  		$hits = $a->find(strtolower($query));
 diff --git a/buildscripts/index/quickstart_index.php b/buildscripts/index/quickstart_index.php index 565734ef..fb4bc829 100644 --- a/buildscripts/index/quickstart_index.php +++ b/buildscripts/index/quickstart_index.php @@ -4,10 +4,10 @@ class quickstart_index  {
  	private $_index;
  	private $_dir;
 -	
 +
  	private $_base;
  	private $_source;
 -	
 +
  	public function __construct($index_file, $base, $source)
  	{
  		$this->_index = new Zend_Search_Lucene($index_file, true);
 @@ -15,7 +15,7 @@ class quickstart_index  		$this->_base = $base;
  		$this->_source = $source;
  	}
 -	
 +
  	public function create_index()
  	{
  		echo "Building search index...\n";
 @@ -30,13 +30,13 @@ class quickstart_index  				$file_content = file_get_contents($page);
  				$this->add($file_content,$section, filemtime($page));
  				$count++;
 -			}		
 +			}
  		}
 -		
 +
  		$this->_index->commit();
 -		echo "\n {$count} files indexed.\n";		
 +		echo "\n {$count} files indexed.\n";
  	}
 -	
 +
  	public function add($content, $section, $mtime)
  	{
  		foreach($this->split_headings($content) as $headers)
 @@ -44,44 +44,44 @@ class quickstart_index  			$doc = new Zend_Search_Lucene_Document();
  			$link = "index.php?page=".preg_replace('/\/|\\\/', '.', $section);
  			$link = str_replace('.page', '', $link).'#'.$headers['section'];
 -			
 +
  			//unsearchable text
  			$doc->addField(Zend_Search_Lucene_Field::UnIndexed('link', $link));
  			$doc->addField(Zend_Search_Lucene_Field::UnIndexed('mtime', $mtime));
  			$doc->addField(Zend_Search_Lucene_Field::UnIndexed('title', $headers['title']));
 -			$doc->addField(Zend_Search_Lucene_Field::UnIndexed('text', $headers['content']));		
 -			
 +			$doc->addField(Zend_Search_Lucene_Field::UnIndexed('text', $headers['content']));
 +
  			//searchable text
  			$doc->addField(Zend_Search_Lucene_Field::Keyword('page', strtolower($headers['title'])));
  			$body = strtolower($this->sanitize($headers['content'])).' '.strtolower($headers['title']);
  			$doc->addField(Zend_Search_Lucene_Field::Unstored('contents',$body));
  			$this->_index->addDocument($doc);
 -		}		
 +		}
  	}
 -	
 -	function sanitize($input) 
 +
 +	function sanitize($input)
  	{
  		return htmlentities(strip_tags( $input ));
 -	}	
 -	
 +	}
 +
  	public function index()
  	{
  		return $this->_index;
  	}
 -	
 +
  	protected function split_headings($html)
  	{
  		$html = preg_replace('/<\/?com:TContent[^<]*>/', '', $html);
 -		
 +
  		$html = preg_replace('/<b>([^<]*)<\/b>/', '$1', $html);
  		$html = preg_replace('/<i>([^<]*)<\/i>/', '$1', $html);
  		$html = preg_replace('/<tt>([^<]*)<\/tt>/', '$1', $html);
 -		
 +
  		$html = preg_replace('/<h1([^>]*)>([^<]*)<\/h1>/', '<hh$1>$2</hh>', $html);
  		$html = preg_replace('/<h2([^>]*)>([^<]*)<\/h2>/', '<hh$1>$2</hh>', $html);
  		$html = preg_replace('/<h3([^>]*)>([^<]*)<\/h3>/', '<hh$1>$2</hh>', $html);
 -		
 -		
 +
 +
  		$sections = preg_split('/<hh[^>]*>([^<]+)<\/hh>/', $html,-1);
  		$headers = array();
  		preg_match_all('/<hh([^>]*)>([^<]+)<\/hh>/', $html, $headers);
 @@ -89,19 +89,17 @@ class quickstart_index  		for($i = 1, $t = count($sections); $i < $t; $i++)
  		{
  			$content['title'] = trim($this->sanitize($headers[2][$i-1]));
 -			$sec = array();
 -			preg_match('/"([^"]*)"/', $headers[1][$i-1], $sec);
 -			$content['section'] = str_replace('"', '',$sec[0]);
 +			$content['section'] = str_replace('"', '',trim($headers[1][$i-1],'"'));
  			$content['content'] = trim($this->sanitize($sections[$i]));
  			$contents[] = $content;
  		}
  		return $contents;
  	}
 -	
 +
  	public function commit()
  	{
 -		$this->_index->commit();		
 +		$this->_index->commit();
  		$count = $this->_index->count();
  		echo "\nSaving search index ({$count}) to {$this->_dir}\n\n";
  	}
 diff --git a/buildscripts/phing/tasks/QuickstartIndexTask.php b/buildscripts/phing/tasks/QuickstartIndexTask.php index f3107fd3..64a48d4a 100644 --- a/buildscripts/phing/tasks/QuickstartIndexTask.php +++ b/buildscripts/phing/tasks/QuickstartIndexTask.php @@ -4,7 +4,7 @@ require_once 'phing/Task.php';  /**
   * Task to index quickstart
 - */	
 + */
  class QuickstartIndexTask extends Task
  {
  	private $todir;
 @@ -20,9 +20,9 @@ class QuickstartIndexTask extends Task  		$zend_path = $srcdir.'/demos/quickstart/protected/index';
  		set_include_path(get_include_path().PATH_SEPARATOR.realpath($zend_path));
  		require_once ('Zend/Search/Lucene.php');
 -		
 +
  		require_once($srcdir.'/buildscripts/index/quickstart_index.php');
 -		$quickstart_source = $srcdir.'/buildscripts/texbuilder/pages.php';
 +		$quickstart_source = $srcdir.'/buildscripts/texbuilder/quickstart/pages.php';
  		$quickstart_base = $srcdir.'/demos/quickstart/protected/pages/';
  		$quickstart = new quickstart_index($this->todir, realpath($quickstart_base), realpath($quickstart_source));
  		$quickstart->create_index();
 diff --git a/demos/quickstart/protected/index/quickstart/_0.cfs b/demos/quickstart/protected/index/quickstart/_0.cfsBinary files differ index f3cb1bfb..863a34d0 100644 --- a/demos/quickstart/protected/index/quickstart/_0.cfs +++ b/demos/quickstart/protected/index/quickstart/_0.cfs diff --git a/demos/quickstart/protected/index/quickstart/segments b/demos/quickstart/protected/index/quickstart/segmentsBinary files differ index 5509e664..0c5b6213 100644 --- a/demos/quickstart/protected/index/quickstart/segments +++ b/demos/quickstart/protected/index/quickstart/segments diff --git a/framework/PradoBase.php b/framework/PradoBase.php index 4cfedb09..ac3949ba 100644 --- a/framework/PradoBase.php +++ b/framework/PradoBase.php @@ -68,7 +68,7 @@ class PradoBase  	 */
  	public static function getVersion()
  	{
 -		return '3.1.0b';
 +		return '3.1.0a';
  	}
  	/**
 | 
