mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-16 20:35:15 +02:00
[multiple] Rename dbesc to DBA::escape
This commit is contained in:
parent
d9ec1ef80d
commit
522e8e58c2
14 changed files with 109 additions and 96 deletions
|
@ -5,21 +5,23 @@
|
|||
* Version: 1.0
|
||||
* Author: Fabio Comuni <http://kirgroup.com/profile/fabrix/>
|
||||
*/
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Database\DBA;
|
||||
|
||||
function widgets_install() {
|
||||
Addon::registerHook('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
|
||||
Addon::registerHook('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
|
||||
logger("installed widgets");
|
||||
}
|
||||
|
||||
function widgets_uninstall() {
|
||||
Addon::unregisterHook('addon_settings', 'addon/widgets/widgets.php', 'widgets_settings');
|
||||
Addon::unregisterHook('addon_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post');
|
||||
}
|
||||
|
||||
|
||||
function widgets_settings_post(){
|
||||
if(! local_user())
|
||||
return;
|
||||
|
@ -89,7 +91,7 @@ function widgets_content(&$a) {
|
|||
}
|
||||
|
||||
$r = q("SELECT * FROM pconfig WHERE uid IN (SELECT uid FROM pconfig WHERE v='%s')AND cat='widgets'",
|
||||
dbesc($_GET['k'])
|
||||
DBA::escape($_GET['k'])
|
||||
);
|
||||
if (!count($r)){
|
||||
if($a->argv[2]=="cb"){header('HTTP/1.0 400 Bad Request'); killme();}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue