[xoops-cvslog 5754] CVS update: xoops2jp/html/modules/legacy/class

Back to archive index

Minahito minah****@users*****
2006年 11月 10日 (金) 15:53:31 JST


Index: xoops2jp/html/modules/legacy/class/Legacy_Utils.class.php
diff -u xoops2jp/html/modules/legacy/class/Legacy_Utils.class.php:1.1.2.5 xoops2jp/html/modules/legacy/class/Legacy_Utils.class.php:1.1.2.6
--- xoops2jp/html/modules/legacy/class/Legacy_Utils.class.php:1.1.2.5	Thu Nov  2 16:39:21 2006
+++ xoops2jp/html/modules/legacy/class/Legacy_Utils.class.php	Fri Nov 10 15:53:30 2006
@@ -149,6 +149,27 @@
 			}
 		}
 	}
+	
+	/**
+	 * Converts the version of the module from $modversion value to interger
+	 * number.
+	 * @param string $version
+	 * @return int
+	 */
+	function convertVersionFromModinfoToInt($version)
+	{
+		return round(100 * floatval($version));
+	}
+
+	/**
+	 * Converts the version of the module from DB value to float.
+	 * @param int $version
+	 * @return float
+	 */
+	function convertVersionIntToFloat($version)
+	{
+		return round(floatval(intval($version) / 100), 2);
+	}
 }
 
 ?>
\ No newline at end of file


xoops-cvslog メーリングリストの案内
Back to archive index