Removed multiple require()
[mirrors/Kyberia-bloodline.git] / cron / search_update.php
index c337e204065b082cf0f08db26c18c04f68b79c5d..318c823c694ab072c9fa92d688a7452e37b32027 100755 (executable)
@@ -1,8 +1,16 @@
 #!/usr/bin/php
 <?php
-require('/storage/system/www-root/kyberia.sk/config/config.inc');
-require(SYSTEM_ROOT.'/inc/database.inc');
-require(SYSTEM_ROOT.'/inc/senate.inc');
+/*
+ * Script that XXX put xapian here?
+ * Called XXX
+ */
+
+// Use relative address of config file
+// Change this, if you move you cron directory.
+$dir=substr(__FILE__, 0, strrpos(__FILE__, '/'));
+require_once($dir.'/../wwwroot/config/config.inc');
+
+require_once(INCLUDE_DIR.'/database.inc');
 
 $db = new CLASS_DATABASE();
 $db->query('insert into node_content select node_id,node_content from nodes where ( DATE_SUB(CURDATE(),INTERVAL 2 DAY) < node_created OR DATE_SUB(CURDATE(),INTERVAL 2 DAY) < node_updated)  ON DUPLICATE KEY UPDATE node_content.node_content = nodes.node_content;');
This page took 0.18866 seconds and 4 git commands to generate.