Revision 1718
Added by Dietmar about 12 years ago
branches/2.8.x/CHANGELOG | ||
---|---|---|
13 | 13 |
|
14 | 14 |
|
15 | 15 |
|
16 |
29 Aug-2012 Build 1718 Dietmar Woellbrink (Luisehahne) |
|
17 |
! update headerinfo |
|
18 |
! change multi-dimensional arrays (variables) to similar arrays |
|
16 | 19 |
29 Aug-2012 Build 1717 Dietmar Woellbrink (Luisehahne) |
17 | 20 |
! update droplets uninstall, upgrade |
18 | 21 |
! add $database=WbDatabase::getInstance(); |
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', '1717');
|
|
54 |
if(!defined('REVISION')) define('REVISION', '1718');
|
|
55 | 55 |
if(!defined('SP')) define('SP', ''); |
branches/2.8.x/wb/search/search.php | ||
---|---|---|
3 | 3 |
* |
4 | 4 |
* @category frontend |
5 | 5 |
* @package search |
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
6 |
* @author yan Djurovich, WebsiteBaker Project |
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V. |
|
9 | 8 |
* @link http://www.websitebaker2.org/ |
10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
11 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
153 | 152 |
if($i++ > 0) { |
154 | 153 |
$search_path_SQL .= ' $op'; |
155 | 154 |
} |
156 |
$search_path_SQL .= " link $not LIKE '".$p."%'";
|
|
155 |
$search_path_SQL .= " link $not LIKE '".$p."%'"; |
|
157 | 156 |
} |
158 | 157 |
$search_path_SQL .= ' )'; |
159 | 158 |
} |
... | ... | |
187 | 186 |
$search_url_string = ''; // for $_GET -- ATTN: unquoted! Will become urldecoded later |
188 | 187 |
$string = ''; |
189 | 188 |
if(isset($_REQUEST['string'])) { |
190 |
if($match!='exact') { // $string will be cleaned below
|
|
189 |
if($match!='exact') { // $string will be cleaned below |
|
191 | 190 |
$string=str_replace(',', '', $_REQUEST['string']); |
192 | 191 |
} else { |
193 | 192 |
$string=$_REQUEST['string']; |
... | ... | |
357 | 356 |
continue; // there is no search_func for this module |
358 | 357 |
} |
359 | 358 |
// get each section for $module_name |
360 |
$table_s = TABLE_PREFIX."sections";
|
|
359 |
$table_s = TABLE_PREFIX."sections"; |
|
361 | 360 |
$table_p = TABLE_PREFIX."pages"; |
362 | 361 |
$sections_query = $database->query(" |
363 | 362 |
SELECT s.section_id, s.page_id, s.module, s.publ_start, s.publ_end, |
... | ... | |
622 | 621 |
if(isset($seen_pages[$module_name][$page['page_id']]) || isset($pages_listed[$page['page_id']])) { |
623 | 622 |
continue; |
624 | 623 |
} |
625 |
|
|
624 |
|
|
626 | 625 |
// don't list pages with visibility == none|deleted and check if user is allowed to see the page |
627 | 626 |
$p_table = TABLE_PREFIX."pages"; |
628 | 627 |
$viewquery = $database->query(" |
... | ... | |
654 | 653 |
} |
655 | 654 |
} |
656 | 655 |
} |
657 |
|
|
656 |
|
|
658 | 657 |
// Get page link |
659 | 658 |
$link = page_link($page['link']); |
660 | 659 |
// Add search string for highlighting |
... | ... | |
705 | 704 |
echo $search_results_footer; |
706 | 705 |
// Show search footer |
707 | 706 |
echo $search_footer; |
708 |
|
|
709 |
?> |
branches/2.8.x/wb/search/index.php | ||
---|---|---|
3 | 3 |
* |
4 | 4 |
* @category frontend |
5 | 5 |
* @package search |
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
6 |
* @author Ryan Djurovich, WebsiteBaker Project |
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V. |
|
9 | 8 |
* @link http://www.websitebaker2.org/ |
10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
11 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
19 | 18 |
// Include the config file |
20 | 19 |
require('../config.php'); |
21 | 20 |
|
21 |
$page_id = (isset($_SESSION['PAGE_ID']) && ($_SESSION['PAGE_ID']!='') ? $_SESSION['PAGE_ID'] : 0); |
|
22 |
|
|
22 | 23 |
// Required page details |
23 |
$page_id = 0; |
|
24 | 24 |
$page_description = ''; |
25 | 25 |
$page_keywords = ''; |
26 |
define('PAGE_ID', 0);
|
|
26 |
define('PAGE_ID', $page_id);
|
|
27 | 27 |
define('ROOT_PARENT', 0); |
28 | 28 |
define('PARENT', 0); |
29 | 29 |
define('LEVEL', 0); |
... | ... | |
52 | 52 |
|
53 | 53 |
// Include index (wrapper) file |
54 | 54 |
require(WB_PATH.'/index.php'); |
55 |
|
|
56 |
?> |
branches/2.8.x/wb/modules/captcha_control/install.php | ||
---|---|---|
4 | 4 |
* @category modules |
5 | 5 |
* @package captcha_control |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
20 | 20 |
if(defined('WB_PATH') == false) |
21 | 21 |
{ |
22 | 22 |
// Stop this file being access directly |
23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
23 |
die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
|
|
24 | 24 |
} |
25 | 25 |
/* -------------------------------------------------------- */ |
26 | 26 |
|
branches/2.8.x/wb/modules/news/modify.php | ||
---|---|---|
4 | 4 |
* @category modules |
5 | 5 |
* @package news |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
20 | 20 |
if(defined('WB_PATH') == false) |
21 | 21 |
{ |
22 | 22 |
// Stop this file being access directly |
23 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
23 |
die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
|
|
24 | 24 |
} |
25 | 25 |
/* -------------------------------------------------------- */ |
26 |
// fixed escaping malformed URI reference |
|
27 |
$TEXT['ARE_YOU_SURE'] = str_replace(' ','%20',$TEXT['ARE_YOU_SURE']); |
|
28 |
$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_posts WHERE page_id = '$page_id' and section_id = '$section_id' and title=''"); |
|
29 |
$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_groups WHERE page_id = '$page_id' and section_id = '$section_id' and title=''"); |
|
26 | 30 |
|
27 |
$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_posts WHERE page_id = '$page_id' and section_id = '$section_id' and title=''"); |
|
28 |
$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_groups WHERE page_id = '$page_id' and section_id = '$section_id' and title=''"); |
|
29 |
|
|
30 | 31 |
//overwrite php.ini on Apache servers for valid SESSION ID Separator |
31 | 32 |
if(function_exists('ini_set')) { |
32 | 33 |
ini_set('arg_separator.output', '&'); |
... | ... | |
129 | 130 |
<?php } ?> |
130 | 131 |
</td> |
131 | 132 |
<td width="20"> |
132 |
<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/news/delete_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $pid; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
|
|
133 |
<a href="javascript:confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>','<?php echo WB_URL; ?>/modules/news/delete_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $pid; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
|
|
133 | 134 |
<img src="<?php echo THEME_URL; ?>/images/delete_16.png" border="0" alt="X" /> |
134 | 135 |
</a> |
135 | 136 |
</td> |
... | ... | |
171 | 172 |
<a href="<?php echo WB_URL; ?>/modules/news/modify_group.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&group_id=<?php echo $gid; ?>" title="<?php echo $TEXT['MODIFY']; ?>"> |
172 | 173 |
<img src="<?php echo THEME_URL; ?>/images/modify_16.png" border="0" alt="Modify - " /> |
173 | 174 |
</a> |
174 |
</td>
|
|
175 |
</td> |
|
175 | 176 |
<td width="50" style="text-align: right;"> |
176 | 177 |
<?php echo $group['group_id'] ?> |
177 | 178 |
</td> |
branches/2.8.x/wb/modules/admin.php | ||
---|---|---|
4 | 4 |
* @category backend |
5 | 5 |
* @package modules |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2009-2010, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V.
|
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
13 | 13 |
* @filesource $HeadURL$ |
14 | 14 |
* @lastmodified $Date$ |
15 | 15 |
* |
16 |
*/ |
|
16 |
*/
|
|
17 | 17 |
|
18 | 18 |
// Stop this file being access directly |
19 | 19 |
if(defined('WB_PATH') == false) |
20 | 20 |
{ |
21 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
21 |
die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
|
|
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
// Get page id |
... | ... | |
53 | 53 |
// Get perms |
54 | 54 |
// unset($admin_header); |
55 | 55 |
|
56 |
$page = $admin->get_page_details($page_id,ADMIN_URL.'/pages/index.php' ); |
|
56 |
$page = $admin->get_page_details($page_id, ADMIN_URL.'/pages/index.php' );
|
|
57 | 57 |
|
58 | 58 |
$old_admin_groups = explode(',', str_replace('_', '', $page['admin_groups'])); |
59 | 59 |
$old_admin_users = explode(',', str_replace('_', '', $page['admin_users'])); |
... | ... | |
68 | 68 |
if((!$in_group) && !is_numeric(array_search($admin->get_user_id(), $old_admin_users))) { |
69 | 69 |
print $admin->get_group_id().$admin->get_user_id(); |
70 | 70 |
// print_r ($old_admin_groups); |
71 |
$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
|
|
71 |
$admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
|
|
72 | 72 |
} |
73 | 73 |
|
74 | 74 |
// some additional security checks: |
... | ... | |
77 | 77 |
$section = $admin->get_section_details($section_id,ADMIN_URL.'/pages/index.php'); |
78 | 78 |
if (!$admin->get_permission($section['module'], 'module')) |
79 | 79 |
{ |
80 |
$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
|
|
80 |
$admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
|
|
81 | 81 |
} |
82 | 82 |
} |
83 | 83 |
|
... | ... | |
97 | 97 |
|
98 | 98 |
// Setup template object, parse vars to it, then parse it |
99 | 99 |
// Create new template object |
100 |
$template = new Template(dirname($admin->correct_theme_source('pages_modify.htt'))); |
|
100 |
$template = new Template(dirname($admin->correct_theme_source('pages_modify.htt')),'keep');
|
|
101 | 101 |
// $template->debug = true; |
102 | 102 |
$template->set_file('page', 'pages_modify.htt'); |
103 | 103 |
$template->set_block('page', 'main_block', 'main'); |
... | ... | |
116 | 116 |
|
117 | 117 |
$template->set_var(array( |
118 | 118 |
'MODIFIED_BY' => $user['display_name'], |
119 |
'TEXT_LAST_MODIFIED' => $TEXT['LAST_UPDATED_BY'], |
|
119 | 120 |
'MODIFIED_BY_USERNAME' => $user['username'], |
120 | 121 |
'MODIFIED_WHEN' => $modified_ts, |
121 |
'LAST_MODIFIED' => $MESSAGE['PAGES']['LAST_MODIFIED'], |
|
122 |
)); |
|
122 |
'LAST_MODIFIED' => $MESSAGE['PAGES_LAST_MODIFIED'], |
|
123 |
'TEXT_MANAGE_SECTIONS' => $HEADING['MANAGE_SECTIONS'] |
|
124 |
)); |
|
123 | 125 |
|
124 | 126 |
$template->set_block('main_block', 'show_modify_block', 'show_modify'); |
125 | 127 |
if($modified_ts == 'Unknown') |
... | ... | |
133 | 135 |
} |
134 | 136 |
|
135 | 137 |
// Work-out if we should show the "manage sections" link |
136 |
$sql = 'SELECT `section_id` FROM `'.TABLE_PREFIX.'sections` WHERE `page_id` = '.(int)$page_id.' '; |
|
137 |
$sql .= 'AND `module` = "menu_link"'; |
|
138 |
$query_sections = $database->query($sql); |
|
138 |
// $sql = 'SELECT `section_id` FROM `'.TABLE_PREFIX.'sections` WHERE `page_id` = '.(int)$page_id.' '; |
|
139 |
// $sql .= 'AND `module` = "menu_link"'; |
|
140 |
// $query_sections = $database->query($sql); |
|
141 |
/*-- workout if we should show the "manage sections" link ------------------------------*/ |
|
142 |
$sql = 'SELECT COUNT(*) FROM `'.TABLE_PREFIX.'sections` ' |
|
143 |
. 'WHERE `page_id`='.$page_id.' AND `module`=\'menu_link\''; |
|
144 |
$bIsMenuLink = (intval($database->get_one($sql)) != 0); |
|
145 |
// if(!$bIsMenuLink && (MANAGE_SECTIONS == true) && $admin->get_permission('pages_add') ) |
|
146 |
if((MANAGE_SECTIONS == true) && $admin->get_permission('pages_add') ) |
|
147 |
{ |
|
148 |
$template->set_var(array( |
|
149 |
'SECTIONS_LINK_BEFORE' => '<a href="'.ADMIN_URL.'/pages/sections.php?page_id='.$page['page_id'].'">', |
|
150 |
'SECTIONS_LINK_AFTER' => '</a>', |
|
151 |
'DISPLAY_MANAGE_SECTIONS' => 'link', |
|
152 |
)); |
|
153 |
}else { |
|
154 |
// $oTpl->set_block('show_manage_sections', ''); |
|
155 |
$template->set_var(array( |
|
156 |
'SECTIONS_LINK_BEFORE' => '<span class="bold grey">', |
|
157 |
'SECTIONS_LINK_AFTER' => '</span>', |
|
158 |
'DISPLAY_MANAGE_SECTIONS' => 'link', |
|
159 |
)); |
|
160 |
} |
|
139 | 161 |
|
162 |
if( $admin->get_permission('pages_settings') ) |
|
163 |
{ |
|
164 |
$template->set_var(array( |
|
165 |
'SETTINGS_LINK_BEFORE' => '<a href="'.ADMIN_URL.'/pages/settings.php?page_id='.$page['page_id'].'">', |
|
166 |
'SETTINGS_LINK_AFTER' => '</a>', |
|
167 |
'DISPLAY_MANAGE_SETTINGS' => 'link', |
|
168 |
)); |
|
169 |
} else { |
|
170 |
$template->set_var(array( |
|
171 |
'SETTINGS_LINK_BEFORE' => '<span class="bold grey">', |
|
172 |
'SETTINGS_LINK_AFTER' => '</span>', |
|
173 |
'DISPLAY_MANAGE_SECTIONS' => 'link', |
|
174 |
)); |
|
175 |
} |
|
176 |
/* |
|
140 | 177 |
$template->set_block('main_block', 'show_section_block', 'show_section'); |
141 | 178 |
if($query_sections->numRows() > 0) |
142 | 179 |
{ |
... | ... | |
154 | 191 |
$template->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;'); |
155 | 192 |
|
156 | 193 |
} |
157 |
|
|
194 |
*/ |
|
158 | 195 |
// Insert language TEXT |
159 | 196 |
$template->set_var(array( |
160 | 197 |
'TEXT_CURRENT_PAGE' => $TEXT['CURRENT_PAGE'], |
... | ... | |
173 | 210 |
{ |
174 | 211 |
$block_name = htmlentities(strip_tags($block[$section['block']])); |
175 | 212 |
} else { |
176 |
if ($section['block'] == 1) |
|
177 |
{ |
|
213 |
if ($section['block'] == 1) { |
|
178 | 214 |
$block_name = $TEXT['MAIN']; |
179 | 215 |
} else { |
180 | 216 |
$block_name = '#' . (int) $section['block']; |
... | ... | |
182 | 218 |
} |
183 | 219 |
|
184 | 220 |
$sec_anchor = (defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' ) ? 'id="'.SEC_ANCHOR.$section['section_id'].'"' : ''); |
185 |
print '<div class="section-info" '.$sec_anchor.' ><b>' . $TEXT['BLOCK'] . ': </b>' . $block_name;
|
|
221 |
print '<div class="section-info" ><b>' . $TEXT['BLOCK'] . ': </b>' . $block_name; |
|
186 | 222 |
print '<b> Modul: </b>' . $section['module']." "; |
187 |
print '<b> ID: </b>' . $section_id."</div>\n";
|
|
223 |
print '<b> ID: </b><a' . $section_id."></a></div>\n";
|
|
188 | 224 |
} |
189 | 225 |
|
190 | 226 |
} // |
Also available in: Unified diff
! update headerinfo
! change multi-dimensional arrays (variables) to similar arrays