From: Matthias E. <mat...@un...> - 2012-05-02 13:21:22
|
Thanks for your fast commit. #1 I saw it right after posting the email that there is only one if necessary :). #2 If its deactivatable in vufind 2.0 its fine for me. Thanks again, Matthias Am Mittwoch, den 02.05.2012, 12:47 +0000 schrieb Demian Katz: > Thanks for the suggestions. > > #1: I've committed an updated iniMerge() in r5546. Here's code that should do the same thing as yours in slightly fewer lines: > > function iniMerge($config_ini, $custom_ini) > { > foreach ($custom_ini as $k => $v) { > // Make a recursive call if we need to merge array values into an existing > // key... otherwise just drop the value in place. > if (is_array($v) && isset($config_ini[$k])) { > $config_ini[$k] = iniMerge($config_ini[$k], $custom_ini[$k]); > } else { > $config_ini[$k] = $v; > } > } > return $config_ini; > } > > Please let me know if you have any problems with this. > > #2: VuFind 2.0 will address this problem -- it uses a "related record" plug-in system for the record view so that you can decide which actions are performed to fill in the sidebar (this makes it easier to disable unwanted features AND to add new stuff like custom API integrations). This is already implemented in the work-in-progress branch (https://vufind.svn.sourceforge.net/svnroot/vufind/branches/vufind2/). I'm not planning on backporting this functionality to the 1.x code, though if you think it's worth doing the work and are willing to submit a patch, I'd certainly be happy to commit it to the trunk. If you don't want to put that much effort into it, I'd recommend just modifying the code to disable it for now, and upgrading to 2.0 when you have the opportunity. (A first release candidate is due for release in July). > > Let me know if you have any questions about anything. > > - Demian > > > -----Original Message----- > > From: Matthias Eichner [mailto:mat...@un...] > > Sent: Wednesday, May 02, 2012 7:12 AM > > To: vuf...@li... > > Subject: [VuFind-Tech] vufind configuration > > > > Hi, > > > > I have two questions. > > > > #1 ConfigArray.php > > Can you extend the iniMerge method with this: > > function iniMerge($config_ini, $custom_ini) > > { > > foreach ($custom_ini as $k => $v) { > > > > if (is_array($v)) { > > if(!isset($config_ini[$k])) { > > $config_ini[$k] = $v; > > } else { > > $config_ini[$k] = iniMerge($config_ini[$k], > > $custom_ini[$k]); > > } > > } else { > > $config_ini[$k] = $v; > > } > > } > > return $config_ini; > > } > > > > I have an extended configuration file which has other options then the > > default config.ini. So i get always 'Undefined Index' warnings because > > $config_ini[$k] is not defined for those new options. > > > > #2 Make morelikethis configurable > > A morelikethis request is made for each record every time and you cannot > > dissable it. Can you make this configurable? (Record.php -> 190) > > > > Best regards, > > Matthias Eichner > > > > > > ------------------------------------------------------------------------------ > > Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. Discussions > > will include endpoint security, mobile security and the latest in malware > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > > Vufind-tech mailing list > > Vuf...@li... > > https://lists.sourceforge.net/lists/listinfo/vufind-tech |