Changes between Initial Version and Version 1 of Ticket #1184


Ignore:
Timestamp:
May 2, 2017, 1:05:53 PM (9 years ago)
Author:
Torsten Riemer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1184

    • Property Component AdminShop
    • Property Milestonemodified-shop-2.0.2.3
    • Property Version2.0.2.2
  • Ticket #1184 – Description

    initial v1  
    1 Siehe dazu bitte [https://www.modified-shop.org/forum/index.php?topic=37133.msg337502;topicseen#msg337502 diesen Thread] im Experten Forum.
     1Siehe dazu bitte diesen Thread im Experten Forum: [https://www.modified-shop.org/forum/index.php?topic=37133.0 Session-Handling in 2.0.2.2]
    22
     3Suche in "/includes/functions/sessions.php":
     4{{{
     5    if ($session_data != '') {
     6      $variables = array();
     7      $a = preg_split( "/(\w+)\|/", $session_data, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
     8      for( $i = 0; $i < count( $a ); $i = $i+2 ) {
     9        $variables[$a[$i]] = unserialize( $a[$i+1] );
     10      }
     11      return($variables);
     12    }
     13}}}
     14Hier wird bei jedem Loop in der for-Schleife ein ''count()'' gemacht.
     15So wäre es besser und viel schneller:
     16{{{
     17      for( $i = 0, $ca = count($a); $i < $ca; $i = $i+2 ) {
     18        $variables[$a[$i]] = unserialize( $a[$i+1] );
     19      }
     20}}}
    321Gruß,
    422noRiddle