--- bareface/yakka/library/YakkaPage.php 2003/01/05 00:22:25 1.1 +++ bareface/yakka/library/YakkaPage.php 2003/01/06 13:31:56 1.2 @@ -129,6 +129,27 @@ $this->version = $version; } + function increaseReleaseVersion() { + if (preg_match("/^(\d)?\..*/", $this->version, $matches)) { + $buildNumber = (int)$matches[1] + 1; + $this->version = $buildNumber.".0.0"; + } + } + + function increaseMajorVersion() { + if (preg_match("/^(.*)\.(\d)?\./", $this->version, $matches)) { + $buildNumber = (int)$matches[2] + 1; + $this->version = $matches[1].".".$buildNumber.".0"; + } + } + + function increaseMinorVersion() { + if (preg_match("/(.*)\.(\d)?$/", $this->version, $matches)) { + $buildNumber = (int)$matches[2] + 1; + $this->version = $matches[1].".".$buildNumber; + } + } + function &getCreateUser() { return $this->createUser; } @@ -146,7 +167,7 @@ } function toXml() { - $xml = "isLatest)."' createdate='".date("Y-m-d H:i:s", $this->createTimestamp)."' modifydate='".date("Y-m-d H:i:s", $this->modifyTimestamp)."' version='$this->version'"; if ($this->createUser) $xml .= " create-user-id='".$this->createUser->getId()."'"; if ($this->modifyUser)