Przeglądaj źródła

Merge branch 'master' of bn.git:plabudda/se

Piotr Labudda 9 lat temu
rodzic
commit
92b118b6bc

+ 2 - 2
SE/schema/default_db_xml_cache.public/build_recurse_ant.xsl

@@ -1832,8 +1832,8 @@
         <!-- first assign xpath to features from  -->
             <xsl:variable name="wfs_output_nodes" select="doc($wfs_output)"/>
         <xsl:variable name="current_RelatedFeature" select="*"/>
-       <xsl:variable name="xml_id" select="@xml_id"/>
-       <xsl:variable name="feature_pos_parent" select="@feature_pos"/>
+        <xsl:variable name="xml_id" select="@xml_id"/>
+        <xsl:variable name="feature_pos_parent" select="@feature_pos"/>
         <!--<input_obj_with_xpath_debug>
             <xsl:copy-of select="$wfs_output_nodes"/>
         </input_obj_with_xpath_debug>-->

+ 11 - 4
SE/schema/default_db_xml_cache.public/build_recurse_ant_merge_dita_from_temp.xsl

@@ -541,13 +541,20 @@
         <!--<xsl:element name="{name()}">-->
             <!--<xsl:copy-of select="@*"/>-->
             <!--<xsl:apply-templates select="@*"/>-->
-            <xsl:message>#94 ustalam $feature_pos_child=<xsl:value-of select="position()"/>; dla <xsl:value-of select="name()"/></xsl:message>
-            <xsl:comment>#94 ustalam @xml_id:<xsl:value-of select="@xml_id"/>; $feature_pos_child=<xsl:value-of select="position()"/>; dla <xsl:value-of select="name()"/>; ../name() <xsl:value-of select="../name()"/>
-                count RelatedFeature prev:<xsl:value-of select="count(parent::node()[name='RelatedFeature' ])"/> <!--  and position()&lt; current()/position() -->
+            <xsl:variable name="position" select="position()"/>
+            <xsl:variable name="position_related" >
+                <xsl:choose>
+                    <xsl:when test="@feature_pos_parent"><xsl:value-of select="@feature_pos_parent"/></xsl:when>
+                    <xsl:otherwise><xsl:value-of select="position()"/></xsl:otherwise>
+                </xsl:choose>
+            </xsl:variable>
+            <xsl:message>#94 ustalam @feature_pos_parent:<xsl:value-of select="@feature_pos_parent"/>; @feature_pos:<xsl:value-of select="@feature_pos"/>; $position_related=<xsl:value-of select="$position_related"/>; $feature_pos_child(position())=<xsl:value-of select="position()"/>; dla <xsl:value-of select="../name()"/>/<xsl:value-of select="name()"/></xsl:message>
+            <xsl:comment>#94 ustalam @feature_pos_parent:<xsl:value-of select="@feature_pos_parent"/>; @feature_pos:<xsl:value-of select="@feature_pos"/>; @xml_id:<xsl:value-of select="@xml_id"/>; name():<xsl:value-of select="name()"/>; $feature_pos_child(position())=<xsl:value-of select="position()"/>; dla <xsl:value-of select="../name()"/>/<xsl:value-of select="name()"/>; $position_related = <xsl:value-of select="$position_related"/>; count RelatedFeature prev:<xsl:value-of select="count(parent::node()[name()='RelatedFeature' and position() &lt;= $position ])"/> <!--  and position()&lt; current()/position() -->
             </xsl:comment>
+            <!--<xsl:if test="not($position_related = position() )"><xsl:message terminate="no">#555 Not correct <xsl:value-of select="../name()"/>/<xsl:value-of select="name()"/>; </xsl:message></xsl:if>-->
             <xsl:apply-templates mode="RelatedFeatureChild" select=".">
                 <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
-                <xsl:with-param name="feature_pos_child" select="position()"/>
+                <xsl:with-param name="feature_pos_child" select="$position_related"/> <!-- przed 2017-05-24 bylo position() -->
                 <!--<xsl:with-param name="dita_with_id" select="$dita_with_id"/>-->
                 <xsl:with-param name="dita.map" select="$dita.map"/>
                 <xsl:with-param name="path" select="$path"/>

+ 6 - 6
SE/superedit-STATYSTYKA_TABELE.php

@@ -450,9 +450,9 @@ function STATYSTYKA_TABELE() {
 						or USERS2_MARKETING.TV_BAD_DATE> from_unixtime(unix_timestamp(now())-31536000)
 					), 1, 0) ) / count(USERS2_MARKETING.S_ADDRESS_STREET) * 100), 2) as BADAN_I
 				, round(( sum( if(
-					(	USERS2_MARKETING.I_BAD_DATE> from_unixtime(unix_timestamp(now())-31536000)
-						or USERS2_MARKETING.T_BAD_DATE> from_unixtime(unix_timestamp(now())-31536000)
-						or USERS2_MARKETING.TV_BAD_DATE> from_unixtime(unix_timestamp(now())-31536000)
+					(	USERS2_MARKETING.I_BAD_DATE> from_unixtime(unix_timestamp(now())-315360000,'%Y-%m-%d')
+						or USERS2_MARKETING.T_BAD_DATE> from_unixtime(unix_timestamp(now())-315360000,'%Y-%m-%d')
+						or USERS2_MARKETING.TV_BAD_DATE> from_unixtime(unix_timestamp(now())-315360000,'%Y-%m-%d')
 						or USERS2_MARKETING.I_OPER='BN'
 						or USERS2_MARKETING.T_OPER='BN'
 						or USERS2_MARKETING.TV_OPER='BN'
@@ -548,9 +548,9 @@ function STATYSTYKA_TABELE() {
 						), 1, 0)
 					) / count(USERS2_MARKETING.S_ADDRESS_STREET) * 100), 2) as BADAN_I
 				, round(( sum( if(
-						(	USERS2_MARKETING.I_BAD_DATE> from_unixtime(unix_timestamp(now())-31536000)
-						or USERS2_MARKETING.T_BAD_DATE> from_unixtime(unix_timestamp(now())-31536000)
-						or USERS2_MARKETING.TV_BAD_DATE> from_unixtime(unix_timestamp(now())-31536000)
+						(	USERS2_MARKETING.I_BAD_DATE> from_unixtime(unix_timestamp(now())-315360000,'%Y-%m-%d')
+						or USERS2_MARKETING.T_BAD_DATE> from_unixtime(unix_timestamp(now())-315360000,'%Y-%m-%d')
+						or USERS2_MARKETING.TV_BAD_DATE> from_unixtime(unix_timestamp(now())-315360000,'%Y-%m-%d')
 						or USERS2_MARKETING.I_OPER='BN'
 						or USERS2_MARKETING.T_OPER='BN'
 						or USERS2_MARKETING.TV_OPER='BN'), 1, 0)