Пример #1
0
/**
 * Check if the module currently uses WYSIWYG and decied wether to do_br or not
 *
 * @return bool true | false
 * @todo Move to a static class method - text area?
 */
function icms_need_do_br($moduleName = false)
{
    global $icmsConfig, $icmsModule;
    if (!$moduleName) {
        global $icmsModule;
        $theModule = $icmsModule;
        $moduleName = $theModule->getVar('dirname');
    } else {
        $theModule = icms_getModuleInfo($moduleName);
    }
    $groups = icms::$user->getGroups();
    $editor_default = $icmsConfig['editor_default'];
    $gperm_handler = icms::handler('icms_member_groupperm');
    if (file_exists(ICMS_EDITOR_PATH . "/" . $editor_default . "/xoops_version.php") && $gperm_handler->checkRight('use_wysiwygeditor', $theModule->getVar('mid'), $groups)) {
        return false;
    } else {
        return true;
    }
}
Пример #2
0
 /**
  *
  */
 public function getModuleInfo()
 {
     return icms_getModuleInfo($this->_moduleName);
 }
Пример #3
0
    echo "<a href='admin.php?fct=modulesadmin'>" . _MD_AM_BTOMADMIN . "</a>";
    icms_cp_footer();
    exit;
}
if ($op == 'update') {
    $module_handler = icms::handler('icms_module');
    $mod =& $module_handler->getByDirname($module);
    if ($mod->getInfo('image') != FALSE && trim($mod->getInfo('image')) != '') {
        $msgs = '<img src="' . ICMS_MODULES_URL . '/' . $mod->getVar('dirname') . '/' . trim($mod->getInfo('image')) . '" alt="" />';
    }
    $msgs .= '<br /><span style="font-size:smaller;">' . $mod->getVar('name') . '</span><br /><br />' . _MD_AM_RUSUREUPD;
    icms_cp_header();
    if (icms_getModuleInfo('system')->getDBVersion() < 14 && (!is_writable(ICMS_PLUGINS_PATH) || !is_dir(ICMS_ROOT_PATH . '/plugins/preloads') || !is_writable(ICMS_ROOT_PATH . '/plugins/preloads'))) {
        icms_core_Message::error(sprintf(_MD_AM_PLUGINSFOLDER_UPDATE_TEXT, ICMS_PLUGINS_PATH, ICMS_ROOT_PATH . '/plugins/preloads'), _MD_AM_PLUGINSFOLDER_UPDATE_TITLE, TRUE);
    }
    if (icms_getModuleInfo('system')->getDBVersion() < 37 && !is_writable(ICMS_IMANAGER_FOLDER_PATH)) {
        icms_core_Message::error(sprintf(_MD_AM_IMAGESFOLDER_UPDATE_TEXT, str_ireplace(ICMS_ROOT_PATH, "", ICMS_IMANAGER_FOLDER_PATH)), _MD_AM_IMAGESFOLDER_UPDATE_TITLE, TRUE);
    }
    icms_core_Message::confirm(array('module' => $module, 'op' => 'update_ok', 'fct' => 'modulesadmin'), 'admin.php', $msgs, _MD_AM_UPDATE);
    icms_cp_footer();
    exit;
}
if ($op == 'update_ok') {
    $ret = array();
    $ret[] = icms_module_update($module);
    $contents = impresscms_get_adminmenu();
    if (!xoops_module_write_admin_menu($contents)) {
        $ret[] = "<p>" . _MD_AM_FAILWRITE . "</p>";
    }
    icms_cp_header();
    if (count($ret) > 0) {
Пример #4
0
 * @version		$Id: common.php 20051 2010-08-28 16:30:42Z phoenyx $
 */
defined("ICMS_ROOT_PATH") or die("ICMS root path not defined");
if (!defined("CONTENT_DIRNAME")) {
    define("CONTENT_DIRNAME", $modversion["dirname"] = basename(dirname(dirname(__FILE__))));
}
if (!defined("CONTENT_URL")) {
    define("CONTENT_URL", ICMS_URL . "/modules/" . CONTENT_DIRNAME . "/");
}
if (!defined("CONTENT_ROOT_PATH")) {
    define("CONTENT_ROOT_PATH", ICMS_ROOT_PATH . "/modules/" . CONTENT_DIRNAME . "/");
}
if (!defined("CONTENT_IMAGES_URL")) {
    define("CONTENT_IMAGES_URL", CONTENT_URL . "images/");
}
if (!defined("CONTENT_ADMIN_URL")) {
    define("CONTENT_ADMIN_URL", CONTENT_URL . "admin/");
}
// Include the common language file of the module
icms_loadLanguageFile("content", "common");
// Creating the module object to make it available throughout the module
$contentModule = icms_getModuleInfo(CONTENT_DIRNAME);
if (is_object($contentModule)) {
    $content_moduleName = $contentModule->getVar("name");
}
// Find if the user is admin of the module and make this info available throughout the module
$content_isAdmin = icms_userIsAdmin(CONTENT_DIRNAME);
// Creating the module config array to make it available throughout the module
$contentConfig = icms_getModuleConfig(CONTENT_DIRNAME);
// creating the icmsPersistableRegistry to make it available throughout the module
$icmsPersistableRegistry = icms_ipf_registry_Handler::getInstance();
Пример #5
0
 * @copyright	http://www.xoops.org/ The XOOPS Project
 * @copyright	XOOPS_copyrights.txt
 * @copyright	http://www.impresscms.org/ The ImpressCMS Project
 * @license		http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL)
 * @package		core
 * @since		XOOPS
 * @author		http://www.xoops.org The XOOPS Project
 * @author		modified by marcan <*****@*****.**>
 * @version		$Id: admin.php 20456 2010-12-02 17:57:52Z skenow $
 */
define('ICMS_IN_ADMIN', 1);
$xoopsOption['pagetype'] = 'admin';
include 'mainfile.php';
include ICMS_ROOT_PATH . '/include/cp_functions.php';
// test to see if the system module should be updated, added in 1.2
if (icms_getModuleInfo('system')->getDBVersion() < ICMS_SYSTEM_DBVERSION) {
    redirect_header('modules/system/admin.php?fct=modulesadmin&amp;op=update&amp;module=system', 1, _CO_ICMS_UPDATE_NEEDED);
}
$op = isset($_GET['rssnews']) ? (int) $_GET['rssnews'] : 0;
if (!empty($_GET['op'])) {
    $op = (int) $_GET['op'];
}
if (!empty($_POST['op'])) {
    $op = (int) $_POST['op'];
}
if (!file_exists(ICMS_CACHE_PATH . '/adminmenu_' . $icmsConfig['language'] . '.php')) {
    xoops_module_write_admin_menu(impresscms_get_adminmenu());
}
switch ($op) {
    case 1:
        icms_cp_header();
Пример #6
0
 /**
  * Returns the need to br
  *
  * @return bool true | false
  */
 function need_do_br()
 {
     global $icmsConfig;
     $content_module = icms_getModuleInfo('content');
     $groups = icms::$user->getGroups();
     if (file_exists(ICMS_EDITOR_PATH . "/" . $icmsConfig['editor_default'] . "/xoops_version.php") && icms::handler('icms_member_groupperm')->checkRight('use_wysiwygeditor', $content_module->getVar("mid"), $groups)) {
         return false;
     } else {
         return true;
     }
 }