← Back to team overview

anewt-developers team mailing list archive

[Branch ~uws/anewt/anewt.uws] Rev 1717: [form] Update code for AnewtRequest API changes

 

------------------------------------------------------------
revno: 1717
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt.uws
timestamp: Sun 2009-08-02 13:09:23 +0200
message:
  [form] Update code for AnewtRequest API changes
modified:
  form/form.lib.php
  form/form.test.php


--
lp:anewt
https://code.launchpad.net/~uws/anewt/anewt.uws

Your team Anewt developers is subscribed to branch lp:anewt.
To unsubscribe from this branch go to https://code.launchpad.net/~uws/anewt/anewt.uws/+edit-subscription.
=== modified file 'form/form.lib.php'
--- form/form.lib.php	2009-03-27 17:40:21 +0000
+++ form/form.lib.php	2009-08-02 11:09:23 +0000
@@ -71,7 +71,7 @@
 		$this->_seed(array(
 			'id'          => $id,
 			'method'      => ANEWT_FORM_METHOD_POST,
-			'action'      => Request::relative_url(),
+			'action'      => AnewtRequest::relative_url(),
 
 			'description' => null,
 			'error'       => null,
@@ -197,10 +197,10 @@
 	function autofill()
 	{
 		$form_method = $this->_get('method');
-		if (Request::is_get() && $form_method == ANEWT_FORM_METHOD_GET) {
+		if (AnewtRequest::is_get() && $form_method == ANEWT_FORM_METHOD_GET) {
 			return $this->fill($_GET);
 		}
-		elseif (Request::is_post() && $form_method == ANEWT_FORM_METHOD_POST) {
+		elseif (AnewtRequest::is_post() && $form_method == ANEWT_FORM_METHOD_POST) {
 			return $this->fill($_POST);
 		}
 		return false;

=== modified file 'form/form.test.php'
--- form/form.test.php	2009-03-27 17:40:21 +0000
+++ form/form.test.php	2009-08-02 11:09:23 +0000
@@ -70,7 +70,7 @@
 
 		/* General form setup and test some properties */
 
-		$this->setup('test-name', ANEWT_FORM_METHOD_POST, Request::url(true));
+		$this->setup('test-name', ANEWT_FORM_METHOD_POST, AnewtRequest::url(true));
 
 		$this->set('error', 'This is a general form error.');
 		$this->set('description', 'This is the form\'s description.');
@@ -427,7 +427,7 @@
 $page->append(ax_h2('The form'));
 $page->append($fr);
 
-if (Request::is_post())
+if (AnewtRequest::is_post())
 {
 	$values = $form->get_control_values();
 	ob_start(); var_dump($values); $values = ob_get_clean();