Fixed cronjob
authorMarcel Werk <burntime@woltlab.com>
Thu, 25 Apr 2013 15:45:05 +0000 (17:45 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 25 Apr 2013 15:45:05 +0000 (17:45 +0200)
spiderList/spiderList.xml
wcfsetup/install/files/lib/system/cronjob/RefreshSearchRobotsCronjob.class.php

index 354f32ca1f66785bea6fb8aab82f9b1528fc413f..11832c2752c2b2c334d5a1944f7ba43ed84446b4 100644 (file)
                <name>Zork</name>
                <url>http://www.zorkk.com</url>
        </spider>
-</spiderlist>
\ No newline at end of file
+</data>
\ No newline at end of file
index debdca142d6223802b7f153053efdd5f0d770654..a603345314c92ae90b94a5ca39ecd090fa4b5b91 100644 (file)
@@ -29,7 +29,7 @@ class RefreshSearchRobotsCronjob implements ICronjob {
                $xpath = $xml->xpath();
                
                // fetch spiders
-               $spiders = $xpath->query('/data/spider');
+               $spiders = $xpath->query('/ns:data/ns:spider');
                
                if (!empty($spiders)) {
                        // delete old entries
@@ -40,8 +40,8 @@ class RefreshSearchRobotsCronjob implements ICronjob {
                        $statementParameters = array();
                        foreach ($spiders as $spider) {
                                $identifier = StringUtil::toLowerCase($spider->getAttribute('ident'));
-                               $name = $xpath->query('name', $spider)->item(0);
-                               $info = $xpath->query('url', $spider)->item(0);
+                               $name = $xpath->query('ns:name', $spider)->item(0);
+                               $info = $xpath->query('ns:url', $spider)->item(0);
                                
                                $statementParameters[$identifier] = array(
                                        'spiderIdentifier' => $identifier,