Exemplo n.º 1
0
 function plugins()
 {
     if (!($list = e107::getPlugin()->updateRequired())) {
         return;
     }
     $frm = e107::getForm();
     $text = "";
     foreach ($list as $path => $val) {
         $text .= "<tr>\r\n\t\t\t\t\t<td>" . $val['@attributes']['name'] . "</td>\r\n\t\t\t\t\t<td>" . $frm->admin_button('update[' . $path . ']', LAN_UPDATE, 'warning', '', 'disabled=' . $this->disabled) . "</td>\r\n\t\t\t\t\t</tr>";
     }
     return $text;
 }
Exemplo n.º 2
0
 function pluginUpgrade()
 {
     $pref = e107::getPref();
     $admin_log = e107::getAdminLog();
     $plugin = e107::getPlugin();
     $sql = e107::getDb();
     $mes = e107::getMessage();
     $plug = $plugin->getinfo($this->id);
     $_path = e_PLUGIN . $plug['plugin_path'] . '/';
     if (file_exists($_path . 'plugin.xml')) {
         $plugin->install_plugin_xml($this->id, 'upgrade');
     } else {
         include e_PLUGIN . $plug['plugin_path'] . '/plugin.php';
         $func = $eplug_folder . '_upgrade';
         if (function_exists($func)) {
             $text .= call_user_func($func);
         }
         if (is_array($upgrade_alter_tables)) {
             $result = $plugin->manage_tables('upgrade', $upgrade_alter_tables);
             if (true !== $result) {
                 //$text .= EPL_ADLAN_9.'<br />';
                 $mes->addWarning(EPL_ADLAN_9)->addDebug($result);
             } else {
                 $text .= EPL_ADLAN_7 . "<br />";
             }
         }
         if (is_array($upgrade_add_prefs)) {
             $plugin->manage_prefs('add', $upgrade_add_prefs);
             $text .= EPL_ADLAN_8 . '<br />';
         }
         if (is_array($upgrade_remove_prefs)) {
             $plugin->manage_prefs('remove', $upgrade_remove_prefs);
         }
         if (is_array($upgrade_add_array_pref)) {
             foreach ($upgrade_add_array_pref as $key => $val) {
                 $plugin->manage_plugin_prefs('add', $key, $eplug_folder, $val);
             }
         }
         if (is_array($upgrade_remove_array_pref)) {
             foreach ($upgrade_remove_array_pref as $key => $val) {
                 $plugin->manage_plugin_prefs('remove', $key, $eplug_folder, $val);
             }
         }
         $plugin->manage_search('upgrade', $eplug_folder);
         $plugin->manage_notify('upgrade', $eplug_folder);
         $eplug_addons = $plugin->getAddons($eplug_folder);
         $info = $plugin->getinfo($this->id);
         $name = deftrue($info['plugin_name'], $info['plugin_name']) . " v" . $eplug_version . "({e_PLUGIN}" . $info['plugin_path'] . ")";
         e107::getLog()->add('PLUGMAN_02', $name, E_LOG_INFORMATIVE, '');
         $text .= isset($eplug_upgrade_done) ? '<br />' . $eplug_upgrade_done : "<br />" . LAN_UPGRADE_SUCCESSFUL;
         $sql->update('plugin', "plugin_version ='{$eplug_version}', plugin_addons='{$eplug_addons}' WHERE plugin_id='{$this->id}' ");
         $pref['plug_installed'][$plug['plugin_path']] = $eplug_version;
         // Update the version
         e107::getConfig('core')->setPref($pref);
         $plugin->rebuildUrlConfig();
         e107::getConfig('core')->save();
     }
     $mes->addSuccess($text);
     $plugin->save_addon_prefs('update');
 }
