Skip to content

Commit

Permalink
Added support to non MOD REWRITE servers.
Browse files Browse the repository at this point in the history
  • Loading branch information
alrik11es committed Apr 20, 2012
1 parent e70df3d commit 47c1421
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
7 changes: 6 additions & 1 deletion changelog.md
Expand Up @@ -2,12 +2,17 @@

v 1.2.2

- Added stack based validation system.
- Changes in image management.
- Added a good pagination class.
- Improved the resize algorithm in image manipulation class.
- Added support to non MOD REWRITE servers. (Unstable)

v 1.2.1

- Added the posibility to return a text instead of a view object.
- Major rework of Request.php file to simplify the code.
- Added the posibility to use index methods. Works as common html, in case of collision folders are first.
- Added the posibility to use index methods. Works as common html, in case of collision folders first.
- Corrected a mistake in db_config.yaml no need to ; at the end of a line.
- Added new Twig version.

Expand Down
15 changes: 12 additions & 3 deletions my_app/view/web/index.twig
Expand Up @@ -4,11 +4,20 @@
<b>This is a Simple PHP Framework Application</b><br/>
{{example_var}}
<br/><br/>
Mini-menu:
<br/><br/>

<h3>MOD REWRITE enabled</h3>

<a href="{{path}}main/index">Main page</a><br/>
<a href="{{path}}main/phpView">PHP View page</a><br/>
<a href="{{path}}test/twig">Page from widget with TWIG</a><br/>
<a href="{{path}}test/php">Page from widget with PHP</a><br/>
<a href="{{path}}main/other">Other page</a>
<a href="{{path}}main/other">Other page</a><br/>

<h3>MOD REWRITE disabled</h3>

<a href="{{path}}?page=main/index">Main page</a><br/>
<a href="{{path}}?page=main/phpView">PHP View page</a><br/>
<a href="{{path}}?page=test/twig">Page from widget with TWIG</a><br/>
<a href="{{path}}?page=test/php">Page from widget with PHP</a><br/>
<a href="{{path}}?page=main/other">Other page</a><br/>
{% endblock %}
5 changes: 4 additions & 1 deletion my_app/view/web/other.twig
Expand Up @@ -4,5 +4,8 @@

{% block body %}
<b>This is another page in your Application</b><br/><br/>
<a href="{{path}}main/index">Return to main</a>
<h3>MOD REWRITE enabled</h3>
<a href="{{path}}main/index">Return to main</a><br/>
<h3>MOD REWRITE disabled</h3>
<a href="{{path}}?page=main/index">Return to main | NO MOD REWRITE</a>
{% endblock %}
@@ -1,5 +1,5 @@
<?php
namespace coldstarstudios\databases;
namespace coldstarstudios\datatypes;

/**
* This class is used to use a new data type called DataTable that allows
Expand All @@ -12,7 +12,7 @@
class DataTable {

private $table_fields = array();
private $table_content = array();
private $table_contents = array();

/**
* Extracts a portion of the DataTable returning an array.
Expand Down
1 change: 1 addition & 0 deletions sPHPf/vendors/coldstarstudios/framework/Path.php
Expand Up @@ -28,6 +28,7 @@ function __toString() {
$path .= str_replace($page, '', $clean[0]);

$path = str_replace($_SERVER['QUERY_STRING'], '', $path);
$path = str_replace('index.php', '', $path);

return $path;
} else
Expand Down

0 comments on commit 47c1421

Please sign in to comment.