[ Index ]

PHP Cross Reference of Textpattern 4.0.8

title

Body

[close]

/textpattern/update/ -> _to_4.0.6.php (source)

   1  <?php
   2  
   3  /*
   4  $HeadURL: https://textpattern.googlecode.com/svn/releases/4.0.8/source/textpattern/update/_to_4.0.6.php $
   5  $LastChangedRevision: 3047 $
   6  */
   7  
   8      if (!defined('TXP_UPDATE'))
   9      {
  10          exit("Nothing here. You can't access this file directly.");
  11      }
  12  
  13  
  14      # replace deprecated tags with functionally equivalent, valid tags
  15      $tags = array(
  16          'sitename'    => 'site_name',
  17          'request_uri' => 'page_url',
  18          'id'          => 'page_url type="id"',
  19          's'           => 'page_url type="s"',
  20          'c'           => 'page_url type="c"',
  21          'q'           => 'page_url type="q"',
  22          'pg'          => 'page_url type="pg"',
  23      );
  24  
  25      foreach($tags as $search => $replace)
  26      {
  27          foreach(array(' ', '/') as $end)
  28          {
  29              safe_update('txp_page', "user_html = REPLACE(user_html, '<txp:".$search.$end."', '<txp:".$replace.' '.trim($end)."')", '1=1');
  30              safe_update('txp_form', "Form = REPLACE(Form, '<txp:".$search.$end."', '<txp:".$replace.' '.trim($end)."')", '1=1');
  31          }
  32      }
  33  
  34  ?>


Generated: Thu May 21 23:03:01 2009 Cross-referenced by PHPXref 0.7