Exemplo n.º 3
0
 function __construct()
 {
     $this->core_perms = array("C" => array(ADLAN_74, E_16_CACHE, E_32_CACHE), "F" => array(ADLAN_58, E_16_EMOTE, E_32_EMOTE), "G" => array(ADLAN_60, E_16_FRONT, E_32_FRONT), "L" => array(ADLAN_132, E_16_LANGUAGE, E_32_LANGUAGE), "T" => array(ADLAN_66, E_16_META, E_32_META), "1" => array(LAN_PREFS, E_16_PREFS, E_32_PREFS), "X" => array(LAN_SEARCH, E_16_SEARCH, E_32_SEARCH), "I" => array(ADLAN_138, E_16_LINKS, E_32_LINKS), "8" => array(ADMSLAN_27, E_16_LINKS, E_32_LINKS), "K" => array(ADLAN_159, E_16_EURL, E_32_EURL), "3" => array(ADLAN_8, E_16_ADMIN, E_32_ADMIN), "4" => array(LAN_USER_MANAGEALL, E_16_USER, E_32_USER), "U0" => array(ADLAN_34, E_16_USER, E_32_USER), "U1" => array(LAN_USER_QUICKADD, E_16_USER, E_32_USER), "U2" => array(LAN_USER_OPTIONS, E_16_USER, E_32_USER), "U3" => array(LAN_USER_RANKS, E_16_USER, E_32_USER), "W" => array(ADLAN_136, E_16_MAIL, E_32_MAIL), "5" => array(ADLAN_42, E_16_CUST, E_32_CUST), "J" => array(ADLAN_42, E_16_CUST, E_32_CUST), "H" => array(ADLAN_0, E_16_NEWS, E_32_NEWS), "H0" => array(ADLAN_0 . " (" . LAN_CREATE . ")", E_16_NEWS, E_32_NEWS), "H1" => array(ADLAN_0 . " (" . LAN_EDIT . ")", E_16_NEWS, E_32_NEWS), "H2" => array(ADLAN_0 . " (" . LAN_DELETE . ")", E_16_NEWS, E_32_NEWS), "H3" => array(ADLAN_0 . " (" . LAN_CATEGORY . " - " . LAN_CREATE . ")", E_16_NEWS, E_32_NEWS), "H4" => array(ADLAN_0 . " (" . LAN_CATEGORY . " - " . LAN_EDIT . ")", E_16_NEWS, E_32_NEWS), "H5" => array(ADLAN_0 . " (" . LAN_CATEGORY . " - " . LAN_DELETE . ")", E_16_NEWS, E_32_NEWS), "N" => array(ADLAN_0 . " (" . LAN_SUBMITTED . ")", E_16_NEWS, E_32_NEWS), "V" => array(ADLAN_31, E_16_UPLOADS, E_32_UPLOADS), "M" => array(ADLAN_28, E_16_WELCOME, E_32_WELCOME), "Y" => array(ADLAN_147, E_16_INSPECT, E_32_INSPECT), "9" => array(ADLAN_40, E_16_MAINTAIN, E_32_MAINTAIN), "O" => array(ADLAN_149, E_16_NOTIFY, E_32_NOTIFY), "U" => array(ADLAN_157, E_16_CRON, E_32_CRON), "S" => array(ADLAN_155, E_16_ADMINLOG, E_32_ADMINLOG), "B" => array(LAN_COMMENTMAN, E_16_COMMENT, E_32_COMMENT), "6" => array(LAN_MEDIAMANAGER, E_16_FILE, E_32_FILE), "A" => array(LAN_MEDIAMANAGER . " (" . LAN_ALL . ")", E_16_IMAGES, E_32_IMAGES), "A1" => array(LAN_MEDIAMANAGER . " (" . LAN_UPLOAD . "/" . LAN_IMPORT . ")", E_16_IMAGES, E_32_IMAGES), "A2" => array(LAN_MEDIAMANAGER . " (" . LAN_CATEGORIES . ")", E_16_IMAGES, E_32_IMAGES), "2" => array(ADLAN_6, E_16_MENUS, E_32_MENUS));
     $sql = e107::getDb('sql2');
     $tp = e107::getParser();
     $plg = e107::getPlugin();
     $allPlugins = $plg->getall(1);
     // Needs all for 'reading' and 'installed' for writing.
     foreach ($allPlugins as $k => $row2) {
         if ($plg->parse_plugin($row2['plugin_path'])) {
             $plug_vars = $plg->plug_vars;
             $this->plugin_perms["P" . $row2['plugin_id']] = array($tp->toHTML($row2['plugin_name'], FALSE, 'RAWTEXT,defs'));
             $this->plugin_perms["P" . $row2['plugin_id']][1] = $plg->getIcon($row2['plugin_path'], 16);
             $this->plugin_perms["P" . $row2['plugin_id']][2] = $plg->getIcon($row2['plugin_path'], 32);
         }
     }
     //	echo $plg->getIcon('forum');
     //	$sql->db_Select("plugin", "*", "plugin_installflag='1'");
     //	while ($row2 = $sql->db_Fetch())
     //	{
     //		$this->plugin_perms[("P".$row2['plugin_id'])] = array($tp->toHTML($row2['plugin_name'], FALSE, 'RAWTEXT,defs'));
     //	$this->plugin_perms[("P".$row2['plugin_id'])][1] = $plg->getIcon('forum')
     //	}
     asort($this->plugin_perms);
     $this->plugin_perms = array("Z" => array('0' => ADLAN_98)) + $this->plugin_perms;
     if (e107::getConfig()->getPref('multilanguage')) {
         $lanlist = explode(",", e_LANLIST);
         sort($lanlist);
         foreach ($lanlist as $langs) {
             $this->language_perms[$langs] = array("0" => $langs);
         }
     }
     if (getperms('0')) {
         $this->main_perms = array('0' => array('0' => ADMSLAN_58));
     }
     // Note: Using array_merge or array_merge_recursive will corrupt the array.
     $this->full_perms = $this->core_perms + $this->plugin_perms + $this->language_perms + $this->main_perms;
 }
Exemplo n.º 4
0
 public function import_configuration()
 {
     $this->logLine('Starting configuration import');
     // PRE-CONFIG start - create and register blank config instances - do not load!
     $config_aliases = array('core', 'core_backup', 'emote', 'menu', 'search', 'notify');
     foreach ($config_aliases as $alias) {
         e107::getConfig($alias, false)->clearPrefCache();
     }
     // PRE-CONFIG end
     // Basic stuff to get the handlers/classes to work.
     //	$udirs = "admin/|plugins/|temp";
     //	$e_SELF = $_SERVER['PHP_SELF'];
     //	$e_HTTP = preg_replace("#".$udirs."#i", "", substr($e_SELF, 0, strrpos($e_SELF, "/"))."/");
     //define("MAGIC_QUOTES_GPC", (ini_get('magic_quotes_gpc') ? true : false));
     //	define('CHARSET', 'utf-8');
     //	define("e_LANGUAGE", $this->previous_steps['language']);
     //	define('e_SELF', 'http://'.$_SERVER['HTTP_HOST']) . ($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_FILENAME']);
     $themeImportFile = array();
     $themeImportFile[0] = $this->e107->e107_dirs['THEMES_DIRECTORY'] . $this->previous_steps['prefs']['sitetheme'] . "/install.xml";
     $themeImportFile[1] = $this->e107->e107_dirs['THEMES_DIRECTORY'] . $this->previous_steps['prefs']['sitetheme'] . "/install/install.xml";
     $themeImportFile[3] = $this->e107->e107_dirs['CORE_DIRECTORY'] . "xml/default_install.xml";
     if (vartrue($this->previous_steps['generate_content'])) {
         foreach ($themeImportFile as $file) {
             if (is_readable($file)) {
                 $XMLImportfile = $file;
                 break;
             }
         }
     } else {
         $XMLImportfile = $this->e107->e107_dirs['CORE_DIRECTORY'] . "xml/default_install.xml";
     }
     $tp = e107::getParser();
     define('PREVIEWTHEMENAME', "");
     // Notice Removal.
     include_lan($this->e107->e107_dirs['LANGUAGES_DIRECTORY'] . $this->previous_steps['language'] . "/lan_prefs.php");
     include_lan($this->e107->e107_dirs['LANGUAGES_DIRECTORY'] . $this->previous_steps['language'] . "/admin/lan_theme.php");
     //should be 'add' not 'replace' - but 'add' doesn't insert arrays correctly.
     // [SecretR] should work now - fixed log errors (argument noLogs = true) change to false to enable log
     e107::getXml()->e107Import($XMLImportfile, 'add', true, false);
     // Add missing core pref values
     $this->logLine('Core prefs written');
     //Create default plugin-table entries.
     //		e107::getConfig('core')->clearPrefCache();
     e107::getPlugin()->update_plugins_table();
     $this->logLine('Plugins table updated');
     // Install Theme-required plugins
     if (vartrue($this->previous_steps['install_plugins'])) {
         if ($themeInfo = $this->get_theme_xml($this->previous_steps['prefs']['sitetheme'])) {
             if (isset($themeInfo['plugins']['plugin'])) {
                 foreach ($themeInfo['plugins']['plugin'] as $k => $plug) {
                     $this->install_plugin($plug['@attributes']['name']);
                     $this->logLine('Theme-related plugin installed: ' . $plug['@attributes']['name']);
                 }
             }
         }
     }
     // Media import
     /*
     e107::getMedia()->import('news',e_IMAGE.'newspost_images/') //TODO remove when news are pluginized
     	->import('page',e_IMAGE.'custom/') //TODO remove when pages are pluginized
     	// ->importIcons(e_PLUGIN) - icons for plugins are imported on install
     	->importIcons(e_IMAGE."icons/")
     	->importIcons(e_THEME.$this->previous_steps['prefs']['sitetheme']."/images/")
     	->importIcons(e_THEME.$this->previous_steps['prefs']['sitetheme']."/icons/");
     $this->logLine('Media imported to media manager');
     */
     e107::getSingleton('e107plugin')->save_addon_prefs();
     // save plugin addon pref-lists. eg. e_latest_list.
     $this->logLine('Addon prefs saved');
     $tm = e107::getSingleton('themeHandler');
     $tm->noLog = true;
     // false to enable log
     $tm->setTheme($this->previous_steps['prefs']['sitetheme']);
     // Admin log fix - don't allow logs to be called inside pref handler
     e107::getConfig('core')->setParam('nologs', false);
     // change to true to enable log
     $pref = e107::getConfig('core')->getPref();
     // Set Preferences defined during install - overwriting those that may exist in the XML.
     $this->previous_steps['prefs']['sitelanguage'] = $this->previous_steps['language'];
     $this->previous_steps['prefs']['sitelang_init'] = $this->previous_steps['language'];
     $this->previous_steps['prefs']['siteadmin'] = $this->previous_steps['admin']['display'];
     $this->previous_steps['prefs']['siteadminemail'] = $this->previous_steps['admin']['email'];
     $this->previous_steps['prefs']['install_date'] = time();
     $this->previous_steps['prefs']['siteurl'] = e_HTTP;
     $this->previous_steps['prefs']['sitetag'] = LAN_PREF_2;
     $this->previous_steps['prefs']['sitedisclaimer'] = LAN_PREF_3;
     $this->previous_steps['prefs']['replyto_name'] = $this->previous_steps['admin']['display'];
     $this->previous_steps['prefs']['replyto_email'] = $this->previous_steps['admin']['email'];
     // Cookie name fix, ended up with 406 error when non-latin words used
     $cookiename = preg_replace('/[^a-z0-9]/i', '', trim($this->previous_steps['prefs']['sitename']));
     $this->previous_steps['prefs']['cookie_name'] = ($cookiename ? substr($cookiename, 0, 4) . '_' : 'e_') . 'cookie';
     ### URL related prefs
     // set all prefs so that they are available, required for adminReadModules() - it checks which plugins are installed
     e107::getConfig('core')->setPref($this->previous_steps['prefs']);
     $url_modules = eRouter::adminReadModules();
     $url_locations = eRouter::adminBuildLocations($url_modules);
     $url_config = eRouter::adminBuildConfig(array(), $url_modules);
     $this->previous_steps['prefs']['url_aliases'] = array();
     $this->previous_steps['prefs']['url_config'] = $url_config;
     $this->previous_steps['prefs']['url_modules'] = $url_modules;
     $this->previous_steps['prefs']['url_locations'] = $url_locations;
     eRouter::clearCache();
     $this->logLine('Core URL config set to default state');
     // Set prefs, save
     e107::getConfig('core')->setPref($this->previous_steps['prefs']);
     e107::getConfig('core')->save(FALSE, TRUE);
     // save preferences made during install.
     $this->logLine('Core prefs set to install choices');
     // Create the admin user - replacing any that may be been included in the XML.
     $ip = $_SERVER['REMOTE_ADDR'];
     $userp = "1, '{$this->previous_steps['admin']['display']}', '{$this->previous_steps['admin']['user']}', '', '" . md5($this->previous_steps['admin']['password']) . "', '', '{$this->previous_steps['admin']['email']}', '', '', 0, " . time() . ", 0, 0, 0, 0, 0, '{$ip}', 0, '', 0, 1, '', '', '0', '', " . time() . ", ''";
     $qry = "REPLACE INTO {$this->previous_steps['mysql']['prefix']}user VALUES ({$userp})";
     $this->dbqry("REPLACE INTO {$this->previous_steps['mysql']['prefix']}user VALUES ({$userp})");
     $this->logLine('Admin user created');
     mysql_close($this->dbLink);
     return false;
 }
Exemplo n.º 5
0
 function __construct()
 {
     require_once e_ADMIN . "ad_links.php";
     $this->core_perms = array("C" => array(ADMSLAN_64, E_16_CACHE, E_32_CACHE), "F" => array(ADMSLAN_31, E_16_EMOTE, E_32_EMOTE), "G" => array(ADMSLAN_32, E_16_FRONT, E_32_FRONT), "L" => array(ADMSLAN_76, E_16_LANGUAGE, E_32_LANGUAGE), "T" => array(ADMSLAN_34, E_16_META, E_32_META), "1" => array(ADMSLAN_19, E_16_PREFS, E_32_PREFS), "X" => array(ADMSLAN_66, E_16_SEARCH, E_32_SEARCH), "I" => array(ADMSLAN_40, E_16_LINKS, E_32_LINKS), "8" => array(ADMSLAN_27, E_16_LINKS, E_32_LINKS), "K" => array(ADMSLAN_43, E_16_EURL, E_32_EURL), "3" => array(ADMSLAN_21, E_16_ADMIN, E_32_ADMIN), "4" => array(LAN_USER_MANAGEALL, E_16_USER, E_32_USER), "U0" => array(ADMSLAN_22, E_16_USER, E_32_USER), "U1" => array(LAN_USER_QUICKADD, E_16_USER, E_32_USER), "U2" => array(LAN_USER_OPTIONS, E_16_USER, E_32_USER), "U3" => array(LAN_USER_RANKS, E_16_USER, E_32_USER), "W" => array(ADMSLAN_65, E_16_MAIL, E_32_MAIL), "5" => array(ADMSLAN_23, E_16_CUST, E_32_CUST), "J" => array(ADMSLAN_41, E_16_CUST, E_32_CUST), "H" => array(ADMSLAN_39, E_16_NEWS, E_32_NEWS), "N" => array(ADMSLAN_47, E_16_NEWS, E_32_NEWS), "V" => array(ADMSLAN_35, E_16_UPLOADS, E_32_UPLOADS), "M" => array(ADMSLAN_46, E_16_WELCOME, E_32_WELCOME), "Y" => array(ADMSLAN_67, E_16_INSPECT, E_32_INSPECT), "9" => array(ADMSLAN_28, E_16_MAINTAIN, E_32_MAINTAIN), "O" => array(ADMSLAN_68, E_16_NOTIFY, E_32_NOTIFY), "U" => array(ADMSLAN_45, E_16_CRON, E_32_CRON), "S" => array(ADMSLAN_33, E_16_ADMINLOG, E_32_ADMINLOG), "B" => array(ADMSLAN_37, E_16_COMMENT, E_32_COMMENT), "6" => array(ADMSLAN_25, E_16_FILE, E_32_FILE), "A" => array(ADMSLAN_36, E_16_IMAGES, E_32_IMAGES), "A1" => array(ADMSLAN_36, E_16_IMAGES, E_32_IMAGES), "A2" => array(ADMSLAN_36, E_16_IMAGES, E_32_IMAGES), "2" => array(ADMSLAN_20, E_16_MENUS, E_32_MENUS));
     $sql = e107::getDb('sql2');
     $tp = e107::getParser();
     $plg = e107::getPlugin();
     $installed = $plg->getall(1);
     //	print_a($installed);
     foreach ($installed as $k => $row2) {
         if ($plg->parse_plugin($row2['plugin_path'])) {
             $plug_vars = $plg->plug_vars;
             $this->plugin_perms["P" . $row2['plugin_id']] = array($tp->toHTML($row2['plugin_name'], FALSE, 'RAWTEXT,defs'));
             $this->plugin_perms["P" . $row2['plugin_id']][1] = $plg->getIcon($row2['plugin_path'], 16);
             $this->plugin_perms["P" . $row2['plugin_id']][2] = $plg->getIcon($row2['plugin_path'], 32);
         }
     }
     //	echo $plg->getIcon('forum');
     //	$sql->db_Select("plugin", "*", "plugin_installflag='1'");
     //	while ($row2 = $sql->db_Fetch())
     //	{
     //		$this->plugin_perms[("P".$row2['plugin_id'])] = array($tp->toHTML($row2['plugin_name'], FALSE, 'RAWTEXT,defs'));
     //	$this->plugin_perms[("P".$row2['plugin_id'])][1] = $plg->getIcon('forum')
     //	}
     asort($this->plugin_perms);
     $this->plugin_perms = array("Z" => array('0' => ADMSLAN_62)) + $this->plugin_perms;
     if (e107::getConfig()->getPref('multilanguage')) {
         $lanlist = explode(",", e_LANLIST);
         sort($lanlist);
         foreach ($lanlist as $langs) {
             $this->language_perms[$langs] = array("0" => $langs);
         }
     }
     if (getperms('0')) {
         $this->main_perms = array('0' => array('0' => ADMSLAN_58));
     }
     // Note: Using array_merge or array_merge_recursive will corrupt the array.
     $this->full_perms = $this->core_perms + $this->plugin_perms + $this->language_perms + $this->main_perms;
 }
