Project

General

Profile

« Previous | Next » 

Revision 1843

Added by Dietmar over 11 years ago

! trash only will be shown if more than one section exists
! In the server settings the renaming of the page_directory is only possible, if no page exists

View differences:

sections.php
5 5
 * @package         pages
6 6
 * @author          Ryan Djurovich, WebsiteBaker Project
7 7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8
 * @link			http://www.websitebaker2.org/
8
 * @link            http://www.websitebaker2.org/
9 9
 * @license         http://www.gnu.org/licenses/gpl.html
10 10
 * @platform        WebsiteBaker 2.8.x
11 11
 * @requirements    PHP 5.2.2 and higher
12 12
 * @version         $Id$
13
 * @filesource		$HeadURL$
13
 * @filesource      $HeadURL$
14 14
 * @lastmodified    $Date$
15 15
 *
16 16
 */
......
308 308
						'MODIFY_LINK' => ADMIN_URL.'/pages/modify.php?page_id='.$results_array['page_id']
309 309
						)
310 310
					);
311
// setting trash only if more than one section exists
312
		$tpl->set_block('section_block', 'delete_block', 'delete');
313
		if( $bSectionCanDelete = ($database->get_one('SELECT COUNT(*) FROM `'.TABLE_PREFIX.'sections` WHERE `page_id`='.$page_id))!=1 ) {
314
		}
311 315

  
312 316
		$sql  = 'SELECT `section_id`,`module`,`position`,`block`,`publ_start`,`publ_end` ';
313 317
		$sql .= 'FROM `'.TABLE_PREFIX.'sections` ';
......
444 448
									)
445 449
								);
446 450
					}
451

  
447 452
				} else {
448 453
				  continue;
449 454
				}
......
471 476
									)
472 477
								);
473 478
				}
479
				if($bSectionCanDelete) {
480
					$tpl->parse('delete', 'delete_block', false);
481
				} else {
482
					$tpl->parse('delete', '', false);
483
				} 
474 484
				$tpl->parse('section_list', 'section_block', true);
475 485
			}
486

  
476 487
		}
477 488

  
478 489
		// now add the calendars -- remember to to set the range to [1970, 2037] if the date is used as timestamp!

Also available in: Unified diff