-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #1712 Plugin Download and Install from Market #2044
Conversation
Fixes e107inc#1712 Plugin Download and Install from Market
parse_str($string, $data); | ||
|
||
if(!empty($data['plugin_price'])) | ||
if(!empty($plugin_price)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use $data, is it empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup data was empty ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check details here...
https://docs.google.com/document/d/1hbq645DZHW2Zy1oSos71yJMiqHbEk06BObM5HvzWNgQ
I'm back after the weekend :)
'exception' => true, | ||
"uri" => "http://server.soap.e107.inc.com/", | ||
'cache_wsdl' => WSDL_CACHE_NONE, | ||
'connection_timeout' => 60, | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your tabs/spaces are showing as changes. Makes it difficult to track what you changed. :-(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed - another learning experience.
After downloading OK, we were trying to install using the folder name, derived from the db.
Hence rescanning the folders was needed after download and before install.
@MikeyGMT Thank you. I'd prefer not to clutter the debug log if possible. Was the issue the lack of curly brackets on the |
@@ -665,51 +680,59 @@ private function pluginDownload() | |||
$frm = e107::getForm(); | |||
$mes = e107::getMessage(); | |||
|
|||
e107::getDebug()->log("Plugin Download."); | |||
$tmp = explode('&', e_QUERY); // #1712 we need to process new ampersand separated query |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually we should check $_GET here. not 'split ampersands'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best way to learn is have a go.
What I found was $_GET only contained mode=download, there was no other data in there.
src is encrypted and in e_QUERY and that $tmp was already trying to grab values from exploding e_QUERY using .dot. separator.
However, we got & separators. So I added check to see id e_query contained &'s then exploded with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was unsure about leaving debug calls - they only show up in debug mode... when we need them. Agree it adds clutter. Will trim them down.
Good learning experience. I suppose, why was $_GET and $data are empty may be a better fix ? I'm online today. Busy this evening and weekend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't reproduce any of these issues on my local machine. If you can grant me FTP access to a machine that has this issue, I could run some tests. I have a hunch it is the use of '&' in the URL. I will commit that change and we can see how that affects things.
…g data added and ampersand modified on URL.
@MikeyGMT Do I understand that this issue is resolved? |
Fixes #1712 Plugin Download and Install from Market - Plus added debug statements around plugin download. Tested on 3 sites.