mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
commit
a2f004ae85
@ -67,7 +67,7 @@ Making this work well is a subtle business and should be discussed with a few de
|
|||||||
|
|
||||||
## Using permissions
|
## Using permissions
|
||||||
|
|
||||||
* On an individual data record, $page->can("View", $member = null) and be called. If a member isn't passed, the
|
* On an individual data record, $page->can("View", $member = null) can be called. If a member isn't passed, the
|
||||||
currently logged in member is assumed.
|
currently logged in member is assumed.
|
||||||
* On a request, $request->hasPermission("View", $member = null) can be called. See [datamodel](/developer_guides/model/permissions) for
|
* On a request, $request->hasPermission("View", $member = null) can be called. See [datamodel](/developer_guides/model/permissions) for
|
||||||
information on request objects.
|
information on request objects.
|
||||||
|
@ -94,6 +94,7 @@ Example:
|
|||||||
$members = Member::get()->where(sprintf('"Name" = %s', Convert::raw2sql($_GET['name'], true)));
|
$members = Member::get()->where(sprintf('"Name" = %s', Convert::raw2sql($_GET['name'], true)));
|
||||||
|
|
||||||
```
|
```
|
||||||
|
[warning]
|
||||||
It is NOT good practice to "be sure" and convert the data passed to the functions above manually. This might
|
It is NOT good practice to "be sure" and convert the data passed to the functions above manually. This might
|
||||||
result in *double escaping* and alters the actually saved data (e.g. by adding slashes to your content).
|
result in *double escaping* and alters the actually saved data (e.g. by adding slashes to your content).
|
||||||
[/warning]
|
[/warning]
|
||||||
|
@ -317,7 +317,8 @@ abstract class DBSchemaManager {
|
|||||||
if (preg_match('/ENGINE=([^\s]*)/', $options[$dbID], $alteredEngineMatches)) {
|
if (preg_match('/ENGINE=([^\s]*)/', $options[$dbID], $alteredEngineMatches)) {
|
||||||
$alteredEngine = $alteredEngineMatches[1];
|
$alteredEngine = $alteredEngineMatches[1];
|
||||||
$tableStatus = $this->query(sprintf('SHOW TABLE STATUS LIKE \'%s\'', $table))->first();
|
$tableStatus = $this->query(sprintf('SHOW TABLE STATUS LIKE \'%s\'', $table))->first();
|
||||||
$tableOptionsChanged = ($tableStatus['Engine'] != $alteredEngine);
|
$engine = isset($tableStatus['Engine']) ? $tableStatus['Engine'] : null;
|
||||||
|
$tableOptionsChanged = ($engine != $alteredEngine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,7 +502,8 @@ class SSHTMLBBCodeParser
|
|||||||
{
|
{
|
||||||
if (trim($tag['text']) == '') {
|
if (trim($tag['text']) == '') {
|
||||||
//just an empty indentation or newline without value?
|
//just an empty indentation or newline without value?
|
||||||
continue;
|
//skip this iteration of the foreach loop
|
||||||
|
continue 2;
|
||||||
}
|
}
|
||||||
$newTagArray[] = $child;
|
$newTagArray[] = $child;
|
||||||
$openTags[] = $child['tag'];
|
$openTags[] = $child['tag'];
|
||||||
|
Loading…
Reference in New Issue
Block a user