Changeset 875 for confluence

Show
Ignore:
Timestamp:
12/06/10 19:05:52 (18 months ago)
Author:
confluence
Message:

removing some crap

Location:
confluence
Files:
6 removed
1 modified

Legend:

Unmodified
Added
Removed
  • confluence/genderiser/genderiser-pmwiki/genderiser.php

    r548 r875  
    11<?php 
    2     $GENDER_LOOKUP = { 
     2    $GENDER_LOOKUP = array( 
    33        "m" => 0, 
    44        "f" => 1, 
    55        "o" => 2, 
    66        "s" => 3, 
    7     } 
     7    ); 
    88 
    99    function gender_lookup($genderstring) { 
     
    1616    } 
    1717 
    18     $DEFAULT_WORDS = { 
     18    $DEFAULT_WORDS = array( 
    1919        "they" => array("he", "she"), 
    2020        "them" => array("him", "her"), 
     
    3030        "fiance" => array("fiance", "fiancee"), 
    3131        "friend" => array("boyfriend", "girlfriend"), 
    32     }; 
     32    ); 
    3333 
    3434    $words = $DEFAULT_WORDS; 
     
    4040 
    4141// GET CONFIG 
     42    print $Group; 
    4243 
    4344    foreach (array("Site/Genderiser","$Group/Genderiser") as $configpage) { 
     45        print $configpage; 
    4446        $var_people = PageTextVar($configpage,"people"); 
    4547        if (isset($var_people)) { 
    46             foreach (split(", *", $var_people) as $person) { 
     48            foreach (preg_split("/, */", $var_people) as $person) { 
    4749                $genderinfo = PageTextVar($configpage, $person); 
    48                 list($gender, $so_gender) = split(",", $genderinfo); 
     50                list($gender, $so_gender) = preg_split("/, */", $genderinfo); 
    4951                $people[$person] = gender_lookup($gender); 
    5052                if (isset($so_gender)) { 
     
    5759        if (isset($var_words)) { 
    5860            $var_words = str_replace("\,", "|", $var_words); 
    59             foreach (split(", *", $var_words) as $word) { 
     61            foreach (preg_split("/, */", $var_words) as $word) { 
    6062                $wordpair = PageTextVar($configpage, $word); 
    6163                if (isset($wordpair)) { 
    62                     $words[$word] = split(", *", $wordpair); 
     64                    $words[$word] = preg_split("/, */", $wordpair); 
    6365                } 
    6466 
     
    6971                            $specific_words[$person] = array(); 
    7072                        } 
    71                         $specific_words[$person][$word] = split(", *", $wordpair); 
     73                        $specific_words[$person][$word] = preg_split("/, */", $wordpair); 
    7274                    } 
    7375                } 
     
    8385            $keywords[$person."_".$word] = $words[$word][$gender]; 
    8486 
    85             if isset($sos[$person]) { 
     87            if (isset($sos[$person])) { 
    8688                $so_gender_type = $sos[$person]; 
    8789                if ($so_gender_type < 2) { 
     
    101103 
    102104foreach (array_keys($keywords) as $keyword) { 
     105    print $keyword." = ".$keywords[$keyword]; 
    103106    $FmtPV[$keyword] = "'" . $keywords[$keyword] . "'"; 
    104107}