Skip to content
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

QR Code not working #14

Open
ravihansa3000 opened this issue Feb 13, 2014 · 2 comments
Open

QR Code not working #14

ravihansa3000 opened this issue Feb 13, 2014 · 2 comments

Comments

@ravihansa3000
Copy link
Contributor

Create a new person report, or open up an existing one. Then, scroll all the way to the bottom. Try use that with your mobile device, it didn't recognize for me. So then I too a screenshot and uploaded it to http://zxing.org/w/decode.jspx where it shows just a few bytes, and not really a link to the reported person.


Imported from Launchpad using lp2gh.

@ravihansa3000
Copy link
Contributor Author

(by akshayproductions)
Maybe these 2 need to be required at the top of eap/main.inc:
require_once($global['approot']."/mod/lpf/lib_helper.inc");
require_once($global['approot']."/mod/lpf/class.googl.php");

@ravihansa3000
Copy link
Contributor Author

(by akshayproductions)
After messing around, I figured out that makePageUrl() works, so the culprit was goo_gl class. Then, after some time of experimenting again, I figured out

that aparently there was an error each time. (object(stdClass)#292 (1) { ["error_message"]=> string(15) "Invalid Captcha" })

from the json decoded curl response.

Also, this class was made in 2010, so I went to the author's website to find that his own Googl Shortner didn't work. (http://marcusnunes.com/api-goo.gl.php)

So here are the changes that I have made:

Deleted old goo_gl class

Made my own googlUrl class :)

My class can make short url and get long url's from the short url :P

(Fixed another bug) made changes to the makePageURL function because it returned with a extra /.

Ex, go to http://127.0.0.1/edit?puuid=vesuvius.sahanafoundation.org%2Fperson.101 and it would return http://127.0.0.1//edit?puuid=vesuvius.sahanafoundation.org%2Fperson.101

Problem: If you keep doing this, then it will keep generating the goo.gl's and eventually someone might get the QR code for

http://127.0.0.1//////////edit?puuid=vesuvius.sahanafoundation.org%2Fperson.101

So, I have fixed this problem in the makePageURL function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant