public function getEnabledPluginClasses($profile) { $enabledplugins = new EnabledPlugins_Config($profile); $enabledplugins->load(); return $enabledplugins->getEnabledPluginFamilies($this->getPluginFamilies()); }
$profilename = $profile != "default" ? $profile : "Default"; ?> <script type="text/javascript"> var profile="<?php echo $profile; ?> "; </script> <div class="container_12" id="profile_action"> <div class="grid_12 subtitle"> <span>Configure Current Profile (<?php echo $profilename; ?> )</span> <?php $eplconf = new EnabledPlugins_Config($profile); $eplconf->load(); $conf_ok = $eplconf->hasSection("PLUGINS_DATASOURCES"); ?> <span class="saveinfo<?php if (!$conf_ok) { ?> log_warning<?php } ?> " id="profileconf_msg"> <?php if ($conf_ok) { ?> Saved:<?php
$genlist = ""; } $pflist = array(); foreach (explode(",", $dslist) as $pclass) { $pflist[$pclass] = "datasources"; } foreach (explode(",", $genlist) as $pclass) { $pflist[$pclass] = "general"; } foreach (explode(",", $iplist) as $pclass) { $pflist[$pclass] = "itemprocessors"; } require_once "../inc/magmi_pluginhelper.php"; require_once "../inc/magmi_config.php"; //saving plugin selection $epc = new EnabledPlugins_Config($profile); $epc->setPropsFromFlatArray(array("PLUGINS_DATASOURCES:class" => $dslist, "PLUGINS_GENERAL:classes" => $genlist, "PLUGINS_ITEMPROCESSORS:classes" => $iplist)); if ($epc->save()) { //saving plugins params foreach ($pflist as $pclass => $pfamily) { if ($pclass != "") { $plinst = Magmi_PluginHelper::getInstance($profile)->createInstance($pfamily, $pclass, $_REQUEST); $paramlist = $plinst->getPluginParamNames(); $sarr = $plinst->getPluginParams($_REQUEST); $parr = $plinst->getPluginParamsNoCurrent($_REQUEST); foreach ($paramlist as $pname) { if (!isset($parr[$pname])) { $parr[$pname] = 0; } } $farr = array_merge($sarr, $parr);
<?php require_once "../inc/magmi_config.php"; $currentprofile = $_REQUEST["profile"]; if ($currentprofile == "default") { $currentprofile = null; } $newprofile = $_REQUEST["newprofile"]; if ($newprofile != "") { $bcfg = new EnabledPlugins_Config($currentprofile); $confdir = Magmi_Config::getInstance()->getConfDir(); $npdir = $confdir . DS . $newprofile; mkdir($npdir, Magmi_Config::getInstance()->getDirMask()); $cpdir = $bcfg->getProfileDir(); $filelist = scandir($cpdir); foreach ($filelist as $fname) { if (substr($fname, -5) == ".conf") { copy($cpdir . DS . $fname, $npdir . DS . $fname); } } } else { $newprofile = $currentprofile; } header("Location:magmi.php?configstep=2&profile={$newprofile}");
require_once "dbhelper.class.php"; $conf = Magmi_Config::getInstance(); $conf->load(); $conf_ok = 1; $profile = ""; if (isset($_REQUEST["profile"])) { $profile = $_REQUEST["profile"]; } else { if (isset($_SESSION["last_runned_profile"])) { $profile = $_SESSION["last_runned_profile"]; } } if ($profile == "") { $profile = "default"; } $eplconf = new EnabledPlugins_Config($profile); $eplconf->load(); if (!$eplconf->hasSection("PLUGINS_DATASOURCES")) { $conf_ok = 0; } ?> <!-- MAGMI UPLOADER --> <?php $zipok = class_exists("ZipArchive"); ?> <div class="container_12"> <div class="grid_12 subtitle"> <span>Update Magmi</span> </div> </div> <div class="container_12">