|
Main sidebar
|
PITS /
01167Summary: only analyze cookbooks that are actually installed
Created: 2010-02-07 06:04
Status: Closed - documentation updated
Category: Documentation
From: Peter Bowers
Assigned:
Priority: 2
Version: 2.0 and after
OS: n/a
Description: The Site Analyzer (analyze.php) currently goes directly to the cookbook directory and checks every single script that exists there. An administrator may have tested a script and then uninstalled it via config.php or farmconfig.php without deleting it from cookbook/ but it will still be analyzed. Site Analyzer should only report on recipes that are actually installed rather than reporting on all recipes that exist in the cookbook directory. Showing unnecessarily (uninstalled) cookbooks has multiple negative side effects:
Since the $RecipeInfo line is already stored as an array, why not use it as such instead of actually parsing the PHP script? In the ?action=analyze handler, simply look at the existing elements of $RecipeInfo (this should indicate which recipes are installed) and list those... Presumably farmconfig.php, config.php, and any page- or group-specific config files have already been processed and thus this array has already been populated and is completely available... If a more thorough scan is a desirable feature, why not make it an option (a checkbox on the form in SiteAnalyzer)? I have put together the (very simple) modification to analyze.php in the attachment Attach:analyze.php.txt. SiteAnalyzer page just needs to be modified to include the checkbox and use it to construct the URL with a $RecipeInfo is not available if a recipe is included conditionally Good point. I hadn't thought of that. 3 solutions present themselves (in addition to the fact that I am lowering the priority from 3 to 2):
Feel free to improve the page PmWiki:AnalyzeResults and add any relevant footnotes or messages. --Petko February 07, 2010, at 04:24 PM Hmmm... I made a change. Part of it comes through to SiteAnalyzer and part of it doesn't... The part on the line below doesn't seem to appear...? Oh, never mind, I figured it out. It is being PS On a separate note, why is *.php a disallowed extension in the PITS group? It seems logical that people would be submitting suggested PHP scripts in this group to solve the problems they are reporting...? While it was already defined as an $UploadsExtSize entry, the $UploadsExts entry was forgotten, now fixed. Attach:hello.php Petko |