[1.7.9] Plugins need updating: unknown method get_link()

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

[1.7.9] Plugins need updating: unknown method get_link()

Postby fox » 17 Apr 2013, 18:28

Due to database changes in 1.7.9, plugins will need to be updated. It is required to remove all $link variables and get_link() calls from tt-rss functions called by your plugin. If you don't work with the database, you probably will not need to change anything.

E.g.

1. $this->link = $host->get_link() needs to be removed. If you want to use OO database interface, you can get it via $host->get_dbh().

Code: Select all

function init() {
         $this->dbh = $host->get_dbh();
}

...

function other() {
         $this->dbh->query(".....");
}


2. db_escape_string($this->link, ...) becomes db_escape_string(...). Same with other db_ functions, first parameter is removed.

3. After fixing the above, you will need to implement api_version() method, returning 2 (at the moment) which is the current pluginhost API version.

Code: Select all

   function api_version() {
      return 2;
   }

User avatar
idoxlr8
Bear Rating Trainee
Bear Rating Trainee
Posts: 46
Joined: 25 Mar 2013, 20:04
Location: Texas, USA
Contact:

Re: [1.7.9] Plugins need updating: unknown method get_link()

Postby idoxlr8 » 16 May 2013, 20:37

Thanks, been away... corrections made


Return to “Support”

Who is online

Users browsing this forum: No registered users and 6 guests