Exemplo n.º 6
0
 function __construct()
 {
     $this->core_plugins = e107::getPlugin()->getCorePlugins();
 }
Exemplo n.º 7
0
 /**
  * Install a Theme required plugin.
  *
  * @param string $plugpath - plugin folder name
  * @return void
  */
 public function install_plugin($plugpath)
 {
     e107::getDb()->gen("SELECT * FROM #plugin WHERE plugin_path = '" . $plugpath . "' LIMIT 1");
     $row = e107::getDb()->fetch(MYSQL_ASSOC);
     e107::getPlugin()->install_plugin($row['plugin_id']);
     e107::getMessage()->reset(false, false, true);
     return;
 }
Exemplo n.º 8
0
    }
}
if (e_AJAX_REQUEST) {
    session_write_close();
    while (@ob_end_clean()) {
    }
    if (varset($_GET['mode']) == 'backup') {
        echo "Starting file backup...<br />";
        $data = array();
        $data[] = e_MEDIA;
        $data[] = e_LOG;
        $data[] = e_IMPORT;
        $data[] = e_TEMP;
        $data[] = e_SYSTEM . "filetypes.xml";
        $data[] = e_THEME . e107::getPref('sitetheme');
        $plugins = e107::getPlugin()->getOtherPlugins();
        foreach ($plugins as $dir) {
            $data[] = e_PLUGIN . $dir;
        }
        $newFile = eHelper::title2sef(SITENAME) . "_" . date("Y-m-d-H-i-s");
        $zip = e107::getFile()->zip($data, e_BACKUP . $newFile . ".zip");
        echo DBLAN_60 . " <small>(" . $zip . ")</small><br />";
        echo DBLAN_61 . "<br />";
        $dbfile = e107::getDb()->backup('*', $newFile . ".sql", array('nologs' => 1, 'droptable' => 1));
        echo DBLAN_62 . " <small>(" . $dbfile . ")</small>";
        e107::getAdminLog()->addSuccess($zip . " " . $dbfile, false)->save(DBLAN_63);
    }
    exit;
}
require_once "auth.php";
$st = new system_tools();
Exemplo n.º 9
0
 function setNewVersion()
 {
     // $sql = e107::getDb();
     //	$sql -> update('plugin', "plugin_version = '{$this->newVersion}' WHERE plugin_name='Forum' OR plugin_name = 'LAN_PLUGIN_FORUM_NAME'");
     //	e107::getConfig()->setPref('plug_installed/forum', $this->newVersion)->save(false,true,false);
     e107::getPlugin()->refresh('forum');
     return "Forum Version updated to version: {$this->newVersion} <br />";
 }
