Пример #1
0
 protected static function buildVersion()
 {
     if ('@kunenaversion@' == '@' . 'kunenaversion' . '@') {
         $file = JPATH_MANIFESTS . '/packages/pkg_kunena.xml';
         $manifest = simplexml_load_file($file);
         self::$version = (string) $manifest->version . '-GIT';
     } else {
         self::$version = strtoupper('@kunenaversion@');
     }
     self::$version_major = substr(self::$version, 0, 3);
     self::$version_date = '@kunenaversiondate@' == '@' . 'kunenaversiondate' . '@' ? JFactory::getDate()->format('Y-m-d') : '@kunenaversiondate@';
     self::$version_name = '@kunenaversionname@' == '@' . 'kunenaversionname' . '@' ? 'Git Repository' : '@kunenaversionname@';
 }
Пример #2
0
	protected static function buildVersion() {
		if ('@kunenaversion@' == '@' . 'kunenaversion' . '@') {
			$xml = KPATH_ADMIN . '/kunena.xml';
			$parser = JFactory::getXMLParser ( 'Simple' );
			$parser->loadFile ( $xml );
			self::$version = $parser->document->getElementByPath ( 'version' )->data () . '-SVN';
		} else {
			self::$version = strtoupper ( '@kunenaversion@' );
		}
		self::$version_date = ('@kunenaversiondate@' == '@' . 'kunenaversiondate' . '@') ? JFactory::getDate()->toMySQL() : '@kunenaversiondate@';
		self::$version_name = ('@kunenaversionname@' == '@' . 'kunenaversionname' . '@') ? 'SVN Revision' : '@kunenaversionname@';
	}
Пример #3
0
	protected static function buildVersion() {
		if ('@kunenaversion@' == '@' . 'kunenaversion' . '@') {
			$changelog = file_get_contents ( KPATH_SITE . '/CHANGELOG.php', NULL, NULL, 0, 1000 );
			preg_match ( '|\$Id\: CHANGELOG.php (\d+) (\S+) (\S+) (\S+) \$|', $changelog, $svn );
			preg_match ( '|~~\s+Kunena\s(\d+\.\d+.\d+\S*)|', $changelog, $version );
		}
		self::$version = ('@kunenaversion@' == '@' . 'kunenaversion' . '@') ? strtoupper ( $version [1] . '-SVN' ) : strtoupper ( '@kunenaversion@' );
		self::$version_date = ('@kunenaversiondate@' == '@' . 'kunenaversiondate' . '@') ? $svn [2] : '@kunenaversiondate@';
		self::$version_name = ('@kunenaversionname@' == '@' . 'kunenaversionname' . '@') ? 'SVN Revision' : '@kunenaversionname@';
		self::$version_build = ('@kunenaversionbuild@' == '@' . 'kunenaversionbuild' . '@') ? $svn [1] : '@kunenaversionbuild@';
	}
Пример #4
0
 protected static function buildVersion()
 {
     if ('2.0.1' == '@' . 'kunenaversion' . '@') {
         $xml = KPATH_ADMIN . '/kunena.xml';
         $parser = JFactory::getXMLParser('Simple');
         $parser->loadFile($xml);
         self::$version = $parser->document->getElementByPath('version')->data() . '-GIT';
     } else {
         self::$version = strtoupper('2.0.1');
     }
     self::$version_major = substr(self::$version, 0, 3);
     self::$version_date = '2012-07-07' == '@' . 'kunenaversiondate' . '@' ? JFactory::getDate()->toMySQL() : '2012-07-07';
     self::$version_name = 'Balozi' == '@' . 'kunenaversionname' . '@' ? 'Git Repository' : 'Balozi';
 }