Minahito
minah****@users*****
2006年 8月 3日 (木) 18:43:16 JST
Index: xoops2jp/html/modules/base/kernel/NotificationFunctions.class.php diff -u xoops2jp/html/modules/base/kernel/NotificationFunctions.class.php:1.1.2.1 xoops2jp/html/modules/base/kernel/NotificationFunctions.class.php:removed --- xoops2jp/html/modules/base/kernel/NotificationFunctions.class.php:1.1.2.1 Wed Jul 26 19:55:07 2006 +++ xoops2jp/html/modules/base/kernel/NotificationFunctions.class.php Thu Aug 3 18:43:16 2006 @@ -1,107 +0,0 @@ -<?php -/** - * @package Legacy - * @version $Id: NotificationFunctions.class.php,v 1.1.2.1 2006/07/26 10:55:07 minahito Exp $ - */ - -class Legacy_NotificationFunctions -{ - function notifications() - { - require_once XOOPS_BASE_PATH . "/class/ActionFrame.class.php"; - - $root =& XCube_Root::getSingleton(); - - // - // 'Notify' is prefix to guard accessing from misc.php. - // - $actionName = isset($_REQUEST['op']) ? trim(xoops_getrequest('op')) : "List"; - if (isset($_REQUEST['delete'])) { - $actionName = "Delete"; - } - if (isset($_REQUEST['delete_cancel'])) { - $actionName = "Cancel"; - } - - $moduleRunner = new Legacy_ActionFrame(false); - $moduleRunner->setMode(LEGACY_FRAME_MODE_NOTIFY); - $moduleRunner->setActionName($actionName); - - $root->mController->setActionStrategy($moduleRunner); - - $root->mController->executeAction(); - - $root->mController->executeView(); - } - - /** - * This functions is add to 'Legacyfunction.Notificatins.Select'. - * - * @param XCube_RenderBuffer $render - */ - function notifications_select(&$render) - { - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; - require_once XOOPS_ROOT_PATH . '/include/notification_functions.php'; - - $root =& XCube_Root::getSingleton(); - $xoopsModule =& $root->mController->mModuleController->mModuleObject; - $moduleConfig =& $root->mController->mModuleController->mConfig; - $xoopsUser =& $root->mController->getXoopsUser(); - - $xoops_notification = array(); - $xoops_notification['show'] = is_object($xoopsModule) && is_object($xoopsUser) && notificationEnabled('inline') ? 1 : 0; - - if ($xoops_notification['show']) { - $root->mLanguageManager->loadPageTypeMessageCatalog('notification'); - $categories =& notificationSubscribableCategoryInfo(); - $event_count = 0; - if (!empty($categories)) { - $notification_handler =& xoops_gethandler('notification'); - foreach ($categories as $category) { - $section['name'] = $category['name']; - $section['title'] = $category['title']; - $section['description'] = $category['description']; - $section['itemid'] = $category['item_id']; - $section['events'] = array(); - $subscribed_events =& $notification_handler->getSubscribedEvents($category['name'], $category['item_id'], $xoopsModule->get('mid'), $xoopsUser->get('uid')); - foreach (notificationEvents($category['name'], true) as $event) { - if (!empty($event['admin_only']) && !$xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { - continue; - } - if (!empty($event['invisible'])) { - continue; - } - $subscribed = in_array($event['name'], $subscribed_events) ? 1 : 0; - $section['events'][$event['name']] = array ('name'=>$event['name'], 'title'=>$event['title'], 'caption'=>$event['caption'], 'description'=>$event['description'], 'subscribed'=>$subscribed); - $event_count ++; - } - $xoops_notification['categories'][$category['name']] = $section; - } - $xoops_notification['target_page'] = "notification_update.php"; - $xoops_notification['redirect_script'] = xoops_getenv('PHP_SELF'); - $render->setAttribute('editprofile_url', XOOPS_URL . '/edituser.php?uid=' . $xoopsUser->getShow('uid')); - switch ($xoopsUser->getVar('notify_method')) { - case XOOPS_NOTIFICATION_METHOD_DISABLE: - $render->setAttribute('user_method', _NOT_DISABLE); - break; - case XOOPS_NOTIFICATION_METHOD_PM: - $render->setAttribute('user_method', _NOT_PM); - break; - case XOOPS_NOTIFICATION_METHOD_EMAIL: - $render->setAttribute('user_method', _NOT_EMAIL); - break; - } - } else { - $xoops_notification['show'] = 0; - } - if ($event_count == 0) { - $xoops_notification['show'] = 0; - } - } - - $render->setAttribute('xoops_notification', $xoops_notification); - } -} - -?> \ No newline at end of file Index: xoops2jp/html/modules/base/kernel/MiscEventFunctions.class.php diff -u xoops2jp/html/modules/base/kernel/MiscEventFunctions.class.php:1.1.2.5 xoops2jp/html/modules/base/kernel/MiscEventFunctions.class.php:removed --- xoops2jp/html/modules/base/kernel/MiscEventFunctions.class.php:1.1.2.5 Thu May 25 18:32:27 2006 +++ xoops2jp/html/modules/base/kernel/MiscEventFunctions.class.php Thu Aug 3 18:43:16 2006 @@ -1,29 +0,0 @@ -<?php -/** - * @version $Id: MiscEventFunctions.class.php,v 1.1.2.5 2006/05/25 09:32:27 minahito Exp $ - */ - -if (!defined('XOOPS_ROOT_PATH')) exit(); - -class Legacy_MiscEventFunction -{ - function AccessToMisc(&$controller,$eventArgs) - { - require_once XOOPS_BASE_PATH . "/class/ActionFrame.class.php"; - - $actionName = isset($_GET['type']) ? trim($_GET['type']) : "Smilies"; - - $moduleRunner = new Legacy_ActionFrame(false); - $moduleRunner->setActionName($actionName); - - $controller->setActionStrategy($moduleRunner); - - $controller->setDialogMode(true); - - $controller->executeAction(); - - $controller->executeView(); - } -} - -?> \ No newline at end of file