Exemplo n.º 10
0
 function init()
 {
     $ns = e107::getRender();
     $tp = e107::getParser();
     $pref = e107::getPref();
     // Check current theme also (but do NOT add to generated zip)
     $this->core_themes[] = $pref['sitetheme'];
     $this->core_themes = array_unique($this->core_themes);
     $this->core_plugins = e107::getPlugin()->getCorePlugins();
     if (E107_DEBUG_LEVEL > 0) {
         print_a($this->core_plugins);
     }
     $acceptedLans = explode(",", e_LANLIST);
     if (!isset($_SESSION['lancheck-core-image'])) {
         $core = array();
         $coredir = array('admin' => 'e107_admin', 'files' => 'e107_files', 'images' => 'e107_images', 'themes' => 'e107_themes', 'plugins' => 'e107_plugins', 'handlers' => 'e107_handlers', 'languages' => 'e107_languages', 'downloads' => 'e107_downloads', 'docs' => 'e107_docs');
         require_once e_ADMIN . "core_image.php";
         unset($core_image['e107_images'], $core_image['e107_files'], $core_image['e107_admin']);
         $_SESSION['lancheck-core-image'] = $core_image;
     }
     if (isset($_POST['language_sel'])) {
         $_SESSION['lancheck-errors-only'] = $_POST['errorsonly'] == 1 ? 1 : 0;
         $this->errorsOnly = $_POST['errorsonly'] == 1 ? TRUE : FALSE;
         $this->check_all();
         return TRUE;
     }
     // Write the language file.
     if (isset($_POST['submit']) && vartrue($_POST['lan']) && in_array($_POST['lan'], $acceptedLans)) {
         $this->write_lanfile($_POST['lan']);
         return TRUE;
     }
     // Edit the Language File.
     if (vartrue($_GET['f']) && vartrue($_GET['lan']) && in_array($_GET['lan'], $acceptedLans)) {
         if (!$_GET['mode']) {
             $dir1 = e_LANGUAGEDIR . "English/";
             $f1 = $tp->toDB($_GET['f']);
             $dir2 = e_LANGUAGEDIR . $_GET['lan'] . "/";
             $f2 = $tp->toDB($_GET['f']);
         } else {
             $fullpath_orig = $tp->toDB($_GET['f']);
             $fullpath_trans = str_replace("English", $_GET['lan'], $tp->toDB($_GET['f']));
             $f1 = basename($fullpath_orig);
             $f2 = basename($fullpath_trans);
             $dir1 = dirname($fullpath_orig) . "/";
             $dir2 = dirname($fullpath_trans) . "/";
         }
         $this->edit_lanfiles($dir1, $dir2, $f1, $f2, $_GET['lan']);
         return TRUE;
     }
     return FALSE;
 }