Textpattern PHP Cross Reference Content Management Systems

Source: /textpattern/update/_to_4.0.4.php - 47 lines - 1790 bytes - Text - Print

   1  <?php
   2  
   3  /*
   4   * Textpattern Content Management System
   5   * http://textpattern.com
   6   *
   7   * Copyright (C) 2016 The Textpattern Development Team
   8   *
   9   * This file is part of Textpattern.
  10   *
  11   * Textpattern is free software; you can redistribute it and/or
  12   * modify it under the terms of the GNU General Public License
  13   * as published by the Free Software Foundation, version 2.
  14   *
  15   * Textpattern is distributed in the hope that it will be useful,
  16   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18   * GNU General Public License for more details.
  19   *
  20   * You should have received a copy of the GNU General Public License
  21   * along with Textpattern. If not, see <http://www.gnu.org/licenses/>.
  22   */
  23  
  24  if (!defined('TXP_UPDATE')) {
  25      exit("Nothing here. You can't access this file directly.");
  26  }
  27  
  28  if (!safe_field("name", 'txp_prefs', "name = 'allow_raw_php_scripting'")) {
  29      safe_insert('txp_prefs', "prefs_id = 1, name = 'allow_raw_php_scripting', val = '1', type = '1', html = 'yesnoradio'");
  30  } else {
  31      safe_update('txp_prefs', "html = 'yesnoradio'", "name = 'allow_raw_php_scripting'");
  32  }
  33  
  34  if (!safe_field("name", 'txp_prefs', "name = 'log_list_pageby'")) {
  35      safe_insert('txp_prefs', "prefs_id = 1, name = 'log_list_pageby', val = '25', type = 2, event = 'publish'");
  36  }
  37  
  38  // Turn on lastmod handling, and reset the lastmod date.
  39  safe_update('txp_prefs', "val = '1'", "name = 'send_lastmod' AND prefs_id = '1'");
  40  update_lastmod();
  41  
  42  // Speed up article queries.
  43  safe_create_index('textpattern', 'Section, Status', 'section_status_idx');
  44  
  45  if (!safe_field("name", 'txp_prefs', "name = 'title_no_widow'")) {
  46      safe_insert('txp_prefs', "prefs_id = 1, name = 'title_no_widow', val = '0', type = '1', html = 'yesnoradio'");
  47  }

title

Description

title

Description

title

Description

title

title

Body