1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00

Add Stripe Support

This commit is contained in:
daniel 2019-06-01 10:27:29 -03:00
parent fa6f3fcd80
commit e137feeecf
2 changed files with 35 additions and 0 deletions

View file

@ -77,6 +77,21 @@ class Plugin extends ObjectYPT {
$sql="update ".static::getTableName()." set pluginversion='$currentVersion' where uuid='$uuid'";
$res=sqlDal::writeSql($sql);
}
static function getCurrentVersionByUuid($uuid){
$p=static::getPluginByUUID($uuid);
if(!$p)
return false;
//pluginversion isn't an object property so we must explicity update it using this function
$sql="SELECT pluginversion FROM ".static::getTableName()." WHERE uuid=? LIMIT 1 ";
$res = sqlDAL::readSql($sql, "s", array($uuid));
$data = sqlDAL::fetchAssoc($res);
sqlDAL::close($res);
if (!empty($data)) {
return $data['pluginversion'];
}
return false;
}
static function getPluginByName($name) {