[xoops-cvslog 6118] CVS update: xoops2jp/html/modules/legacy/kernel

Back to archive index

NobuNobu nobun****@users*****
2007年 1月 18日 (木) 19:20:42 JST


Index: xoops2jp/html/modules/legacy/kernel/Legacy_TextFilter.class.php
diff -u xoops2jp/html/modules/legacy/kernel/Legacy_TextFilter.class.php:1.1.2.3 xoops2jp/html/modules/legacy/kernel/Legacy_TextFilter.class.php:1.1.2.4
--- xoops2jp/html/modules/legacy/kernel/Legacy_TextFilter.class.php:1.1.2.3	Sat Dec  9 23:11:48 2006
+++ xoops2jp/html/modules/legacy/kernel/Legacy_TextFilter.class.php	Thu Jan 18 19:20:42 2007
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package Legacy
- * @version $Id: Legacy_TextFilter.class.php,v 1.1.2.3 2006/12/09 14:11:48 nobunobu Exp $
+ * @version $Id: Legacy_TextFilter.class.php,v 1.1.2.4 2007/01/18 10:20:42 nobunobu Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -100,7 +100,7 @@
      * @return  string
      *
      **/
-    function ToShow($text, $x2comat=false) {
+    function toShow($text, $x2comat=false) {
         if ($x2comat) {
             //ToDo: &nbsp; patern is defined for XOOPS2.0 compatiblity. But what is it?
             //      This comatiblity option is used from method from MyTextSanitizer.
@@ -119,7 +119,7 @@
      * @return  string
      *
      **/
-    function ToEdit($text) {
+    function toEdit($text) {
         return preg_replace("/&amp;(#0?[0-9]{4,6};)/i", '&$1', htmlspecialchars($text, ENT_QUOTES));
     }
 
@@ -134,14 +134,14 @@
      * @param   bool    $br     convert linebreaks?
      * @return  string
      **/
-    function ToShowTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1, $x2comat=false) {
-        $text = $this->PreConvertXCode($text, $xcode);
-        if ($html != 1) $text = $this->ToShow($text, $x2comat);
-        $text = $this->MakeClickable($text);
-        if ($smiley != 0) $text = $this->Smiley($text);
-        if ($xcode != 0) $text = $this->ConvertXCode($text, $image);
-        if ($br != 0) $text = $this->Nl2Br($text);
-        $text = $this->PostConvertXCode($text, $xcode, $image);
+    function toShowTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1, $x2comat=false) {
+        $text = $this->preConvertXCode($text, $xcode);
+        if ($html != 1) $text = $this->toShow($text, $x2comat);
+        $text = $this->makeClickable($text);
+        if ($smiley != 0) $text = $this->smiley($text);
+        if ($xcode != 0) $text = $this->convertXCode($text, $image);
+        if ($br != 0) $text = $this->nl2Br($text);
+        $text = $this->postConvertXCode($text, $xcode, $image);
         return $text;
     }
 
@@ -172,7 +172,7 @@
      *
      * @return  string
      */
-    function &Smiley($text) {
+    function smiley($text) {
         if (count($this->mSmileys) == 0) $this->getSmileys();
         if (count($this->mSmileys) != 0) {
             $text = str_replace($this->mSmileysConvTable[0], $this->mSmileysConvTable[1], $text);
@@ -186,7 +186,7 @@
      * @param   string  $text
      * @return  string
      **/
-    function MakeClickable($text) {
+    function makeClickable($text) {
         if (empty($this->mClickablePatterns)) {
             // Delegate Call 'Legacy_TextFilter.MakeClickableConvertTable'
             //  Delegate may replace makeClickable conversion table
@@ -210,7 +210,7 @@
         return $text;
     }
 
-    function MakeClickableConvertTable(&$patterns, &$replacements) {
+    function makeClickableConvertTable(&$patterns, &$replacements) {
         $patterns[] = "/(^|[^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i";
         $replacements[] = "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>";
         $patterns[] = "/(^|[^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i";
@@ -229,7 +229,7 @@
      *                              On FALSE, uses links to images.
      * @return  string
      **/
-    function ConvertXCode($text, $allowimage = 1) {
+    function convertXCode($text, $allowimage = 1) {
         if (empty($this->mXCodePatterns)) {
             // Delegate Call 'Legacy_TextFilter.MakeXCodeConvertTable'
             //  Delegate may replace makeClickable conversion table
@@ -268,11 +268,11 @@
         return $text;
     }
     
-    function MakeXCodeCheckImgPatterns(&$patterns) {
+    function makeXCodeCheckImgPatterns(&$patterns) {
         $patterns[] = "/\[img( align=\w+)]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";
     }
 
-    function MakeXCodeConvertTable(&$patterns, &$replacements) {
+    function makeXCodeConvertTable(&$patterns, &$replacements) {
         $patterns[] = "/\[siteurl=(['\"]?)([^\"'<>]*)\\1](.*)\[\/siteurl\]/sU";
         $replacements[0][] = $replacements[1][] = '<a href="'.XOOPS_URL.'/\\2" target="_blank">\\3</a>';
         $patterns[] = "/\[url=(['\"]?)(http[s]?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU";
@@ -357,7 +357,7 @@
      *
      * @return  string
      */
-    function Nl2Br($text)
+    function nl2Br($text)
     {
         return preg_replace("/(\015\012)|(\015)|(\012)/","<br />",$text);
     }
@@ -371,7 +371,7 @@
      *
      * @return  string
      */
-    function PreConvertXCode($text, $xcode = 1) {
+    function preConvertXCode($text, $xcode = 1) {
         if($xcode != 0){
             if (empty($this->mPreXCodePatterns)) {
                 // RaiseEvent 'Legacy_TextFilter.MakePreXCodeConvertTable'
@@ -387,7 +387,7 @@
         return $text;
     }
     
-    function MakePreXCodeConvertTable(&$patterns, &$replacements) {
+    function makePreXCodeConvertTable(&$patterns, &$replacements) {
         $patterns[] = "/\[code](.*)\[\/code\]/esU";
         $replacements[] = "'[code]'.base64_encode('$1').'[/code]'";
     }
@@ -402,7 +402,7 @@
      *
      * @return  string
      */
-    function PostConvertXCode($text, $xcode=1, $image=1){
+    function postConvertXCode($text, $xcode=1, $image=1){
         if($xcode != 0){
             if (empty($this->mPostXCodePatterns)) {
                 // RaiseEvent 'Legacy_TextFilter.MakePostXCodeConvertTable'
@@ -425,14 +425,14 @@
         return $text;
     }
 
-    function MakePostXCodeConvertTable(&$patterns, &$replacements) {
+    function makePostXCodeConvertTable(&$patterns, &$replacements) {
         $patterns[] = "/\[code](.*)\[\/code\]/esU";
         $replacements[0][] = "'<div class=\"xoopsCode\"><pre><code>'.Legacy_TextFilter::codeSanitizer('$1').'</code></pre></div>'";
         $replacements[1][] = "'<div class=\"xoopsCode\"><pre><code>'.Legacy_TextFilter::codeSanitizer('$1', 1).'</code></pre></div>'"; 
     }
 
     function codeSanitizer($text, $image = 1){
-        return $this->ConvertXCode(htmlspecialchars(str_replace('\"', '"', base64_decode($text)),ENT_QUOTES), $image);
+        return $this->convertXCode(htmlspecialchars(str_replace('\"', '"', base64_decode($text)),ENT_QUOTES), $image);
     }
 }
 ?>
Index: xoops2jp/html/modules/legacy/kernel/object.php
diff -u xoops2jp/html/modules/legacy/kernel/object.php:1.1.2.2 xoops2jp/html/modules/legacy/kernel/object.php:1.1.2.3
--- xoops2jp/html/modules/legacy/kernel/object.php:1.1.2.2	Sun Dec  3 00:48:30 2006
+++ xoops2jp/html/modules/legacy/kernel/object.php	Thu Jan 18 19:20:42 2007
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package legacy
- * @version $Id: object.php,v 1.1.2.2 2006/12/02 15:48:30 nobunobu Exp $
+ * @version $Id: object.php,v 1.1.2.3 2007/01/18 10:20:42 nobunobu Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -160,7 +160,7 @@
 			case XOBJ_DTYPE_STRING:
                 $root =& XCube_Root::getSingleton();
                 $textFilter =& $root->getTextFilter();
-			    $value = $textFilter->ToShow($this->mVars[$key]['value']);
+			    $value = $textFilter->toShow($this->mVars[$key]['value']);
 				break;
 
 			case XOBJ_DTYPE_TEXT:


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