Skip to content
Snippets Groups Projects
Commit 06309c0b authored by Sean Madsen's avatar Sean Madsen
Browse files

hooks migrate - finishing cache system

parent dfa773d7
Branches
No related tags found
No related merge requests found
#!/usr/bin/env php
<?php
include __DIR__.'/hook-by-category.php';
include __DIR__.'/hooks-by-category.php';
$wiki_url = 'https://wiki.civicrm.org/confluence/display/CRMDOC';
$cache_dir = __DIR__.'/wiki_cache';
chdir($cache_dir);
foreach ($hooks_by_category as $category => $hooks) {
foreach ($hooks as $hook) {
if ( file_exists($hook) ) {
echo "SKIPPING: $hook (already cached)\n";
}
else {
echo "DOWNLOADING: $hook\n";
system("curl '$wiki_url/$hook' > '$hook'");
}
echo "\n";
}
}
echo "DONE \n";
......@@ -129,5 +129,5 @@ $hooks_by_category = [
],
"Report" => [
"hook_civicrm_alterReportVar",
]
],
];
\ No newline at end of file
#!/usr/bin/env php
<?php
include __DIR__.'/hook-by-category.php';
const WIKI_URL = 'https://wiki.civicrm.org/confluence/display/CRMDOC/';
include __DIR__.'/hooks-by-category.php';
foreach ($hooks_by_category as $category => $hooks) {
echo $category . "\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment