Skip to content

Commit

Permalink
Remove php shortags in examples and tests to enhance compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrice Luraine committed Oct 16, 2010
1 parent 92734d3 commit 9365925
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 34 deletions.
1 change: 0 additions & 1 deletion TODO
Expand Up @@ -6,7 +6,6 @@
### 0.5 ###

- complete CHANGES file
- removing php shortags in example to enhance compatibility


### 0.5.1 ###
Expand Down
20 changes: 10 additions & 10 deletions examples/example01/index.php
Expand Up @@ -104,23 +104,23 @@ function html_my_layout($vars){ extract($vars);?>
</head>
<body>
<h1>Limonde first example</h1>
<?=$content?>
<?php echo $content?>
<hr>
<a href="<?=url_for('/')?>">Home</a> |
<a href="<?=url_for('/hello/', $name)?>">Hello</a> |
<a href="<?=url_for('/welcome/', $name)?>">Welcome !</a> |
<a href="<?=url_for('/are_you_ok/', $name)?>">Are you ok ?</a> |
<a href="<?=url_for('/how_are_you/', $name)?>">How are you ?</a>
<a href="<?php echo url_for('/')?>">Home</a> |
<a href="<?php echo url_for('/hello/', $name)?>">Hello</a> |
<a href="<?php echo url_for('/welcome/', $name)?>">Welcome !</a> |
<a href="<?php echo url_for('/are_you_ok/', $name)?>">Are you ok ?</a> |
<a href="<?php echo url_for('/how_are_you/', $name)?>">How are you ?</a>
</body>
</html>
<?}

function html_welcome($vars){ extract($vars);?>
<h3>Hello <?=$name?>!</h3>
<p><a href="<?=url_for('/how_are_you/', $name)?>">How are you <?=$name?>?</a></p>
<h3>Hello <?php echo $name?>!</h3>
<p><a href="<?php echo url_for('/how_are_you/', $name)?>">How are you <?php echo $name?>?</a></p>
<hr>
<p><a href="<?=url_for('/images/soda_glass.jpg')?>">
<img src="<?=url_for('/soda_glass.jpg/thumb')?>"></a></p>
<p><a href="<?php echo url_for('/images/soda_glass.jpg')?>">
<img src="<?php echo url_for('/soda_glass.jpg/thumb')?>"></a></p>
<?}


Expand Down
24 changes: 10 additions & 14 deletions examples/example02/index.php
Expand Up @@ -119,25 +119,21 @@ function html_my_layout($vars){ extract($vars);?>
</head>
<body>
<h1>Limonde second example: errors</h1>
<?=$content?>
<?php echo $content?>
<hr>
<p>
<a href="<?=url_for('/')?>">Home</a> |
<a href="<?=url_for('/everything/is_going_wrong')?>">everything is going wrong</a> |
<a href="<?=url_for('/welcome/')?>">Welcome !</a> |
<a href="<?=url_for('/welcome/bill')?>">Welcome Bill ?</a> |
<a href="<?=url_for('/welcome/leland')?>">Welcome Leland ?</a> |
<a href="<?=url_for('/welcome/bob')?>">Welcome Bob ?</a> |
<a href="<?=url_for('/welcome/david')?>">Welcome David ?</a> |
<a href="<?=url_for('/welcome/audrey')?>">Welcome Audrey ?</a> |
<a href="<?php echo url_for('/')?>">Home</a> |
<a href="<?php echo url_for('/everything/is_going_wrong')?>">everything is going wrong</a> |
<a href="<?php echo url_for('/welcome/')?>">Welcome !</a> |
<a href="<?php echo url_for('/welcome/bill')?>">Welcome Bill ?</a> |
<a href="<?php echo url_for('/welcome/leland')?>">Welcome Leland ?</a> |
<a href="<?php echo url_for('/welcome/bob')?>">Welcome Bob ?</a> |
<a href="<?php echo url_for('/welcome/david')?>">Welcome David ?</a> |
<a href="<?php echo url_for('/welcome/audrey')?>">Welcome Audrey ?</a> |
</p>
</body>
</html>
<!--
<?php print_r(benchmark()); ?>
-->
<?}



?>
<?};
2 changes: 1 addition & 1 deletion examples/example03/.htaccess
Expand Up @@ -9,5 +9,5 @@
# test string is a valid directory
RewriteCond %{SCRIPT_FILENAME} !-d

RewriteRule ^.*$ index.php [L]
RewriteRule ^(.*)$ index.php?uri=/$1 [NC,L,QSA]
</IfModule>
16 changes: 8 additions & 8 deletions tests/apps/07-flash.php
Expand Up @@ -57,26 +57,26 @@ function html_default_layout($vars){ extract($vars);?>
</head>
<body>
<article>
<?=$content;?>
<?php echo $content;?>

<?php if(!empty($flash)): ?>
<section>
<h2>Current flash messages ( flash_now() / $flash )</h2>
<pre><code>
<?= var_dump(flash_now()); ?>
<?php echo var_dump(flash_now()); ?>
</code></pre>
</section>
<?php endif; ?>
</article>
<hr>
<nav>
<p><strong>Menu:</strong>
<a href="<?=url_for('/')?>">One</a> |
<a href="<?=url_for('two')?>">Two</a> |
<a href="<?=url_for('three')?>">Three</a> |
<a href="<?=url_for('four')?>">Four</a> |
<a href="<?=url_for('five')?>">Five</a> |
<a href="<?=url_for('six')?>">Six</a>
<a href="<?php echo url_for('/')?>">One</a> |
<a href="<?php echo url_for('two')?>">Two</a> |
<a href="<?php echo url_for('three')?>">Three</a> |
<a href="<?php echo url_for('four')?>">Four</a> |
<a href="<?php echo url_for('five')?>">Five</a> |
<a href="<?php echo url_for('six')?>">Six</a>
</p>
</nav>
</body>
Expand Down

0 comments on commit 9365925

Please sign in to comment.