[limb-svn] r6513 - in 3.x/trunk/limb/macro/src: helpers tags/list

svn at limb-project.com svn at limb-project.com
Sat Nov 10 14:06:05 MSK 2007


Author: pachanga
Date: 2007-11-10 14:06:05 +0300 (Sat, 10 Nov 2007)
New Revision: 6513
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6513

Added:
   3.x/trunk/limb/macro/src/tags/list/lmbMacroListGlueHelper.class.php
Removed:
   3.x/trunk/limb/macro/src/helpers/lmbMacroListGlueHelper.class.php
Modified:
   3.x/trunk/limb/macro/src/tags/list/list_glue.tag.php
Log:
-- moving lmbMacroListGlueHelper back to src/tags/list

Deleted: 3.x/trunk/limb/macro/src/helpers/lmbMacroListGlueHelper.class.php
===================================================================
--- 3.x/trunk/limb/macro/src/helpers/lmbMacroListGlueHelper.class.php	2007-11-09 16:01:20 UTC (rev 6512)
+++ 3.x/trunk/limb/macro/src/helpers/lmbMacroListGlueHelper.class.php	2007-11-10 11:06:05 UTC (rev 6513)
@@ -1,74 +0,0 @@
-<?php
-/*
- * Limb PHP Framework
- *
- * @link http://limb-project.com
- * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
- * @license    LGPL http://www.gnu.org/copyleft/lesser.html
- */
-
-/**
- * Created just to simplify list:glue tag code
- * @package macro
- * @version $Id$
- */
-class lmbMacroListGlueHelper
-{
-  protected $step = 1;
-  protected $step_counter = 0;
-  protected $total = 0;
-  protected $total_counter = 0;
-  protected $list_component = null;
-  protected $skip_next = false;
-
-  function setStep($step)
-  {
-    if($step < 1)
-      $step = 1;
-
-    $this->step = $step;
-  }
-
-  function next()
-  {
-    if($this->skip_next)
-      $this->step_counter = 0;
-    else
-      $this->step_counter++;
-
-    $this->total_counter++;
-  }
-
-  function reset()
-  {
-    $this->step_counter = 0;
-  }
-
-  function setTotalItems($total_items)
-  {
-    $this->total = $total_items;
-  }
-
-  function shouldDisplay()
-  {
-    if($this->skip_next ||
-       ($this->step_counter != $this->step) ||
-       ($this->total_counter >= $this->total))
-    {
-      $result = false;
-    }
-    else
-      $result = true;
-
-    $this->skip_next = false;
-
-    return $result;
-  }
-
-  function skipNext()
-  {
-    $this->reset();
-    $this->skip_next = true;
-  }
-}
-

Modified: 3.x/trunk/limb/macro/src/tags/list/list_glue.tag.php
===================================================================
--- 3.x/trunk/limb/macro/src/tags/list/list_glue.tag.php	2007-11-09 16:01:20 UTC (rev 6512)
+++ 3.x/trunk/limb/macro/src/tags/list/list_glue.tag.php	2007-11-10 11:06:05 UTC (rev 6513)
@@ -32,7 +32,7 @@
     $helper_var = $this->getHelperVar($code);
 
     $code->writePHP("if(!isset({$helper_var})){\n");
-    $code->registerInclude('limb/macro/src/helpers/lmbMacroListGlueHelper.class.php');
+    $code->registerInclude('limb/macro/src/tags/list/lmbMacroListGlueHelper.class.php');
     $code->writePHP($helper_var . " = new lmbMacroListGlueHelper();\n");
 
     if($step = $this->get('step'))

Copied: 3.x/trunk/limb/macro/src/tags/list/lmbMacroListGlueHelper.class.php (from rev 6512, 3.x/trunk/limb/macro/src/helpers/lmbMacroListGlueHelper.class.php)
===================================================================
--- 3.x/trunk/limb/macro/src/tags/list/lmbMacroListGlueHelper.class.php	                        (rev 0)
+++ 3.x/trunk/limb/macro/src/tags/list/lmbMacroListGlueHelper.class.php	2007-11-10 11:06:05 UTC (rev 6513)
@@ -0,0 +1,74 @@
+<?php
+/*
+ * Limb PHP Framework
+ *
+ * @link http://limb-project.com
+ * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
+ */
+
+/**
+ * Created just to simplify list:glue tag code
+ * @package macro
+ * @version $Id$
+ */
+class lmbMacroListGlueHelper
+{
+  protected $step = 1;
+  protected $step_counter = 0;
+  protected $total = 0;
+  protected $total_counter = 0;
+  protected $list_component = null;
+  protected $skip_next = false;
+
+  function setStep($step)
+  {
+    if($step < 1)
+      $step = 1;
+
+    $this->step = $step;
+  }
+
+  function next()
+  {
+    if($this->skip_next)
+      $this->step_counter = 0;
+    else
+      $this->step_counter++;
+
+    $this->total_counter++;
+  }
+
+  function reset()
+  {
+    $this->step_counter = 0;
+  }
+
+  function setTotalItems($total_items)
+  {
+    $this->total = $total_items;
+  }
+
+  function shouldDisplay()
+  {
+    if($this->skip_next ||
+       ($this->step_counter != $this->step) ||
+       ($this->total_counter >= $this->total))
+    {
+      $result = false;
+    }
+    else
+      $result = true;
+
+    $this->skip_next = false;
+
+    return $result;
+  }
+
+  function skipNext()
+  {
+    $this->reset();
+    $this->skip_next = true;
+  }
+}
+



More information about the limb-svn mailing list