Skip to content

Commit

Permalink
Fixes nickdunn#10
Browse files Browse the repository at this point in the history
  • Loading branch information
creativedutchmen committed Dec 1, 2012
1 parent c1fb678 commit 0cd2f26
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 6 additions & 1 deletion content/content.mappings.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ public function action() {
switch ($_POST['with-selected']) {
case 'rebuild':
foreach ($checked as $handle) {
ElasticSearch::getIndex()->getType($handle)->delete();
try{
ElasticSearch::getIndex()->getType($handle)->delete();
}
catch(Exception $e){

}
ElasticSearch::createType($handle);
redirect("{$this->uri}/mappings/");
}
Expand Down
4 changes: 2 additions & 2 deletions content/content.queries.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ private function __buildDrawerHTML($filter) {
'data-dateMax' => date('Y-m-d', strtotime($range->max)),
'class' => 'label date-range'
));
$label->appendChild(new XMLElement('span', _('Date range')));
$label->appendChild(new XMLElement('span', __('Date range')));
$label->appendChild(new XMLElement('input', NULL, array(
'type' => 'text',
'placeholder' => __('From'),
Expand All @@ -257,7 +257,7 @@ private function __buildDrawerHTML($filter) {
$form->appendChild($label);

// generate a random noun
$password = General::generatePassword();
$password = 'General::generatePassword();';
$password = preg_replace('/[0-9]/', '', $password); // remove numbers
preg_match('/([A-Z][a-z]+){1,}/', $password, $nouns); // split into separate words based on capitals
$noun = strtolower(end($nouns));
Expand Down
6 changes: 3 additions & 3 deletions content/content.sessions.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function view() {
__('Export CSV'), $this->__buildURL(NULL, array('output' => 'csv')), NULL, 'button'
));

$this->Context->appendChild($filters_drawer->drawer);
//$this->Context->appendChild($filters_drawer->drawer);

$tableHead = array();
$tableBody = array();
Expand Down Expand Up @@ -241,7 +241,7 @@ private function __buildDrawerHTML($filter) {
'data-dateMax' => date('Y-m-d', strtotime($range->max)),
'class' => 'label date-range'
));
$label->appendChild(new XMLElement('span', _('Date range')));
$label->appendChild(new XMLElement('span', __('Date range')));
$label->appendChild(new XMLElement('input', NULL, array(
'type' => 'text',
'placeholder' => __('From'),
Expand All @@ -260,7 +260,7 @@ private function __buildDrawerHTML($filter) {
$form->appendChild($label);

// generate a random noun
$password = General::generatePassword();
$password = 'HuibKeemink';
$password = preg_replace('/[0-9]/', '', $password); // remove numbers
preg_match('/([A-Z][a-z]+){1,}/', $password, $nouns); // split into separate words based on capitals
$noun = strtolower(end($nouns));
Expand Down

0 comments on commit 0cd2f26

Please sign in to comment.