Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customFieldTableIndex is not correct #119

Open
ghost opened this issue Aug 27, 2015 · 0 comments
Open

customFieldTableIndex is not correct #119

ghost opened this issue Aug 27, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 27, 2015

Replace inside makePackage.php ...

protected function getModuleCustomFieldTable($moduleName, $o_module)
{
$o_module->customFieldTable = null;
$o_module->customFieldTableIndex = null;

    if(file_exists($this->moduleBaseDir."modules/$moduleName/$moduleName.php"))
    {
        require_once($this->moduleBaseDir."modules/$moduleName/$moduleName.php");

        $focus = new $moduleName();

        if(!empty($focus->customFieldTable))
        {
            $a_tables = array_keys($focus->customFieldTable);

            $o_module->customFieldTable = $a_tables[0];
            $o_module->customFieldTableIndex = $focus->customFieldTable[$a_tables[0]];
        }
    }
}

by

protected function getModuleCustomFieldTable($moduleName, $o_module)
{
$o_module->customFieldTable = null;
$o_module->customFieldTableIndex = null;

    if(file_exists($this->moduleBaseDir."modules/$moduleName/$moduleName.php"))
    {
        require_once($this->moduleBaseDir."modules/$moduleName/$moduleName.php");

        $focus = new $moduleName();

        if(!empty($focus->customFieldTable))
        {
          $a_tables = array_values($focus->customFieldTable);
              $o_module->customFieldTable = $a_tables[0];
          $o_module->customFieldTableIndex = $a_tables[1];
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants