mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
make functions public static
This commit is contained in:
@@ -5,7 +5,7 @@ namespace Zotlabs\Lib;
|
|||||||
|
|
||||||
class Verify {
|
class Verify {
|
||||||
|
|
||||||
function create($type,$channel_id,$token,$meta) {
|
public static function create($type,$channel_id,$token,$meta) {
|
||||||
return q("insert into verify ( vtype, channel, token, meta, created ) values ( '%s', %d, '%s', '%s', '%s' )",
|
return q("insert into verify ( vtype, channel, token, meta, created ) values ( '%s', %d, '%s', '%s', '%s' )",
|
||||||
dbesc($type),
|
dbesc($type),
|
||||||
intval($channel_id),
|
intval($channel_id),
|
||||||
@@ -15,7 +15,7 @@ class Verify {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function match($type,$channel_id,$token,$meta) {
|
public static function match($type,$channel_id,$token,$meta) {
|
||||||
$r = q("select id from verify where vtype = '%s' and channel = %d and token = '%s' and meta = '%s' limit 1",
|
$r = q("select id from verify where vtype = '%s' and channel = %d and token = '%s' and meta = '%s' limit 1",
|
||||||
dbesc($type),
|
dbesc($type),
|
||||||
intval($channel_id),
|
intval($channel_id),
|
||||||
@@ -31,7 +31,7 @@ class Verify {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_meta($type,$channel_id,$token) {
|
public static function get_meta($type,$channel_id,$token) {
|
||||||
$r = q("select id, meta from verify where vtype = '%s' and channel = %d and token = '%s' limit 1",
|
$r = q("select id, meta from verify where vtype = '%s' and channel = %d and token = '%s' limit 1",
|
||||||
dbesc($type),
|
dbesc($type),
|
||||||
intval($channel_id),
|
intval($channel_id),
|
||||||
@@ -52,7 +52,7 @@ class Verify {
|
|||||||
* @param string $type Verify type
|
* @param string $type Verify type
|
||||||
* @param string $interval SQL compatible time interval
|
* @param string $interval SQL compatible time interval
|
||||||
*/
|
*/
|
||||||
function purge($type, $interval) {
|
public static function purge($type, $interval) {
|
||||||
q("delete from verify where vtype = '%s' and created < %s - INTERVAL %s",
|
q("delete from verify where vtype = '%s' and created < %s - INTERVAL %s",
|
||||||
dbesc($type),
|
dbesc($type),
|
||||||
db_utcnow(),
|
db_utcnow(),
|
||||||
|
|||||||
Reference in New Issue
Block a user