Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
92a8adea
Commit
92a8adea
authored
Dec 30, 2008
by
Dries Buytaert
Browse files
- Patch
#352470
by scor: fixed typos and grammar in comments.
parent
cac5dd8a
Changes
62
Hide whitespace changes
Inline
Side-by-side
includes/bootstrap.inc
View file @
92a8adea
...
...
@@ -1191,7 +1191,7 @@ function drupal_maintenance_theme() {
}
/**
* Return the name of the locali
s
ation function. Use in code that needs to
* Return the name of the locali
z
ation function. Use in code that needs to
* run both during installation and normal operation.
*/
function
get_t
()
{
...
...
includes/common.inc
View file @
92a8adea
...
...
@@ -1900,7 +1900,7 @@ function drupal_eval($code) {
$old_theme_path
=
$theme_path
;
// Restore theme_path to the theme, as long as drupal_eval() executes,
// so code evaluted will not see the caller module as the current theme.
// so code evalu
a
ted will not see the caller module as the current theme.
// If theme info is not initialized get the path from theme_default.
if
(
!
isset
(
$theme_info
))
{
$theme_path
=
drupal_get_path
(
'theme'
,
$conf
[
'theme_default'
]);
...
...
@@ -2650,7 +2650,7 @@ function drupal_get_js($scope = 'header', $javascript = NULL) {
*
* Please note that this function should be called from the theme layer, such as
* in a .tpl.php file, theme_ function, or in a template_preprocess function,
* not in a form declartion. Though the same JavaScript could be added to the
* not in a form declar
a
tion. Though the same JavaScript could be added to the
* page using drupal_add_js() directly, this function helps keep template files
* clean and readable. It also prevents tabledrag.js from being added twice
* accidentally.
...
...
includes/database/database.inc
View file @
92a8adea
...
...
@@ -288,7 +288,7 @@ function __construct($dsn, $username, $password, $driver_options = array()) {
*
* throw_exception - By default, the database system will catch any errors
* on a query as an Exception, log it, and then rethrow it so that code
* further up the call chain can take an appropriate action. To supress
* further up the call chain can take an appropriate action. To sup
p
ress
* that behavior and simply return NULL on failure, set this option to FALSE.
*
* @return
...
...
@@ -1950,7 +1950,7 @@ function db_type_placeholder($type) {
return
'\'%s\''
;
case
'numeric'
:
// Numeric values are arbitrary precision numbers. Syntacically, numerics
// Numeric values are arbitrary precision numbers. Syntac
t
ically, numerics
// should be specified directly in SQL. However, without single quotes
// the %s placeholder does not protect against non-numeric characters such
// as spaces which would expose us to SQL injection.
...
...
@@ -2304,7 +2304,7 @@ function _db_query_process_args($query, $args, $options) {
$options
[
'target'
]
=
'default'
;
}
// Temporary backward-compatib
l
iity hacks. Remove later.
// Temporary backward-compatibi
l
ity hacks. Remove later.
$old_query
=
$query
;
$query
=
str_replace
(
array
(
'%n'
,
'%d'
,
'%f'
,
'%b'
,
"'%s'"
,
'%s'
),
'?'
,
$old_query
);
if
(
$old_query
!==
$query
)
{
...
...
includes/database/select.inc
View file @
92a8adea
...
...
@@ -407,7 +407,7 @@ public function fields($table_alias, array $fields = array()) {
* Adds an expression to the list of "fields" to be SELECTed.
*
* An expression can be any arbitrary string that is valid SQL. That includes
* various functions, which may in some cases be database-depend
a
nt. This
* various functions, which may in some cases be database-depend
e
nt. This
* method makes no effort to correct for database-specific functions.
*
* @param $expression
...
...
@@ -559,7 +559,7 @@ public function rightJoin($table, $alias = NULL, $condition = NULL, $arguments =
* insert should be passed in the 4th parameter. For the first table joined
* on a query, this value is ignored as the first table is taken as the base
* table.
* @param $argments
* @param $arg
u
ments
* An array of arguments to replace into the $condition of this join.
* @return
* The unique alias that was assigned for this table.
...
...
includes/file.inc
View file @
92a8adea
...
...
@@ -747,7 +747,7 @@ function file_unmanaged_delete($path) {
if
(
is_file
(
$path
))
{
return
unlink
(
$path
);
}
// Return TRUE for non-exist
a
nt file, but log that nothing was actually
// Return TRUE for non-exist
e
nt file, but log that nothing was actually
// deleted, as the current state is the indended result.
if
(
!
file_exists
(
$path
))
{
watchdog
(
'file'
,
'The file %path was not deleted, because it does not exist.'
,
array
(
'%path'
=>
$path
),
WATCHDOG_NOTICE
);
...
...
includes/form.inc
View file @
92a8adea
...
...
@@ -48,7 +48,7 @@
/**
* Retrieves a form from a constructor function, or from the cache if
* the form was built in a previous page-load. The form is then passe
se
d
* the form was built in a previous page-load. The form is then passed
* on for processing, after and rendered for display if necessary.
*
* @param $form_id
...
...
@@ -399,7 +399,7 @@ function drupal_process_form($form_id, &$form, &$form_state) {
// form_clean_id() maintains a cache of element IDs it has seen,
// so it can prevent duplicates. We want to be sure we reset that
// cache when a form is processed, so scen
e
rios that result in
// cache when a form is processed, so scen
a
rios that result in
// the form being built behind the scenes and again for the
// browser don't increment all the element IDs needlessly.
form_clean_id
(
NULL
,
TRUE
);
...
...
@@ -422,7 +422,7 @@ function drupal_process_form($form_id, &$form, &$form_state) {
// drupal_execute).
if
(
$batch
=&
batch_get
()
&&
!
isset
(
$batch
[
'current_set'
]))
{
// The batch uses its own copies of $form and $form_state for
// late execution of submit handers and post-batch redirection.
// late execution of submit hand
l
ers and post-batch redirection.
$batch
[
'form'
]
=
$form
;
$batch
[
'form_state'
]
=
$form_state
;
$batch
[
'progressive'
]
=
!
$form
[
'#programmed'
];
...
...
@@ -929,7 +929,7 @@ function form_builder($form_id, $form, &$form_state) {
// Internet Explorer button-click scenario.
_form_builder_ie_cleanup
(
$form
,
$form_state
);
// We shoud keep the buttons array until the IE clean up function
// We shou
l
d keep the buttons array until the IE clean up function
// has recognized the submit button so the form has been marked
// as submitted. If we already know which button was submitted,
// we don't need the array.
...
...
@@ -1881,7 +1881,7 @@ function form_process_ahah($element) {
// submission via pressing the enter key triggers a click event on
// submit inputs, inappropriately triggering AHAH behaviors.
$element
[
'#ahah'
][
'event'
]
=
'mousedown'
;
// Attach an additional event handler so that AHAH behavio
u
rs
// Attach an additional event handler so that AHAH behaviors
// can be triggered still via keyboard input.
$element
[
'#ahah'
][
'keypress'
]
=
TRUE
;
break
;
...
...
includes/image.inc
View file @
92a8adea
...
...
@@ -234,7 +234,7 @@ function image_resize($source, $destination, $width, $height) {
* @param $degrees
* The number of (clockwise) degrees to rotate the image.
* @param $background
* An hex
i
decimal integer specifying the background color to use for the
* An hex
a
decimal integer specifying the background color to use for the
* uncovered area of the image after the rotation. E.g. 0x000000 for black,
* 0xff00ff for magenta, and 0xffffff for white.
* @return
...
...
includes/install.inc
View file @
92a8adea
...
...
@@ -226,7 +226,7 @@ function drupal_detect_database_types() {
}
}
// Usability: uncondition
n
ally put the MySQL driver on top.
// Usability: unconditionally put the MySQL driver on top.
if
(
isset
(
$databases
[
'mysql'
]))
{
$mysql_database
=
$databases
[
'mysql'
];
unset
(
$databases
[
'mysql'
]);
...
...
includes/language.inc
View file @
92a8adea
...
...
@@ -99,7 +99,7 @@ function language_from_browser() {
}
/**
* Rewrite URL
'
s with language based prefix. Parameters are the same
* Rewrite URLs with language based prefix. Parameters are the same
* as those of the url() function.
*/
function
language_url_rewrite
(
&
$path
,
&
$options
)
{
...
...
includes/mail.inc
View file @
92a8adea
...
...
@@ -188,7 +188,7 @@ function drupal_mail_send($message) {
// They will appear correctly in the actual e-mail that is sent.
str_replace
(
"
\r
"
,
''
,
$message
[
'body'
]),
// For headers, PHP's API suggests that we use CRLF normally,
// but some MTAs incorrecly replace LF with CRLF. See #234403.
// but some MTAs incorrec
t
ly replace LF with CRLF. See #234403.
join
(
"
\n
"
,
$mimeheaders
)
);
}
...
...
includes/menu.inc
View file @
92a8adea
...
...
@@ -444,7 +444,7 @@ function _menu_load_objects(&$item, &$map) {
foreach
(
$args
as
$i
=>
$arg
)
{
if
(
$arg
===
'%index'
)
{
// Pass on argument index to the load function, so multiple
// occur
a
nces of the same placeholder can be identified.
// occur
re
nces of the same placeholder can be identified.
$args
[
$i
]
=
$index
;
}
if
(
$arg
===
'%map'
)
{
...
...
@@ -734,7 +734,7 @@ function _menu_link_translate(&$item) {
* infinite recursion.
*
* @param $type
* Type of the object. These appear in hook_menu definitons as %type. Core
* Type of the object. These appear in hook_menu definit
i
ons as %type. Core
* provides aggregator_feed, aggregator_category, contact, filter_format,
* forum_term, menu, menu_link, node, taxonomy_vocabulary, user. See the
* relevant {$type}_load function for more on each. Defaults to node.
...
...
@@ -2185,7 +2185,7 @@ function _menu_clear_page_cache() {
static
$cache_cleared
=
0
;
// Clear the page and block caches, but at most twice, including at
// the end of the page load when there are multple links saved or deleted.
// the end of the page load when there are mult
i
ple links saved or deleted.
if
(
empty
(
$cache_cleared
))
{
cache_clear_all
();
// Keep track of which menus have expanded items.
...
...
includes/theme.inc
View file @
92a8adea
...
...
@@ -1379,7 +1379,7 @@ function theme_table($header, $rows, $attributes = array(), $caption = NULL, $co
// Format the table header:
if
(
count
(
$header
))
{
$ts
=
tablesort_init
(
$header
);
// HTML requires that the thead tag has tr tags in it follwed by tbody
// HTML requires that the thead tag has tr tags in it foll
o
wed by tbody
// tags. Using ternary operator to check and see if we have any rows.
$output
.
=
(
count
(
$rows
)
?
' <thead><tr>'
:
' <tr>'
);
foreach
(
$header
as
$cell
)
{
...
...
@@ -1816,7 +1816,7 @@ function template_preprocess(&$variables, $hook) {
* based on the current path.
*
* Any changes to variables in this preprocessor should also be changed inside
* template_preprocess_maintenance_page() to keep all them consistent.
* template_preprocess_maintenance_page() to keep all
of
them consistent.
*
* The $variables array contains the following arguments:
* - $content
...
...
misc/tabledrag.js
View file @
92a8adea
...
...
@@ -357,7 +357,7 @@ Drupal.tableDrag.prototype.makeDraggable = function(item) {
});
// Compatibility addition, return false on keypress to prevent unwanted scrolling.
// IE and Safari will supress scrolling on keydown, but all other browsers
// IE and Safari will sup
p
ress scrolling on keydown, but all other browsers
// need to return false on keypress. http://www.quirksmode.org/js/keys.html
handle
.
keypress
(
function
(
event
)
{
switch
(
event
.
keyCode
)
{
...
...
@@ -592,7 +592,7 @@ Drupal.tableDrag.prototype.findDropTargetRow = function(x, y) {
Drupal
.
tableDrag
.
prototype
.
updateFields
=
function
(
changedRow
)
{
for
(
var
group
in
this
.
tableSettings
)
{
// Each group may have a different setting for relationship, so we find
// the source rows for each sep
e
rately.
// the source rows for each sep
a
rately.
this
.
updateField
(
changedRow
,
group
);
}
};
...
...
@@ -653,7 +653,7 @@ Drupal.tableDrag.prototype.updateField = function(changedRow, group) {
// Otherwise we went all the way to the left of the table without finding
// a parent, meaning this item has been placed at the root level.
else
{
// Use the first row in the table as source, because it's garanteed to
// Use the first row in the table as source, because it's g
u
aranteed to
// be at the root level. Find the first item, then compare this row
// against it as a sibling.
sourceRow
=
$
(
'
tr.draggable:first
'
).
get
(
0
);
...
...
@@ -775,7 +775,7 @@ Drupal.tableDrag.prototype.setScroll = function(scrollAmount) {
};
Drupal
.
tableDrag
.
prototype
.
restripeTable
=
function
()
{
// :even and :odd are reversed because j
q
uery counts from 0 and
// :even and :odd are reversed because j
Q
uery counts from 0 and
// we count from 1, so we're out of sync.
$
(
'
tr.draggable
'
,
this
.
table
)
.
filter
(
'
:odd
'
).
filter
(
'
.odd
'
)
...
...
@@ -1019,7 +1019,7 @@ Drupal.tableDrag.prototype.row.prototype.findSiblings = function(rowSettings) {
// Check that the sibling contains a similar target field.
if
(
$
(
'
.
'
+
rowSettings
.
target
,
checkRow
))
{
// Either add immediately if this is a flat table, or check to ensure
// that this row has the same level of indenta
i
ton.
// that this row has the same level of indentat
i
on.
if
(
this
.
indentEnabled
)
{
var
checkRowIndentation
=
$
(
'
.indentation
'
,
checkRow
).
length
}
...
...
misc/tableheader.js
View file @
92a8adea
...
...
@@ -29,7 +29,7 @@ Drupal.behaviors.tableHeader = {
// Store parent table.
var
table
=
$
(
this
).
parent
(
'
table
'
)[
0
];
headerClone
.
table
=
table
;
// Finish initialzing header positioning.
// Finish initial
i
zing header positioning.
tracker
(
headerClone
);
$
(
table
).
addClass
(
'
sticky-table
'
);
...
...
modules/block/block.module
View file @
92a8adea
...
...
@@ -527,7 +527,7 @@ function _block_render_blocks($region_blocks) {
* constants). Two block instances can use the same cached content when
* they share the same cache_id.
*
* Theme and language contexts are automatically differen
c
iated.
* Theme and language contexts are automatically differen
t
iated.
*
* @param $block
* @return
...
...
modules/block/block.test
View file @
92a8adea
...
...
@@ -19,7 +19,7 @@ class BlockTestCase extends DrupalWebTestCase {
$admin_user
=
$this
->
drupalCreateUser
(
array
(
'administer blocks'
,
'administer filters'
));
$this
->
drupalLogin
(
$admin_user
);
// Define the exising regions
// Define the exis
t
ing regions
$this
->
regions
=
array
();
$this
->
regions
[]
=
array
(
'name'
=>
'header'
,
'id'
=>
'header-region'
);
$this
->
regions
[]
=
array
(
'name'
=>
'left'
,
'id'
=>
'sidebar-left'
);
...
...
modules/blogapi/blogapi.module
View file @
92a8adea
...
...
@@ -831,7 +831,7 @@ function blogapi_menu() {
}
/**
* Implementaton of hook_init().
* Implementat
i
on of hook_init().
*/
function
blogapi_init
()
{
if
(
drupal_is_front_page
())
{
...
...
modules/blogapi/blogapi.test
View file @
92a8adea
...
...
@@ -19,7 +19,7 @@ class BlogAPITestCase extends DrupalWebTestCase {
*/
function
testBlogAPI
()
{
global
$base_url
;
// Create admin user and taxono
n
my for later use.
// Create admin user and taxonomy for later use.
$admin_user
=
$this
->
drupalCreateUser
(
array
(
'administer taxonomy'
));
$this
->
drupalLogin
(
$admin_user
);
$vid
=
$this
->
addVocabulary
(
'simpletest_vocab'
);
...
...
@@ -53,7 +53,7 @@ class BlogAPITestCase extends DrupalWebTestCase {
// Check recent posts.
$result
=
xmlrpc
(
$local
,
'blogger.getRecentPosts'
,
$appid
,
$blog_id
,
$web_user
->
name
,
$web_user
->
pass_raw
,
5
);
$this
->
assertTrue
(
$result
,
t
(
'Recent post list retr
e
ived.'
));
$this
->
assertTrue
(
$result
,
t
(
'Recent post list retri
e
ved.'
));
if
(
$result
!==
FALSE
&&
array_key_exists
(
'title'
,
$result
[
0
]))
{
$this
->
assertEqual
(
$content
,
$result
[
0
][
'title'
],
t
(
'Post found.'
));
...
...
@@ -89,7 +89,7 @@ class BlogAPITestCase extends DrupalWebTestCase {
// Get post categories.
$result
=
xmlrpc
(
$local
,
'mt.getPostCategories'
,
$nid
,
$web_user
->
name
,
$web_user
->
pass_raw
);
$this
->
assertTrue
(
$result
,
t
(
'Category list successfully retr
e
ived.'
));
$this
->
assertTrue
(
$result
,
t
(
'Category list successfully retri
e
ved.'
));
if
(
$result
!==
FALSE
&&
array_key_exists
(
'categoryId'
,
$result
[
0
]))
{
$this
->
assertEqual
(
$term
,
$result
[
0
][
'categoryId'
],
t
(
'Category list verified.'
));
...
...
@@ -134,8 +134,9 @@ class BlogAPITestCase extends DrupalWebTestCase {
*
* @param integer $vid
* Vocabulary ID.
* @param string $term Term name.
* @return interger
* @param string $term
* Term name.
* @return integer
* The Term ID.
*/
function
addTerm
(
$vid
,
$term
)
{
...
...
modules/book/book.install
View file @
92a8adea
...
...
@@ -141,7 +141,7 @@ function book_update_6000() {
return
$ret
;
}
else
{
// No exising nodes in the hierarchy, so drop the table and re-create it.
// No exis
t
ing nodes in the hierarchy, so drop the table and re-create it.
$ret
[]
=
update_sql
(
"DROP TABLE
{
book
}
"
);
db_create_table
(
$ret
,
'book'
,
$schema
[
'book'
]);
return
$ret
;
...
...
modules/color/color.module
View file @
92a8adea
...
...
@@ -74,7 +74,7 @@ function _color_page_alter(&$vars) {
$color_paths
=
variable_get
(
'color_'
.
$theme_key
.
'_stylesheets'
,
array
());
if
(
!
empty
(
$color_paths
))
{
// Loop over theme CSS files and try to rebuild CSS array with rewritten
// stylesheets. Keep the orginal order intact for CSS cascading.
// stylesheets. Keep the or
i
ginal order intact for CSS cascading.
$new_theme_css
=
array
();
foreach
(
$vars
[
'css'
][
'all'
][
'theme'
]
as
$old_path
=>
$old_preprocess
)
{
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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