b2evolution PHP Cross Reference Blogging Systems

Source: /inc/tools/views/_broken_slugs.view.php - 69 lines - 2241 bytes - Text - Print

Description: This file display the broken slugs that have no matching target post

   1  <?php
   2  /**
   3   * This file display the broken slugs that have no matching target post
   4   *
   5   * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.
   6   * See also {@link http://sourceforge.net/projects/evocms/}.
   7   *
   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}.
   9   * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.
  10   *
  11   * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
  12   *
  13   * @package admin
  14   *
  15   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  16   * @author efy-asimo: Attila Simo.
  17   *
  18   * @version $Id: _broken_slugs.view.php 6136 2014-03-08 07:59:48Z manuel $
  19   */
  20  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  21  
  22  memorize_param( 'action', 'string', '', 'find_broken_slugs' );
  23  
  24  $SQL = new SQL();
  25  
  26  $SQL->SELECT( 'slug_ID, slug_title, slug_itm_ID' );
  27  $SQL->FROM( 'T_slug' );
  28  $SQL->WHERE( 'slug_type = "item" AND slug_itm_ID NOT IN (SELECT post_ID FROM T_items__item )' );
  29  
  30  $Results = new Results( $SQL->get(), 'broken_slugs_' );
  31  
  32  $Results->title = T_( 'Broken item slugs with no matching item' );
  33  $Results->global_icon( T_('Cancel!'), 'close', regenerate_url( 'action' ) );
  34  
  35  $Results->cols[] = array(
  36      'th' => T_('Slug ID'),
  37      'th_class' => 'shrinkwrap',
  38      'td_class' => 'small center',
  39      'order' => 'slug_ID',
  40      'td' => '$slug_ID$',
  41  );
  42  
  43  $Results->cols[] = array(
  44      'th' => T_('Title'),
  45      'th_class' => 'nowrap',
  46      'td_class' => 'small',
  47      'order' => 'slug_title',
  48      'td' => '$slug_title$',
  49  );
  50  
  51  $Results->cols[] = array(
  52      'th' => T_('Item ID'),
  53      'th_class' => 'shrinkwrap',
  54      'td_class' => 'small center',
  55      'order' => 'slug_itm_ID',
  56      'td' => '$slug_itm_ID$',
  57  );
  58  
  59  $Results->display( array(
  60          'page_url' => regenerate_url( 'blog,ctrl,action,results_'.$Results->param_prefix.'page', 'action='.param_action().'&amp;'.url_crumb( 'tools' ) )
  61      ) );
  62  
  63  if( ( $current_User->check_perm('options', 'edit', true) ) && ( $Results->get_num_rows() ) )
  64  { // display Delete link
  65      $redirect_to = regenerate_url( 'action', 'action=del_broken_slugs&'.url_crumb( 'tools' ) );
  66      echo '<p>[<a href="'.$redirect_to.'">'.T_( 'Delete these slugs' ).'</a>]</p>';
  67  }
  68  
  69  ?>

title

Description

title

Description

title

Description

title

title

Body