Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
225
Merge Requests
225
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
d4867346
Commit
d4867346
authored
Feb 03, 2009
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#367380
by Moshe: make block module optional.
parent
ff1e4c66
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
8 deletions
+32
-8
includes/cache.inc
includes/cache.inc
+3
-1
modules/block/block.info
modules/block/block.info
+0
-1
modules/block/block.install
modules/block/block.install
+14
-0
modules/block/block.module
modules/block/block.module
+7
-0
modules/system/system.install
modules/system/system.install
+1
-4
modules/system/system.module
modules/system/system.module
+1
-1
profiles/default/default.profile
profiles/default/default.profile
+6
-1
No files found.
includes/cache.inc
View file @
d4867346
...
...
@@ -150,7 +150,9 @@ function cache_clear_all($cid = NULL, $table = NULL, $wildcard = FALSE) {
if
(
!
isset
(
$cid
)
&&
!
isset
(
$table
))
{
// Clear the block cache first, so stale data will
// not end up in the page cache.
cache_clear_all
(
NULL
,
'cache_block'
);
if
(
module_exists
(
'block'
))
{
cache_clear_all
(
NULL
,
'cache_block'
);
}
cache_clear_all
(
NULL
,
'cache_page'
);
return
;
}
...
...
modules/block/block.info
View file @
d4867346
...
...
@@ -8,4 +8,3 @@ core = 7.x
files
[]
=
block
.
module
files
[]
=
block
.
admin
.
inc
files
[]
=
block
.
install
required
=
TRUE
modules/block/block.install
View file @
d4867346
...
...
@@ -168,6 +168,20 @@ function block_schema() {
return
$schema
;
}
/**
* Implementation of hook_install().
*/
function
block_install
()
{
drupal_install_schema
(
'block'
);
}
/**
* Implementation of hook_uninstall().
*/
function
block_uninstall
()
{
drupal_uninstall_schema
(
'block'
);
}
/**
* Refresh the block cache.
*/
...
...
modules/block/block.module
View file @
d4867346
...
...
@@ -624,3 +624,10 @@ function _block_get_cache_id($block) {
return
implode
(
':'
,
$cid_parts
);
}
}
/**
* Implementation of hook_flush_caches().
*/
function
block_flush_caches
()
{
return
array
(
'cache_block'
);
}
modules/system/system.install
View file @
d4867346
...
...
@@ -330,7 +330,7 @@ function system_install() {
}
// Create tables.
$modules
=
array
(
'system'
,
'filter'
,
'
block'
,
'
user'
,
'node'
);
$modules
=
array
(
'system'
,
'filter'
,
'user'
,
'node'
);
foreach
(
$modules
as
$module
)
{
drupal_install_schema
(
$module
);
}
...
...
@@ -369,9 +369,6 @@ function system_install() {
db_query
(
"INSERT INTO
{
variable
}
(name, value) VALUES ('%s', '%s')"
,
'theme_default'
,
's:7:"garland";'
);
db_query
(
"UPDATE
{
system
}
SET status = %d WHERE type = '%s' AND name = '%s'"
,
1
,
'theme'
,
'garland'
);
db_query
(
"INSERT INTO
{
block
}
(module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)"
,
'user'
,
'login'
,
'garland'
,
1
,
0
,
'left'
,
''
,
-
1
);
db_query
(
"INSERT INTO
{
block
}
(module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)"
,
'user'
,
'navigation'
,
'garland'
,
1
,
0
,
'left'
,
''
,
-
1
);
db_query
(
"INSERT INTO
{
block
}
(module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)"
,
'system'
,
'powered-by'
,
'garland'
,
1
,
10
,
'footer'
,
''
,
-
1
);
db_query
(
"INSERT INTO
{
node_access
}
(nid, gid, realm, grant_view, grant_update, grant_delete) VALUES (%d, %d, '%s', %d, %d, %d)"
,
0
,
0
,
'all'
,
1
,
0
,
0
);
...
...
modules/system/system.module
View file @
d4867346
...
...
@@ -1553,7 +1553,7 @@ function system_cron() {
}
}
$core
=
array
(
'cache'
,
'cache_
block'
,
'cache_
filter'
,
'cache_page'
,
'cache_form'
,
'cache_menu'
);
$core
=
array
(
'cache'
,
'cache_filter'
,
'cache_page'
,
'cache_form'
,
'cache_menu'
);
$cache_tables
=
array_merge
(
module_invoke_all
(
'flush_caches'
),
$core
);
foreach
(
$cache_tables
as
$table
)
{
cache_clear_all
(
NULL
,
$table
);
...
...
profiles/default/default.profile
View file @
d4867346
...
...
@@ -8,7 +8,7 @@
* An array of modules to enable.
*/
function
default_profile_modules
()
{
return
array
(
'color'
,
'comment'
,
'help'
,
'menu'
,
'taxonomy'
,
'dblog'
);
return
array
(
'
block'
,
'
color'
,
'comment'
,
'help'
,
'menu'
,
'taxonomy'
,
'dblog'
);
}
/**
...
...
@@ -90,6 +90,11 @@ function default_profile_task_list() {
* modify the $task, otherwise discarded.
*/
function
default_profile_tasks
(
&
$task
,
$url
)
{
// Enable 3 standard blocks.
db_query
(
"INSERT INTO
{
block
}
(module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)"
,
'user'
,
'login'
,
'garland'
,
1
,
0
,
'left'
,
''
,
-
1
);
db_query
(
"INSERT INTO
{
block
}
(module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)"
,
'user'
,
'navigation'
,
'garland'
,
1
,
0
,
'left'
,
''
,
-
1
);
db_query
(
"INSERT INTO
{
block
}
(module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)"
,
'system'
,
'powered-by'
,
'garland'
,
1
,
10
,
'footer'
,
''
,
-
1
);
// Insert default user-defined node types into the database. For a complete
// list of available node type attributes, refer to the node type API
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment