--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<module type="WEB_MODULE" version="4">\r
+ <component name="NewModuleRootManager" inherit-compiler-output="true">\r
+ <exclude-output />\r
+ <content url="file://$MODULE_DIR$" />\r
+ <orderEntry type="inheritedJdk" />\r
+ <orderEntry type="sourceFolder" forTests="false" />\r
+ </component>\r
+</module>
\ No newline at end of file
<?php
-class MaintenanceController extends CubeIT_Controller_MaintenanceController {
- protected function _filterURL($url) {
+class MaintenanceController extends CubeIT_Controller_MaintenanceController
+{
+ protected function _filterURL($url)
+ {
if (null === $url || !$url || $url == 'http://') {
return '';
}
// }
// }
- public function importReferences() {
+ public function importReferences()
+ {
set_time_limit(0);
+ ignore_user_abort(true);
$ws = new CubeIT_Services_Fluidbook('vincent@cubedesigners.com', 'iquique');
$references = Fluidbook_Model_Reference::factory()->find();
$n = 0;
foreach ($fluidbooks as $fluidbook) {
- if ($n > 5) {
+ if ($n > 20) {
break;
}
try {
$dir = PUBLIC_PATH . '/references/' . $fluidbook . '-' . CubeIT_Text::str2URL(trim($meta->title));
try {
- $res = $ws->installBookIfNeeded($fluidbook, $dir, $meta->date);
+ $res = $ws->installBookIfNeeded($fluidbook, $dir, 'auto');
if ($res) {
$n++;
}
} catch (exception $e) {
echo $e->getMessage() . '<br />';
+ exit;
}
} catch (exception $e) {
echo $e->getMessage() . '<br />';
+ exit;
}
}
}
+
+
+ public static function importReference($id)
+ {
+ $ws = new CubeIT_Services_Fluidbook('vincent@cubedesigners.com', 'iquique');
+ $meta = $ws->getMetadata($id);
+ $dir = PUBLIC_PATH . '/references/' . $id . '-' . CubeIT_Text::str2URL(trim($meta->title));
+
+ $res = $ws->installBookIfNeeded($id, $dir, 'auto');
+ }
}