Revision 2029
Added by darkviper almost 11 years ago
branches/2.8.x/CHANGELOG | ||
---|---|---|
11 | 11 |
! = Update/Change |
12 | 12 |
=============================================================================== |
13 | 13 |
|
14 |
14 Dec-2013 Build 2029 Manuela v.d.Decken(DarkViper) |
|
15 |
! initialize.php now blocking PHP-versions <5.3.2 and PHP with magic_quotes enabled |
|
16 |
! droplets some new/recoded droplets added, some old ones removed |
|
14 | 17 |
14 Dec-2013 Build 2028 Dietmar Woellbrink (Luisehahne) |
15 | 18 |
# /modules/news/save_posts.php::title rename fix |
16 | 19 |
08 Dec-2013 Build 2027 Manuela 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', '2028');
|
|
54 |
if(!defined('REVISION')) define('REVISION', '2029');
|
|
55 | 55 |
if(!defined('SP')) define('SP', ''); |
branches/2.8.x/wb/framework/initialize.php | ||
---|---|---|
205 | 205 |
$starttime = array_sum(explode(" ",microtime())); |
206 | 206 |
$iPhpDeclaredClasses = sizeof(get_declared_classes()); |
207 | 207 |
$sDbConnectType = 'url'; // depending from class WbDatabase it can be 'url' or 'dsn' |
208 |
// PHP less then 5.3.2 is prohibited --- |
|
209 |
if (version_compare(PHP_VERSION, '5.3.2', '<')) { |
|
210 |
$sMsg = '<p style="color: #ff0000;">WebsiteBaker is not able to run with PHP-Version less then 5.3.2!!<br />' |
|
211 |
. 'Please change your PHP-Version to any kind from 5.3.2 and up!<br />' |
|
212 |
. 'If you have problems to solve that, ask your hosting provider for it.<br />' |
|
213 |
. 'The very best solution is the use of PHP-5.4 and up</p>'; |
|
214 |
die($sMsg); |
|
215 |
} |
|
208 | 216 |
// disable all kind of magic_quotes in PHP versions before 5.4 --- |
209 |
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
|
|
217 |
if (function_exists('get_magic_quotes_gpc') && filter_var(get_magic_quotes_gpc(), FILTER_VALIDATE_BOOLEAN)) {
|
|
210 | 218 |
$sMsg = '<p style="color: #ff0000;">WebsiteBaker is not able to run with magic_quotes=on!!<br />' |
211 | 219 |
. 'Please change your PHP-ini or add a _htaccess file to switch this setting to off!<br />' |
212 | 220 |
. 'If you have problems to solve that, ask your hosting provider for it.<br />' |
... | ... | |
223 | 231 |
if(!class_exists('WbAutoloader')){ |
224 | 232 |
include($sTmp); |
225 | 233 |
} |
226 |
WbAutoloader::doRegister(array(ADMIN_DIRECTORY=>'a', 'modules'=>'m')); |
|
234 |
WbAutoloader::doRegister(array(ADMIN_DIRECTORY=>'a', 'modules'=>'m', 'templates'=>'t', 'include'=>'i'));
|
|
227 | 235 |
// instantiate and initialize adaptor for temporary registry replacement --- |
228 | 236 |
WbAdaptor::getInstance()->getWbConstants(); |
229 | 237 |
// register TWIG autoloader --- |
branches/2.8.x/wb/modules/droplets/example/EditThisPage.php | ||
---|---|---|
1 |
//:Puts a EditThisPage link on your page, if you have the rights |
|
2 |
//:Use [[EditThisPage]] |
|
3 |
|
|
4 |
global $page_id, $HEADING; |
|
5 |
$retVal = ''; |
|
6 |
$wb = new admin ('Start', 'start', false, false); |
|
7 |
if (FRONTEND_LOGIN == true && is_numeric($wb->get_session('USER_ID'))) |
|
8 |
{ |
|
9 |
|
|
10 |
if( $wb->get_permission('pages_modify') && $wb->get_page_permission( PAGE_ID ) ) |
|
11 |
{ |
|
12 |
$retVal .= '<div class="page-modify">'."\n"; |
|
13 |
$retVal .= '<a target="_blank" href="'.ADMIN_URL.'/pages/modify.php?page_id='.PAGE_ID.'" title="'.$HEADING['MODIFY_PAGE'].'" class="blank_target">'; |
|
14 |
$retVal .= '<img src="'.ADMIN_URL . '/images/modify_16.png" alt="'.$HEADING['MODIFY_PAGE'].'" />'; |
|
15 |
$retVal .= '<span>'.$HEADING['MODIFY_PAGE'].'</span>'; |
|
16 |
$retVal .= '</a>'; |
|
17 |
$retVal .= '</div>'."\n"; |
|
18 |
} |
|
19 |
} |
|
20 |
return $retVal; |
|
21 | 0 |
branches/2.8.x/wb/modules/droplets/example/iEditThisPage.php | ||
---|---|---|
1 |
//:Puts Edit-Buttons on every page you have rights for. 1=modify page, 2=modify pagesettings, 4=modify sections, or add values to combine buttons. |
|
2 |
//:Use: [[iEditThisPage?show=7]]. You can format the appearance using CSS-class 'div.iEditThisPage' in your basic-css file |
|
3 |
// @author: Werner von der Decken |
|
4 |
|
|
5 |
global $wb, $database, $HEADING; |
|
6 |
$returnvalue = ''; |
|
7 |
if($wb->is_authenticated() ) |
|
8 |
{ |
|
9 |
$is_admin = false; |
|
10 |
$page_id = PAGE_ID == 0 ? $wb->default_page_id : PAGE_ID; |
|
11 |
$user_id = $wb->get_user_id(); |
|
12 |
$sql = 'SELECT `admin_users`, `admin_groups` FROM `'.TABLE_PREFIX.'pages` WHERE `page_id` = '.$page_id; |
|
13 |
if(($rset = $database->query($sql)) != null) |
|
14 |
{ |
|
15 |
if(($rec = $rset->fetchRow()) != null) |
|
16 |
{ |
|
17 |
$is_admin = ($wb->ami_group_member($rec['admin_groups']) || |
|
18 |
($this->is_group_match($user_id, $rec['admin_users'])) ); |
|
19 |
} |
|
20 |
} |
|
21 |
if($is_admin) |
|
22 |
{ |
|
23 |
$tpl = '<a href="'.ADMIN_URL.'/pages/%1$s.php?page_id='.$page_id.'" target="_blank" title="%2$s">'; |
|
24 |
$tpl .= '<img src="'.THEME_URL.'/images/%3$s_16.png" alt="%2$s" /></a>'; |
|
25 |
$show = ((!isset($show) || $show == '') ? 1 : (int)$show); |
|
26 |
$show = ($show > 7 ? 7 : (int)$show); |
|
27 |
$show = ($show < 2 ? 1 : (int)$show ); |
|
28 |
if($show & 1) |
|
29 |
{ |
|
30 |
$returnvalue .= sprintf($tpl, 'modify', $HEADING['MODIFY_PAGE'], 'edit'); |
|
31 |
} |
|
32 |
$sys_perm = $wb->get_session('SYSTEM_PERMISSIONS'); |
|
33 |
if(@is_array($sys_perm)) |
|
34 |
{ |
|
35 |
if(($show & 2) && (array_search('pages_settings', $sys_perm)!==false)) |
|
36 |
{ |
|
37 |
$returnvalue .= sprintf($tpl, 'settings', $HEADING['MODIFY_PAGE_SETTINGS'], 'modify'); |
|
38 |
} |
|
39 |
if(($show & 4) && (array_search('pages_modify', $sys_perm)!==false)) |
|
40 |
{ |
|
41 |
$returnvalue .= sprintf($tpl, 'sections', $HEADING['MANAGE_SECTIONS'], 'sections'); |
|
42 |
} |
|
43 |
} |
|
44 |
if($returnvalue != '') |
|
45 |
{ |
|
46 |
$returnvalue = '<div class="iEditThisPage">'.$returnvalue.'</div>'; |
|
47 |
} |
|
48 |
} |
|
49 |
} |
|
50 |
return($returnvalue == '' ? true : $returnvalue); |
Also available in: Unified diff
! initialize.php now blocking PHP-versions <5.3.2 and PHP with magic_quotes enabled
! droplets some new/recoded droplets added, some old ones removed