Changeset 3030:1c346de31ad1 for inc
- Timestamp:
- 07/03/15 10:44:49 (10 years ago)
- Branch:
- default
- Location:
- inc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.core.php
r3006 r3030 1430 1430 array('use_smilies','boolean',false, 1431 1431 'Show smilies on entries and comments'), 1432 array('no_search','boolean',false, 1433 'Disable search'), 1432 1434 array('inc_subcats','boolean',false, 1433 1435 'Include sub-categories in category page and category posts feed'), -
inc/dbschema/upgrade.php
r3027 r3030 448 448 " AND setting_value = '/\\.php\$/i' "; 449 449 $core->con->execute($strReq); 450 # Some new settings should be initialized, prepare db queries 451 $strReq = 'INSERT INTO '.$core->prefix.'setting'. 452 ' (setting_id,setting_ns,setting_value,setting_type,setting_label)'. 453 ' VALUES(\'%s\',\'system\',\'%s\',\'boolean\',\'%s\')'; 454 $core->con-execute(sprintf($strReq,'no_search','0','Disable internal search system')); 450 455 } 451 456 -
inc/public/lib.urlhandlers.php
r2919 r3030 226 226 $core =& $GLOBALS['core']; 227 227 228 $core->url->type='search'; 229 230 $GLOBALS['_search'] = !empty($_GET['q']) ? rawurldecode($_GET['q']) : ''; 231 if ($GLOBALS['_search']) { 232 $params = new ArrayObject(array('search' => $GLOBALS['_search'])); 233 $core->callBehavior('publicBeforeSearchCount',$params); 234 $GLOBALS['_search_count'] = $core->blog->getPosts($params,true)->f(0); 235 } 236 237 self::serveDocument('search.html'); 228 if ($core->blog->settings->system->no_search) { 229 230 # Search is disabled for this blog. 231 self::p404(); 232 233 } else { 234 235 $core->url->type='search'; 236 237 $GLOBALS['_search'] = !empty($_GET['q']) ? rawurldecode($_GET['q']) : ''; 238 if ($GLOBALS['_search']) { 239 $params = new ArrayObject(array('search' => $GLOBALS['_search'])); 240 $core->callBehavior('publicBeforeSearchCount',$params); 241 $GLOBALS['_search_count'] = $core->blog->getPosts($params,true)->f(0); 242 } 243 244 self::serveDocument('search.html'); 245 } 238 246 } 239 247
Note: See TracChangeset
for help on using the changeset viewer.