Skip to content

Instantly share code, notes, and snippets.

@oksushi
Forked from netProphET/migx_modx-2.2.diff
Created October 6, 2011 04:43
Show Gist options
  • Save oksushi/1266540 to your computer and use it in GitHub Desktop.
Save oksushi/1266540 to your computer and use it in GitHub Desktop.
MIGX diff for MODX2.2
--------------- core/components/migx/elements/tv/input/migx.php ---------------
index 11a9c2d..53370a5 100644
@@ -133,6 +133,7 @@ $lang = $this->xpdo->lexicon->fetch();
$lang['mig_add'] = !empty($properties['btntext'])?$properties['btntext']:$lang['mig_add'];
$modx->smarty->assign('i18n', $lang);
$this->xpdo->smarty->assign('properties', $properties);
+$this->xpdo->smarty->assign('resource', is_object($this->xpdo->resource) ? $this->xpdo->resource->toArray() : array());
$this->xpdo->smarty->assign('pathconfigs', $this->xpdo->toJSON($pathconfigs));
$this->xpdo->smarty->assign('columns', $this->xpdo->toJSON($cols));
$this->xpdo->smarty->assign('fields', $this->xpdo->toJSON($fields));
---------------- core/components/migx/processors/mgr/fields.php ----------------
index 40bbbf4..bd5ae83 100644
@@ -12,6 +12,10 @@
//if (!$modx->hasPermission('quip.thread_view')) return $modx->error->failure($modx->lexicon('access_denied'));
$modx->getService('smarty', 'smarty.modSmarty');
+require_once MODX_CORE_PATH.'model/modx/modmanagercontroller.class.php';
+require_once MODX_CORE_PATH.'model/modx/modmanagercontrollerdeprecated.class.php';
+$c = new modManagerControllerDeprecated($modx,array());
+$modx->controller = call_user_func_array(array($c,'getInstance'),array($modx,'modManagerControllerDeprecated',array()));
if (!isset($modx->smarty)) {
$modx->getService('smarty', 'smarty.modSmarty', '', array('template_dir' => $modx->
@anselmh
Copy link

anselmh commented Oct 13, 2011

Why not make a pull-request?

@Bruno17
Copy link

Bruno17 commented Oct 18, 2011

Thanks for that patch. I will add it to MIGX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment