leilukin-tumbleblog/modules/pingable/upgrades.php

35 lines
794 B
PHP
Raw Normal View History

2024-06-20 14:10:42 +00:00
<?php
if (!defined('UPGRADING') or !UPGRADING)
exit;
/**
* Function: add_edit_pingback
* Adds the edit_pingback permission.
*
* Versions: 2016.04 => 2017.01
*/
2025-01-13 09:56:01 +00:00
function add_edit_pingback(
): void {
2024-06-20 14:10:42 +00:00
$sql = SQL::current();
if (
!$sql->count(
tables:"permissions",
conds:array(
"id" => "edit_pingback",
"group_id" => 0
)
)
)
$sql->insert(
table:"permissions",
data:array(
"id" => "edit_pingback",
"name" => "Edit Pingbacks",
"group_id" => 0
)
);
}
add_edit_pingback();