diff --git a/phpQuery/phpQuery.php b/phpQuery/phpQuery.php index 5d214ad..08f22fc 100644 --- a/phpQuery/phpQuery.php +++ b/phpQuery/phpQuery.php @@ -94,6 +94,8 @@ abstract class phpQuery { 'data' => null, 'username' => null, 'password' => null, + 'dataType' => null, + 'ifModified' => null, 'accepts' => array( 'xml' => "application/xml, text/xml", 'html' => "text/html", diff --git a/phpQuery/phpQuery/DOMDocumentWrapper.php b/phpQuery/phpQuery/DOMDocumentWrapper.php index 0b6a7fd..13038cb 100644 --- a/phpQuery/phpQuery/DOMDocumentWrapper.php +++ b/phpQuery/phpQuery/DOMDocumentWrapper.php @@ -386,7 +386,7 @@ protected function charsetAppendToHTML($html, $charset, $xhtml = false) { .($xhtml ? '/' : '') .'>'; if (strpos($html, '
'http://'.$_SERVER['SERVER_NAME'].preg_replace('@/[^/]+$@', '/test_ajax_data_1', $_SERVER['REQUEST_URI']), + 'success' => 'a789fhasdui3124', + 'error' => 'jhdbg786213u8dsfg7y' +)); +function a789fhasdui3124($html) { + $testName = 'AJAX request text node'; + if ( $html == 'hello world' ) + print "Test '$testName' PASSED :)"; + else { + print "Test '$testName' FAILED !!! "; + } + print "\n"; +} + +function jhdbg786213u8dsfg7y() { + $testName = 'AJAX request text node'; + print "Test '$testName' FAILED !!! "; +} + + //$testName = 'gdata plugin'; //phpQuery::extend('gdata'); //$xhr = phpQuery::$plugins->gdata('tobiasz.cudnik@gmail.com', 'XXX'); diff --git a/test-cases/test_ajax_data_1 b/test-cases/test_ajax_data_1 new file mode 100644 index 0000000..95d09f2 --- /dev/null +++ b/test-cases/test_ajax_data_1 @@ -0,0 +1 @@ +hello world \ No newline at end of file