Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vtigercrm
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Welcome to Vtiger Community. To gain access for account, please contact [ community @ vtiger.com ]
Show more breadcrumbs
Stefan Warnat
vtigercrm
Commits
013a7c94
Commit
013a7c94
authored
2 years ago
by
Prasad
Browse files
Options
Downloads
Patches
Plain Diff
Fixed magpierss for php 8.x
parent
b0b67fdc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/magpierss/rss_fetch.inc
+11
-11
11 additions, 11 deletions
libraries/magpierss/rss_fetch.inc
libraries/magpierss/rss_parse.inc
+3
-3
3 additions, 3 deletions
libraries/magpierss/rss_parse.inc
with
14 additions
and
14 deletions
libraries/magpierss/rss_fetch.inc
+
11
−
11
View file @
013a7c94
...
...
@@ -82,6 +82,7 @@ require_once( MAGPIE_EXTLIB . 'Snoopy.class.inc');
\*=======================================================================*/
define
(
'MAGPIE_VERSION'
,
'0.72'
);
define
(
'MAGPIE_CACHE_ON'
,
false
);
/* Fix: XML_Parser cannot be serialized */
$MAGPIE_ERROR
=
""
;
...
...
@@ -265,17 +266,16 @@ function magpie_error ($errormsg="") {
Output: an HTTP response object (see Snoopy.class.inc)
\*=======================================================================*/
function
_fetch_remote_file
(
$url
,
$headers
=
""
)
{
// Snoopy is an HTTP client in PHP
$client
=
new
Snoopy
();
$client
->
agent
=
MAGPIE_USER_AGENT
;
$client
->
read_timeout
=
MAGPIE_FETCH_TIME_OUT
;
$client
->
use_gzip
=
MAGPIE_USE_GZIP
;
if
(
is_array
(
$headers
)
)
{
$client
->
rawheaders
=
$headers
;
}
$client
->
fetch
(
$url
);
return
$client
;
require_once
'vtlib/Vtiger/Net/Client.php'
;
$client
=
new
Vtiger_Net_Client
(
$url
);
if
(
is_array
(
$headers
))
$client
->
setHeaders
(
$headers
);
$content
=
$client
->
doGet
(
null
,
MAGPIE_FETCH_TIME_OUT
);
$res
=
new
stdClass
;
$res
->
status
=
$client
->
client
->
getResponseCode
();
$res
->
results
=
$content
;
return
$res
;
}
...
...
This diff is collapsed.
Click to expand it.
libraries/magpierss/rss_parse.inc
+
3
−
3
View file @
013a7c94
...
...
@@ -91,7 +91,7 @@ class MagpieRSS {
* source encoding. (caveat emptor)
*
*/
function
MagpieRSS
(
$source
,
$output_encoding
=
'UTF-8'
,
function
__construct
(
$source
,
$output_encoding
=
'UTF-8'
,
$input_encoding
=
null
,
$detect_encoding
=
true
)
{
# if PHP xml isn't compiled in, die
...
...
@@ -106,7 +106,7 @@ class MagpieRSS {
$output_encoding
,
$input_encoding
,
$detect_encoding
);
if
(
!
is_
resource
(
$parser
))
{
if
(
!
is_
object
(
$parser
))
{
$this
->
error
(
"Failed to create an instance of PHP's XML parser. "
.
"http://www.php.net/manual/en/ref.xml.php"
,
E_USER_ERROR
);
...
...
@@ -449,7 +449,7 @@ class MagpieRSS {
*
*/
function
create_parser
(
$source
,
$out_enc
,
$in_enc
,
$detect
)
{
if
(
substr
(
phpversion
(),
0
,
1
)
=
=
5
)
{
if
(
substr
(
phpversion
(),
0
,
1
)
>
=
5
)
{
$parser
=
$this
->
php5_create_parser
(
$in_enc
,
$detect
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment