XPressME Integration Kit

Trac

source: branches/Ver3.0/xpressme_integration_kit/include/memory_limit.php @ 752

Last change on this file since 752 was 752, checked in by toemon, 13 years ago

Xoops3 の moduleデータベースのmid が id に変更されたため直接DBアクセスでdirnameからmidを取得できないので
$xoopsModule->getVar('mid')で取得するように変更。

File size: 529 bytes
Line 
1<?php
2        // Set XPressME memory limit
3        function xpress_set_memory_limmit(){
4                global $xoops_config;
5                global $xoopsDB,$xoopsModule,$xoopsModuleConfig;
6               
7                $memory = ! empty($xoopsModuleConfig) ? $xoopsModuleConfig['memory_limit'] : 0;
8               
9                if (empty($memory)) return;
10                if ( !defined('WP_MEMORY_LIMIT') )
11                        define('WP_MEMORY_LIMIT', $memory . 'M');
12                if ( function_exists('memory_get_usage') && ( (int) @ini_get('memory_limit') < abs(intval(WP_MEMORY_LIMIT)) ) )
13                        @ini_set('memory_limit', WP_MEMORY_LIMIT);
14        }
15?>
Note: See TracBrowser for help on using the repository browser.