Revision 1908
Added by Luisehahne over 12 years ago
| branches/2.8.x/CHANGELOG | ||
|---|---|---|
| 11 | 11 |
! = Update/Change |
| 12 | 12 |
=============================================================================== |
| 13 | 13 |
|
| 14 |
|
|
| 15 |
07 Jun-2013 Build 1908 Dietmar Woellbrink (Luisehahne) |
|
| 16 |
! class.admin.php corrected url_help, |
|
| 17 |
add Translat::disableAddon() in methode print_footer |
|
| 18 |
! frontend.functions.php page_content() set $sSectionIdPrefix to the right format |
|
| 19 |
! functions.php change get_parent_titles from menu_title to filename |
|
| 14 | 20 |
07 Jun-2013 Build 1907 Dietmar Woellbrink (Luisehahne) |
| 15 | 21 |
! update headerinfo |
| 16 | 22 |
06 Jun-2013 Build 1906 Werner v.d.Decken(DarkViper) |
| branches/2.8.x/wb/admin/interface/version.php | ||
|---|---|---|
| 51 | 51 |
|
| 52 | 52 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
| 53 | 53 |
if(!defined('VERSION')) define('VERSION', '2.8.3');
|
| 54 |
if(!defined('REVISION')) define('REVISION', '1907');
|
|
| 54 |
if(!defined('REVISION')) define('REVISION', '1908');
|
|
| 55 | 55 |
if(!defined('SP')) define('SP', '');
|
| branches/2.8.x/wb/framework/class.admin.php | ||
|---|---|---|
| 4 | 4 |
* @category backend |
| 5 | 5 |
* @package framework |
| 6 | 6 |
* @author Ryan Djurovich (2004-2009), WebsiteBaker Project |
| 7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
| 8 |
* @link http://www.websitebaker2.org/
|
|
| 7 |
* @copyright 2009-2013, WebsiteBaker Org. e.V.
|
|
| 8 |
* @link http://www.websitebaker.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 |
*/ |
| ... | ... | |
| 202 | 202 |
'LOGIN_LINK' => $_SERVER['SCRIPT_NAME'], |
| 203 | 203 |
'LOGIN_ICON' => 'login', |
| 204 | 204 |
'START_ICON' => 'blank', |
| 205 |
'URL_HELP' => 'http://www.websitebaker2.org'.$HelpUrl,
|
|
| 205 |
'URL_HELP' => 'http://www.websitebaker.org'.$HelpUrl, |
|
| 206 | 206 |
'BACKEND_MODULE_CSS' => $this->register_backend_modfiles('css'), // adds backend.css
|
| 207 | 207 |
'BACKEND_MODULE_JS' => $this->register_backend_modfiles('js') // adds backend.js
|
| 208 | 208 |
) |
| ... | ... | |
| 294 | 294 |
// Print the admin footer |
| 295 | 295 |
function print_footer($activateJsAdmin = false) {
|
| 296 | 296 |
global $database,$starttime,$iPhpDeclaredClasses; |
| 297 |
$oTrans = Translate::getInstance(); |
|
| 298 |
$oTrans->disableAddon(); |
|
| 297 | 299 |
// include the required file for Javascript admin |
| 298 | 300 |
if($activateJsAdmin == true) {
|
| 299 | 301 |
if(file_exists(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php')){
|
| branches/2.8.x/wb/framework/frontend.functions.php | ||
|---|---|---|
| 4 | 4 |
* @category framework |
| 5 | 5 |
* @package frontend.functions |
| 6 | 6 |
* @author Ryan Djurovich, WebsiteBaker Project |
| 7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
| 8 |
* @link http://www.websitebaker2.org/
|
|
| 7 |
* @copyright 2009-2013, WebsiteBaker Org. e.V.
|
|
| 8 |
* @link http://www.websitebaker.org/
|
|
| 9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| 10 |
* @platform WebsiteBaker 2.8.x
|
|
| 10 |
* @platform WebsiteBaker 2.8.4
|
|
| 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 |
*/ |
| ... | ... | |
| 305 | 305 |
// check if module exists - feature: write in errorlog |
| 306 | 306 |
if(file_exists(WB_PATH.'/modules/'.$module.'/view.php')) {
|
| 307 | 307 |
// fetch content -- this is where to place possible output-filters (before highlighting) |
| 308 |
ob_start(); // fetch original content |
|
| 309 |
$sectionAnchor = (defined('SEC_ANCHOR') && SEC_ANCHOR!='') ? SEC_ANCHOR.$section_id : 'section_'.$section_id;
|
|
| 310 |
echo "\n".'<div id="'.$sectionAnchor.'" class="wb_'.$module.'" >'."\n";
|
|
| 308 |
ob_start(); // fetch original content<div id="Sec103" class="section m_modulename user-defined-class" >
|
|
| 309 |
$sSectionIdPrefix = (defined( 'SEC_ANCHOR' ) && SEC_ANCHOR!='') ? SEC_ANCHOR : 'Sec';
|
|
| 310 |
echo ($sSectionIdPrefix =='none') ? '' : "\n".'<div id="'.$sSectionIdPrefix.$section_id.'" class="section m_'.$module.'" >'."\n";
|
|
| 311 | 311 |
require(WB_PATH.'/modules/'.$module.'/view.php'); |
| 312 |
echo "\n".'</div><!-- '.$module.$section_id.' -->'."\n";
|
|
| 312 |
echo ($sSectionIdPrefix =='none') ? '' : "\n".'</div><!-- '.$module.$section_id.' -->'."\n";
|
|
| 313 | 313 |
$content = ob_get_clean(); |
| 314 | 314 |
} else {
|
| 315 | 315 |
continue; |
| ... | ... | |
| 330 | 330 |
} else {
|
| 331 | 331 |
require(PAGE_CONTENT); |
| 332 | 332 |
} |
| 333 |
return $retVal;
|
|
| 333 |
return $retVal;
|
|
| 334 | 334 |
|
| 335 | 335 |
} |
| 336 | 336 |
} |
| ... | ... | |
| 386 | 386 |
print $show_crumb; |
| 387 | 387 |
break; |
| 388 | 388 |
} |
| 389 |
|
|
| 390 | 389 |
if ( ( $counter <> $total_crumbs-1 ) ) |
| 391 | 390 |
{
|
| 392 | 391 |
print '<span class="separator">'.$sep.'</span>'; |
| ... | ... | |
| 626 | 625 |
} |
| 627 | 626 |
} |
| 628 | 627 |
// include the Javascript email protection function |
| 629 |
if( $file_id != 'css' && file_exists(WB_PATH .'/modules/droplets/js/mdcr.js')) |
|
| 630 |
{
|
|
| 631 |
$head_links .= '<script src="'.WB_URL.'/modules/droplets/js/mdcr.js" type="text/javascript"></script>'."\n"; |
|
| 632 |
} |
|
| 633 |
elseif( $file_id != 'css' && file_exists(WB_PATH .'/modules/output_filter/js/mdcr.js')) |
|
| 634 |
{
|
|
| 628 |
if( $file_id != 'css' && file_exists(WB_PATH .'/modules/output_filter/js/mdcr.js')) {
|
|
| 635 | 629 |
$head_links .= '<script src="'.WB_URL.'/modules/output_filter/js/mdcr.js" type="text/javascript"></script>'."\n"; |
| 636 | 630 |
} |
| 637 | 631 |
} |
| branches/2.8.x/wb/framework/functions.php | ||
|---|---|---|
| 4 | 4 |
* @category frontend |
| 5 | 5 |
* @package framework |
| 6 | 6 |
* @author Ryan Djurovich,WebsiteBaker Project |
| 7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
| 8 |
* @link http://www.websitebaker2.org/
|
|
| 7 |
* @copyright 2009-2013, WebsiteBaker Org. e.V.
|
|
| 8 |
* @link http://www.websitebaker.org/ |
|
| 9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| 10 |
* @platform WebsiteBaker 2.8.x
|
|
| 10 |
* @platform WebsiteBaker 2.8.4
|
|
| 11 | 11 |
* @requirements PHP 5.2.2 and higher |
| 12 | 12 |
* @version $Id$ |
| 13 | 13 |
* @filesource $HeadURL$ |
| ... | ... | |
| 525 | 525 |
$menu_title = $database->get_one($sql); |
| 526 | 526 |
return $menu_title; |
| 527 | 527 |
} |
| 528 |
// Function to get a pages filename in sub |
|
| 529 |
function get_sub_filename($id) |
|
| 530 |
{
|
|
| 531 |
$database = WbDatabase::getInstance(); |
|
| 532 |
// Get title |
|
| 533 |
$sql = 'SELECT `link` FROM `'.TABLE_PREFIX.'pages` ' |
|
| 534 |
.'WHERE `page_id` = '.$id.' ' |
|
| 535 |
. 'AND `level`>=0'; |
|
| 536 |
$sRetval = basename($database->get_one($sql)); |
|
| 537 |
return $sRetval; |
|
| 538 |
} |
|
| 528 | 539 |
|
| 529 | 540 |
// Function to get all parent page titles |
| 530 | 541 |
function get_parent_titles($parent_id) |
| 531 | 542 |
{
|
| 532 |
$titles[] = get_menu_title($parent_id);
|
|
| 543 |
$titles[] = get_sub_filename($parent_id);
|
|
| 533 | 544 |
if(is_parent($parent_id) != false) {
|
| 534 | 545 |
$parent_titles = get_parent_titles(is_parent($parent_id)); |
| 535 | 546 |
$titles = array_merge($titles, $parent_titles); |
| ... | ... | |
| 660 | 671 |
global $admin, $MESSAGE; |
| 661 | 672 |
$retVal = array(); |
| 662 | 673 |
$wb_path = rtrim(str_replace('\/\\', '/', WB_PATH), '/');
|
| 663 |
if( ($sAbsDir=='') || ($sAbsDir == $wb_path) ) { return $retVal;}
|
|
| 674 |
if( ($sAbsDir=='') || ($sAbsDir == $wb_path) ) { return $retVal;}
|
|
| 664 | 675 |
|
| 665 | 676 |
if ( $make_dir==true ) {
|
| 666 | 677 |
// Check to see if the folder already exists |
| ... | ... | |
| 675 | 686 |
return $retVal; |
| 676 | 687 |
} |
| 677 | 688 |
|
| 689 |
//$retVal[] = $sAbsDir; |
|
| 690 |
//return $retVal; |
|
| 691 |
|
|
| 678 | 692 |
if( is_writable($sAbsDir) ) |
| 679 | 693 |
{
|
| 680 | 694 |
// if(file_exists($sAbsDir.'/index.php')) { unlink($sAbsDir.'/index.php'); }
|
| 681 | 695 |
// Create default "index.php" file |
| 682 | 696 |
$rel_pages_dir = str_replace($wb_path, '', dirname($sAbsDir) ); |
| 683 | 697 |
$step_back = str_repeat( '../', substr_count($rel_pages_dir, '/')+1 ); |
| 684 |
|
|
| 685 | 698 |
$sResponse = $_SERVER['SERVER_PROTOCOL'].' 301 Moved Permanently'; |
| 686 | 699 |
$content = |
| 687 | 700 |
'<?php'."\n". |
| ... | ... | |
| 1387 | 1400 |
* try to remove access files and build new folder protect files |
| 1388 | 1401 |
*/ |
| 1389 | 1402 |
$sTempDir = (defined('PAGES_DIRECTORY') && (PAGES_DIRECTORY != '') ? PAGES_DIRECTORY : '');
|
| 1390 |
// if(($sTempDir!='') && is_writeable(WB_PATH.$sTempDir)==true) {
|
|
| 1391 |
// if(rm_full_dir (WB_PATH.$sTempDir, true )==false) {
|
|
| 1392 |
// $retVal[] = 'Could not delete existing access files';
|
|
| 1393 |
// }
|
|
| 1394 |
// }
|
|
| 1403 |
if(($sTempDir!='') && is_writeable(WB_PATH.$sTempDir)==true) {
|
|
| 1404 |
if(rm_full_dir (WB_PATH.$sTempDir, true )==false) {
|
|
| 1405 |
$retVal[] = 'Could not delete existing access files'; |
|
| 1406 |
} |
|
| 1407 |
} |
|
| 1395 | 1408 |
$retVal = createFolderProtectFile(rtrim( WB_PATH.PAGES_DIRECTORY,'/') ); |
| 1396 | 1409 |
/** |
| 1397 | 1410 |
* Reformat/rebuild all existing access files |
Also available in: Unified diff
! class.admin.php corrected url_help,
add Translat::disableAddon() in methode print_footer
! frontend.functions.php page_content() set $sSectionIdPrefix to the right format
! functions.php change get_parent_titles from menu_title to filename