Tweak to getCrawlItems in CrawlController, a=chris

Chris Pollett [2012-06-10 05:31:05]
Tweak to getCrawlItems in CrawlController, a=chris
Filename
bin/arc_tool.php
controllers/crawl_controller.php
views/helpers/toggle_helper.php
diff --git a/bin/arc_tool.php b/bin/arc_tool.php
index a605811..f74a283 100755
--- a/bin/arc_tool.php
+++ b/bin/arc_tool.php
@@ -38,7 +38,10 @@ define("BASE_DIR", substr(
     dirname(realpath($_SERVER['PHP_SELF'])), 0,
     -strlen("/bin")));

-/** THis tool does not need logging*/
+ini_set("memory_limit","850M"); /*
+        reindex sometimes takes more than the default 128M, 850 to be safe */
+
+/** This tool does not need logging*/
 define("LOG_TO_FILES", false);

 /** Load in global configuration settings */
diff --git a/controllers/crawl_controller.php b/controllers/crawl_controller.php
index 61576bc..0c8f88f 100644
--- a/controllers/crawl_controller.php
+++ b/controllers/crawl_controller.php
@@ -250,6 +250,7 @@ class CrawlController extends Controller implements CrawlConstants
         $num = $this->clean($_REQUEST["num"], "int");
         $i = $this->clean($_REQUEST["i"], "int");
         $this->crawlModel->current_machine = $i;
+        $this->phraseModel->current_machine = $i;
         $lookups = unserialize(webdecode($_REQUEST["arg"]));

         $our_lookups = array();
diff --git a/views/helpers/toggle_helper.php b/views/helpers/toggle_helper.php
index 4d1a2c6..24a5c91 100644
--- a/views/helpers/toggle_helper.php
+++ b/views/helpers/toggle_helper.php
@@ -58,11 +58,14 @@ class ToggleHelper extends Helper
      *  @param string $on_url - url that is sent when one clicks on
      *  @param string $off_url - url that is sent when one clicks off
      */
-    public function render($state, $on_url, $off_url)
+    public function render($state, $on_url, $off_url, $caution = false)
     {
-        if($state) {?>
+        if($state) {
+            $oncolor = ($caution) ? "backyellow" : "backgreen";
+            ?>
             <table class="toggletable"><tr><td
-            class="backgreen"><b><?php e(tl('toggle_helper_on'));?></b></td>
+            class="<?php e($oncolor);
+                ?>"><b><?php e(tl('toggle_helper_on'));?></b></td>
             <td><a href="<?php e($off_url);?>"
             ><?php e(tl('toggle_helper_off'));?></a></td></tr></table>
         <?php } else {?>
ViewGit