Learning with Texts - Fork  2.10.0-fork
Learn foreign languages with texts
Functions
ajax_load_feed.php File Reference

Load a RSS feed. More...

Functions

 get_feeds_list ($feed, $nfid)
 
 print_feed_result ($imported_feed, $nif, $nfname, $nfid, $nfoptions)
 
 do_ajax_load_feed ($nfname, $nfid, $nfsourceuri, $nfoptions)
 

Detailed Description

Load a RSS feed.

Call: inc/ajax_load_feed.php

Author
andreask7 andre.nosp@m.ask7.nosp@m.@user.nosp@m.s.no.nosp@m.reply.nosp@m..git.nosp@m.hub.c.nosp@m.om @license Unlicense http://unlicense.org/ 1.6.0-fork

Function Documentation

◆ do_ajax_load_feed()

do_ajax_load_feed (   $nfname,
  $nfid,
  $nfsourceuri,
  $nfoptions 
)

Main function to execute an AJAX query echoing feeds.

Parameters
string$nfnameNewsfeed name
int$nfidNews feed ID
string$nfsourceuriNews feed source
string$nfoptionsNews feed options
Returns
string Message if an error occured, '' otherwise

◆ get_feeds_list()

get_feeds_list (   $feed,
  $nfid 
)

Get the list of feeds.

Parameters
string[][]$feedA feed
Returns
array{0: int, 1: int} Number of imported feeds and number of duplicated feeds.

@global string $tbpref Database table prefix

◆ print_feed_result()

print_feed_result (   $imported_feed,
  $nif,
  $nfname,
  $nfid,
  $nfoptions 
)

Update the feeds database and echo a result message.

Parameters
int$imported_feedNumber of imported feeds
int$nifNumber of duplicated feeds
string$nfnameNews feed name
int$nfidNews feed ID
string$nfoptionsNews feed options
Returns
void

@global string $tbpref Database table prefix