XPressME Integration Kit

Trac

Changeset 387


Ignore:
Timestamp:
Sep 26, 2009, 12:48:32 PM (15 years ago)
Author:
toemon
Message:

XOOPSのモジュールオプションとして、手動でlibxml2バグ回避をONさせるオプションを追加 fixed #215

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/extras/for_wordpressme2011/ja_EUC/language/japanese/modinfo.php

    r336 r387  
    1515        // A brief description of this module 
    1616        define("_MI_XP2_DESC","WordPressME¤òXOOPS¥â¥¸¥å¡¼¥ë²½¤·¤¿¤â¤Î¤Ç¤¹¡£"); 
     17 
     18        // Module Config 
     19        define("_MI_LIBXML_PATCH","¥Ö¥í¥Ã¥¯¤Çlibxml2 ¥Ð¥°¤ËÂФ¹¤ë¥Ñ¥Ã¥Á¤ò¶¯À©Å¬±þ¤¹¤ë"); 
     20        define("_MI_LIBXML_PATCH_DESC","libxml2 Ver 2.70-2.72¤Ë¤Ï'<'¤È'>'¤¬¼è¤ê½ü¤«¤ì¤ë¥Ð¥°¤¬¤¢¤ê¤Þ¤¹¡£ 
     21XPressME¤Ïlibxml2¤Î¥Ð¡¼¥¸¥ç¥ó¤ò¼«Æ°Åª¤Ë¼èÆÀ¤·¡¢É¬ÍפǤ¢¤ì¤Ð¥Ñ¥Ã¥Á¤¬Å¬±þ¤µ¤ì¤Þ¤¹¡£ 
     22XPressME¤¬libxml2¤Î¥Ð¡¼¥¸¥ç¥ó¤ò¼èÆÀ¤Ç¤­¤Ê¤¤¾ì¹ç¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤Ç¶¯À©Åª¤Ë¥Ñ¥Ã¥Á¤òŬ±þ¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£"); 
    1723 
    1824        // Sub menu titles 
  • trunk/extras/for_wordpressme2011/ja_UTF/language/ja_utf8/modinfo.php

    r336 r387  
    1515        // A brief description of this module 
    1616        define("_MI_XP2_DESC","WordPressMEをXOOPSモジュール化したものです。"); 
     17 
     18        // Module Config 
     19        define("_MI_LIBXML_PATCH","ブロックでlibxml2 バグに対するパッチを強制適応する"); 
     20        define("_MI_LIBXML_PATCH_DESC","libxml2 Ver 2.70-2.72には'<'と'>'が取り除かれるバグがあります。 
     21XPressMEはlibxml2のバージョンを自動的に取得し、必要であればパッチが適応されます。 
     22XPressMEがlibxml2のバージョンを取得できない場合、このオプションで強制的にパッチを適応させることができます。"); 
    1723 
    1824        // Sub menu titles 
  • trunk/extras/xpress_i18n/german/xpressme_modules_root/language/german/modinfo.php

    r377 r387  
    1515        // A brief description of this module 
    1616        define("_MI_XP2_DESC","WordPress For XOOPS Community"); 
     17 
     18        // Module Config 
     19        define("_MI_LIBXML_PATCH","Force a patch for the libxml2 bug in a block"); 
     20        define("_MI_LIBXML_PATCH_DESC","libxml2 Ver 2.70-2.72 have the bug that '<' and '>' are removed.  
     21XPressME acquires a version of libxml2 automatically, and it is adapted a patch if it is necessary.  
     22When XPressME cannot acquire a version of libxml2, you can let a patch fit it with this option forcibly."); 
    1723 
    1824        // Sub menu titles 
  • trunk/extras/xpress_i18n/portuguese-br/xpressme_modules_root/language/pt-br_utf8/modinfo.php

    r366 r387  
    2222        define("_MI_XP2_MENU_XPRESS","Configurações do XPressME"); 
    2323        define("_MI_XP2_MENU_TO_MODULE","Ir para o módulo"); 
     24 
     25        // Module Config 
     26        define("_MI_LIBXML_PATCH","Force um remendo para o bicho de libxml2 em um bloco"); 
     27        define("_MI_LIBXML_PATCH_DESC","libxml2 Ver 2.70-2.72 têm o bicho que' < ' e' > ' é afastado.  
     28XPressME adquire uma versão de libxml2 automaticamente, e é adaptado um remendo se for necessário.  
     29Quando XPressME não puder adquirir uma versão de libxml2, o senhor pode deixar um remendo isto ajustar violentamente com esta opção."); 
    2430 
    2531        // Block Name 
  • trunk/extras/xpress_i18n/template/xpressme_modules_root/language/english/modinfo.php

    r356 r387  
    2222        define("_MI_XP2_MENU_XPRESS","XPressME Setting"); 
    2323        define("_MI_XP2_MENU_TO_MODULE","to Modules"); 
     24 
     25        // Module Config 
     26        define("_MI_LIBXML_PATCH","Force a patch for the libxml2 bug in a block"); 
     27        define("_MI_LIBXML_PATCH_DESC","libxml2 Ver 2.70-2.72 have the bug that '<' and '>' are removed.  
     28XPressME acquires a version of libxml2 automatically, and it is adapted a patch if it is necessary.  
     29When XPressME cannot acquire a version of libxml2, you can let a patch fit it with this option forcibly."); 
    2430 
    2531        // Block Name 
  • trunk/xpressme_integration_kit/include/xml.php

    r353 r387  
    8888                //libxml2 ver.2.7.0 -2.7.2 stripping leading angle brackets bug patch 
    8989                if (  
    90                         LIBXML_DOTTED_VERSION == '2.7.0'  
     90                        $GLOBALS['DO_LIBXML_PATCH'] == '1'  
     91                        || LIBXML_DOTTED_VERSION == '2.7.0'  
    9192                        || LIBXML_DOTTED_VERSION == '2.7.1'  
    9293                        || LIBXML_DOTTED_VERSION == '2.7.2'  
  • trunk/xpressme_integration_kit/include/xpress_block_render.php

    r364 r387  
    2424                        $xml_name = $block_name . '.xml'; 
    2525                        $xml_data = xpress_cache_read($mydirname,$xml_name); 
    26  
     26                         
     27                        $GLOBALS['DO_LIBXML_PATCH'] = get_xpress_mod_config($mydirname,'libxml_patch'); 
     28                         
    2729                        $ret = @xpress_XML_unserialize($xml_data); 
    2830                        if (strstr($xml_data, '<?xml version="1.0" encoding="EUC-JP" ?>') !== false){ 
     
    266268        }  
    267269    }  
     270     
     271    function get_xpress_mod_config($mydirname,$conf_name=''){ 
     272                $module_handler =& xoops_gethandler('module'); 
     273                $xoopsModule =& $module_handler->getByDirname($mydirname); 
     274                $mid = $xoopsModule->getVar('mid'); 
     275                $xoopsDB =& Database::getInstance(); 
     276                $db_config = $xoopsDB->prefix('config'); 
     277             
     278                $wu_sql  =      "SELECT conf_value FROM  $db_config "; 
     279                $wu_sql .=      "WHERE (conf_modid = $mid ) AND (conf_name LIKE '$conf_name')"; 
     280                $wu_res = $xoopsDB->queryF($wu_sql, 0, 0); 
     281                         
     282                if ($wu_res === false){ 
     283                        return 0; 
     284                } else { 
     285                        $xu_row = $xoopsDB->fetchArray($wu_res); 
     286                        return $xu_row['conf_value']; 
     287                } 
     288        } 
     289 
    268290}        
    269291?> 
  • trunk/xpressme_integration_kit/language/english/modinfo.php

    r336 r387  
    2222        define("_MI_XP2_MENU_XPRESS","XPressME Setting"); 
    2323        define("_MI_XP2_MENU_TO_MODULE","to Modules"); 
     24 
     25        // Module Config 
     26        define("_MI_LIBXML_PATCH","Force a patch for the libxml2 bug in a block"); 
     27        define("_MI_LIBXML_PATCH_DESC","libxml2 Ver 2.70-2.72 have the bug that '<' and '>' are removed.  
     28XPressME acquires a version of libxml2 automatically, and it is adapted a patch if it is necessary.  
     29When XPressME cannot acquire a version of libxml2, you can let a patch fit it with this option forcibly."); 
    2430 
    2531        // Block Name 
  • trunk/xpressme_integration_kit/language/ja_utf8/modinfo.php

    r336 r387  
    2222        define("_MI_XP2_MENU_XPRESS","XPressME設定"); 
    2323        define("_MI_XP2_MENU_TO_MODULE","モジュールへ"); 
     24 
     25        // Module Config 
     26        define("_MI_LIBXML_PATCH","ブロックでlibxml2 バグに対するパッチを強制適応する"); 
     27        define("_MI_LIBXML_PATCH_DESC","libxml2 Ver 2.70-2.72には'<'と'>'が取り除かれるバグがあります。 
     28XPressMEはlibxml2のバージョンを自動的に取得し、必要であればパッチが適応されます。 
     29XPressMEがlibxml2のバージョンを取得できない場合、このオプションで強制的にパッチを適応させることができます。"); 
    2430 
    2531        // Block Name 
  • trunk/xpressme_integration_kit/xoops_version.php

    r385 r387  
    118118$modversion['templates'] = array() ; 
    119119 
    120 if (defined('ICMS_ROOT_PATH')){ 
    121         $modversion['hasconfig'] = 1; 
    122         $modversion['config'][] = array( 
    123                 'name'                  => 'dummy' , 
    124                 'title'                 =>  'Dummy Value' , 
    125                 'description'   =>  'This is Dummy Value' , 
    126                 'formtype'              => 'yesno' , 
    127                 'valuetype'             => 'int' , 
    128                 'default'               => 0 , 
    129         ); 
    130 } 
     120$modversion['hasconfig'] = 1; 
     121$modversion['config'][] = array( 
     122        'name'                  => 'libxml_patch' , 
     123        'title'                 =>  '_MI_LIBXML_PATCH' , 
     124        'description'   =>  '_MI_LIBXML_PATCH_DESC' , 
     125        'formtype'              => 'yesno' , 
     126        'valuetype'             => 'int' , 
     127        'default'               => 0 , 
     128); 
    131129 
    132130//BLOCKS 
Note: See TracChangeset for help on using the changeset viewer.