Jump to content

Functions to add to mysql_admin_queries.php

Featured Replies

Posted

Can you please add the following functions to the sources/sql/mysql_admin_queries.php file:

  • msg_get_cc_users
  • msg_get_msg_poster
Those two functions are used by the PM library functions when sending personal messages. Any mods or other addons inside the ACP that need to send PMs using the func_msg.php file will require those functions be present in the loaded cache file. Otherwise the mods have to do a less elegant workaround like inserting the PM stuff using a few custom DB queries.

Hmm, I suppose a better idea would be to add them to the extra queries file, and then load that when needed.

There are a couple duplicated queries, but it really isn't ideal to do that - better to put it in a shared location.

Are the extra queries always loaded? My concern is that by using the func_msg.php, it calls the cached queries using the cache_add_query function, but doesn't pass in the third argument that function uses, $method. So that argument will always be 'sql_queries', when it looks like functions in the extra queries file always pass in 'sql_extra_queries' as that third argument.

Yes, we'd have to make some adjustments, certainly. ;) But it would probably be better than duplicate queries (which, admittedly, I think added a couple of in 2.2 already).

  • 2 months later...

So I see this wasn't added then. Bummer, will have to include the edit to add these functions in my mods still.

Wizzy and I were discussing this (and things like it) and really what we need to do is start moving more away from the cache files, since the DB driver can handle so much of this stuff now.

That would be ideal, since the root of the problem that led to this topic was the fact that the func_msg class has calls to a couple cached queries that aren't present in the cache file loaded in the ACP, meaning you can't use that class to send PMs from the ACP without adding these functions to the mysql_admin_queries.php file.

Yeah - originally in the driver, I don't think it properly supported joins, or something of that nature. Now it's not a problem of course, but we still have queries in the cache file. Will work on this as time goes on.

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.