Example #1
0
 function checkWWW()
 {
     if (substr($this->address, 0, 11) == "http://www.") {
         $s = new Site(replaceOnce('www.', '', $this->address));
         if ($s->loaded) {
             $this->sid = $s->sid;
             $this->loaded = 1;
             $this->parent = $s->parent;
             $this->lock = $s->lock;
         }
     } else {
         $s = new Site(replaceOnce("http://", "http://www.", $this->address));
         if ($s->loaded) {
             $this->sid = $s->sid;
             $this->loaded = 1;
             $this->parent = $s->parent;
             $this->lock = $s->lock;
         }
     }
 }
Example #2
0
function WikiWideWebize($s, $source)
{
    $diffs = $s->getDiffs();
    for ($i = 0; $i < count($diffs); $i++) {
        $source = replaceOnce($diffs[$i]->toreplace, $diffs[$i]->replacewith, $source);
    }
    return $source;
}