Skip to content

Commit

Permalink
added fix for using csrf
Browse files Browse the repository at this point in the history
  • Loading branch information
chonthu committed Nov 21, 2011
1 parent 3b0c099 commit 7b37465
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/test_gui.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@
</div>

<div id="nav">
<form action="<?php echo $form_url; ?>" method="post">
<?php echo form_open($form_url); ?>
<input type="hidden" name="all" value="1" />
<input type="submit" value="All" />
</form>
<form action="<?php echo $form_url; ?>" method="post">
<?php echo form_close(); ?>
<?php echo form_open($form_url); ?>
<input type="hidden" name="libraries" value="1" />
<input type="submit" value="Libraries" />
</form>
<form action="<?php echo $form_url; ?>" method="post">
<?php echo form_close(); ?>
<?php echo form_open($form_url); ?>
<input type="hidden" name="controllers" value="1" />
<input type="submit" value="Controllers" />
</form>
<form action="<?php echo $form_url; ?>" method="post">
<?php echo form_close(); ?>
<?php echo form_open($form_url); ?>
<input type="hidden" name="models" value="1" />
<input type="submit" value="Models" />
</form>
<form action="<?php echo $form_url; ?>" method="post">
<?php echo form_close(); ?>
<?php echo form_open($form_url); ?>
<input type="hidden" name="helpers" value="1" />
<input type="submit" value="Helpers" />
</form>
<form action="<?php echo $form_url; ?>" method="post">
<?php echo form_close(); ?>
<?php echo form_open($form_url); ?>
<input type="hidden" name="views" value="1" />
<input type="submit" value="Views" />
</form>
<form action="<?php echo $form_url; ?>" method="post">
<?php echo form_close(); ?>
<?php echo form_open($form_url); ?>
<input type="hidden" name="bugs" value="1" />
<input type="submit" value="Bugs" />
</form>
<?php echo form_close(); ?>

<?php
// RT Wolf's addition: HTML select the test you just ran in drop down list in case you want to rerun it.
Expand All @@ -52,7 +52,7 @@
}
?>

<form action="<?php echo $form_url; ?>" method="post">
<?php echo form_open($form_url); ?>
<select name="test">
<optgroup label="Libraries">
<?php foreach ($libraries as $value) { ?>
Expand Down Expand Up @@ -86,7 +86,7 @@
</optgroup>
</select>
<input type="submit" value="Run" />
</form>
<?php echo form_close(); ?>
</div>


Expand Down
1 change: 1 addition & 0 deletions unit_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public function __get($var)
$CI->session->sess_destroy();

$CI->load->helper('directory');
$CI->load->helper('form');

// Get all main tests
if ($run_all OR ( ! empty($_POST) && ! isset($_POST['test'])))
Expand Down

0 comments on commit 7b37465

Please sign in to comment.