This commit is contained in:
Roly Rudy Gutierrez Pinto
2017-03-30 15:45:01 -04:00
parent bf56da719b
commit 8305cee7cc

View File

@@ -26,19 +26,27 @@ class p11835 extends patch
*/
static public function isApplicable()
{
if (! class_exists('System')) {
if (!class_exists('System')) {
G::LoadClass("System");
}
patch::$isPathchable = false;
$con = Propel::getConnection("workflow");
$stmt = $con->prepareStatement("describe TASK;");
$stmt = $con->prepareStatement("SHOW TABLES LIKE 'TASK'");
$rs = $stmt->executeQuery();
$rs->next();
while($row = $rs->getRow()) {
$row = $rs->getRow();
if (empty($row) === true) {
return patch::$isPathchable;
}
$stmt = $con->prepareStatement("DESCRIBE TASK");
$rs = $stmt->executeQuery();
$rs->next();
while ($row = $rs->getRow()) {
if ($row ['Field'] == "TAS_GROUP_VARIABLE") {
$version = System::getVersion ();
$version = explode('-',$version);
$version = System::getVersion();
$version = explode('-', $version);
if ($version[0] == '2.5.1') {
echo "Version " . $version[0] . " Patch\n";
patch::$isPathchable = true;
@@ -49,7 +57,7 @@ class p11835 extends patch
}
return patch::$isPathchable;
}
public static function pmVersion($version)
{
if (preg_match("/^\D*([\d\.]+)\D*$/", $version, $matches)) {