Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
83c56c52
Commit
83c56c52
authored
Jun 07, 2016
by
Dominik Hebeler
Browse files
Bugfix bei dem Manchmal die falschen Pagination Links generiert wurden
Qip eingefügt
parent
a09540d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Models/parserSkripte/Qip.php
View file @
83c56c52
...
...
@@ -2,33 +2,37 @@
namespace
app\Models\parserSkripte
;
use
App\Models\Searchengine
;
use
Log
;
class
Qip
extends
Searchengine
{
public
$results
=
[];
function
__construct
(
\
SimpleXMLElement
$engine
,
\
App\MetaGer
$metager
)
function
__construct
(
\
SimpleXMLElement
$engine
,
\
App\MetaGer
$metager
)
{
parent
::
__construct
(
$engine
,
$metager
);
}
public
function
loadResults
(
$result
)
{
die
(
$result
);
$results
=
trim
(
$result
);
$result
=
preg_replace
(
"/
\r\n
/si"
,
""
,
$result
);
try
{
$content
=
simplexml_load_string
(
$result
);
}
catch
(
\
Exception
$e
)
{
abort
(
500
,
"
$result
is not a valid xml string"
);
}
foreach
(
explode
(
"
\n
"
,
$results
)
as
$result
)
if
(
!
$content
)
{
return
;
}
$results
=
$content
->
xpath
(
'//channel/item'
);
foreach
(
$results
as
$result
)
{
$res
=
explode
(
"|"
,
$result
);
if
(
sizeof
(
$res
)
<
3
)
{
continue
;
}
$title
=
$res
[
0
];
$link
=
$res
[
2
];
$title
=
$result
->
{
"title"
}
->
__toString
();
$link
=
$result
->
{
"link"
}
->
__toString
();
$anzeigeLink
=
$link
;
$descr
=
$res
[
1
];
$descr
=
$result
->
{
"description"
}
->
__toString
();
$this
->
counter
++
;
$this
->
results
[]
=
new
\
App\Models\Result
(
$this
->
engine
,
...
...
@@ -38,9 +42,7 @@ class Qip extends Searchengine
$descr
,
$this
->
gefVon
,
$this
->
counter
);
);
}
}
}
\ No newline at end of file
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment