fixed bug of creating visualizations for non-existing pages

master
Fabien Benetou 14 years ago
parent 7298a84a45
commit 82bb4a414e
  1. 32
      pmwiki_recipes/pim_functions.php

@ -1,18 +1,19 @@
<?php <?php
// PIM functions (for PmWiki) /* PIM functions (for PmWiki)
// consider adding other related scripts here too (e.g. MemoryRecipe, Recalls, GroupStats, Coeditions, ...) consider adding other related scripts here too (e.g. MemoryRecipe, Recalls, GroupStats, Coeditions, ...)
// http://fabien.benetou.fr/pub/graphformatexporter.php.txt http://fabien.benetou.fr/pub/graphformatexporter.php.txt
// http://fabien.benetou.fr/pub/memorization.php.txt http://fabien.benetou.fr/pub/memorization.php.txt
// note that the order is important though note that the order is important though
// e.g. currently MemoryRecipe is loaded after thus can't be called here e.g. currently MemoryRecipe is loaded after thus can't be called here
// add to http://fabien.benetou.fr/repository/ add to http://fabien.benetou.fr/repository/
// it would be particularly useful to refactor each properly it would be particularly useful to refactor each properly
// especially since they share variables (e.g. first edit) but also some have better function especially since they share variables (e.g. first edit) but also some have better function
// e.g. caching in Coeditions e.g. caching in Coeditions
// change ProcessingJS generation by first producing JSON change ProcessingJS generation by first producing JSON
// via http://www.php.net/manual/en/function.json-encode.php via http://www.php.net/manual/en/function.json-encode.php
// cf http://fabien.benetou.fr/Tools/Processing and http://fabien.benetou.fr/Tools/JavaScript cf http://fabien.benetou.fr/Tools/Processing and http://fabien.benetou.fr/Tools/JavaScript
// this might be even faster on most computers since JS engines are improving this might be even faster on most computers since JS engines are improving
*/
//handle implicit linking //handle implicit linking
/* /*
@ -63,6 +64,9 @@ http://www.scholarpedia.org/article/Spike-response_model is probably too complic
function DisplayVisualEdits($pagename){ function DisplayVisualEdits($pagename){
global $ScriptUrl, $PubDir, $FarmD; global $ScriptUrl, $PubDir, $FarmD;
# equivalent to 404
if (!PageExists($pagename)) return;
$processingpath = '/pub/libraries/processing.js'; $processingpath = '/pub/libraries/processing.js';
$processingfile = "/pub/visualization/edits_per_page/$pagename.pjs"; $processingfile = "/pub/visualization/edits_per_page/$pagename.pjs";
$processinglib = "<script src=\"$processingpath\" type=\"text/javascript\"></script>"; $processinglib = "<script src=\"$processingpath\" type=\"text/javascript\"></script>";

Loading…
Cancel
Save