« Back Issue #438
  • 2016-05-14 11:08 Reported by yashi
  • 2016-05-30 13:07 Marked fixed
Status: Marked fixed
Priority: Medium

While Parsing Yioop Pages, all links related to internal pages need to be extracted and stored in database.

yashi 2016-05-14 11:08

Before parse method present in WikiParser.php is called to parse mediawiki document into equivalent HTML, we need to use the regular expressions indicating the presence of a link to fetch all internal links present in wiki pages and store them in table named GROUP_PAGE_LINK.

Steps to reproduce: 1. Call method setPageName in GroupModel.php. 2. There exists no method call to fetch links and so no entries are made to the table GROUP_PAGE_LINK for storing parent and child page ID.

Additional information: 1. Now, a method fetchLinks is added to WikiParser.php which gets all the links present in the page provided to it as an argument. 2. This method is called before parsing is done in setPageName in GroupModel.php. 3. On getting the links, we get the parent page ID and all child pages ID. 4. Thereafter, entries are stored in the database, removing duplicates.

yashi 2016-05-14 11:25

Hello Professor, I have added the patch for your approval. Please review it and let me know if any changes need to be done.

Regards, Yashi

administrator 2016-05-14 11:45

Hey Yashi,

Thanks for the patch. I am testing it out now. For future patch makes sure not to change the WORK_DIRECTORY in the Config.php file. Use a LocalConfig.php file to avoid this.

Best, Chris

yashi 2016-05-14 11:50

Hello Professor, I didn't make any change to the Config.php file. I am not sure why it said some changes have been made to this file.

Regards, Yashi

administrator 2016-05-19 11:10

Hi Yashi,

Your patch above have been applied. Thanks for your hard work! One issue I am a little worried about is what happens when we link to a wiki page that doesn't exist yet? I am probably going to add an auxiliary table to handle links that might need to be added later. I will mention here when I've done that. Till then, hold off on working on deliverable 4.

Best, Chris

yashi 2016-05-19 11:12

Sure professor. Thank you so much :)

Regards, Yashi

administrator 2016-05-30 13:07

Fixed before e4ba8ed

yashi 2016-05-30 13:07

Attachments:

YashiKamnoj.patch

X