@@ -95,7 +95,7 @@ |
||
95 | 95 | $last_modified = filemtime($this->file_path); |
96 | 96 | |
97 | 97 | header('Content-Type: '.$this->mime_type); |
98 | - header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $last_modified).' GMT'); |
|
98 | + header('Last-Modified: '.gmdate('D, d M Y H:i:s', $last_modified).' GMT'); |
|
99 | 99 | header('Cache-Control:'); |
100 | 100 | header('Content-Disposition: inline; filename='.$this->file_name); |
101 | 101 | header('Pragma:'); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | if ($this->dbquery) { |
100 | 100 | return $this->dbquery; |
101 | 101 | } |
102 | - $this->dbquery = new Ilib_DBQuery('filehandler_append_file', 'filehandler_append_file.active = 1 AND filehandler_append_file.intranet_id='.$this->kernel->intranet->get('id').' AND filehandler_append_file.belong_to_key = '.$this->belong_to_key.' AND filehandler_append_file.belong_to_id = ' . $this->belong_to_id); |
|
102 | + $this->dbquery = new Ilib_DBQuery('filehandler_append_file', 'filehandler_append_file.active = 1 AND filehandler_append_file.intranet_id='.$this->kernel->intranet->get('id').' AND filehandler_append_file.belong_to_key = '.$this->belong_to_key.' AND filehandler_append_file.belong_to_id = '.$this->belong_to_id); |
|
103 | 103 | $this->dbquery->createStore($this->kernel->getSessionId(), 'intranet_id = '.intval($this->kernel->intranet->get('id'))); |
104 | 104 | return $this->dbquery; |
105 | 105 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | { |
116 | 116 | $db = new DB_Sql(); |
117 | 117 | $db->query("SELECT id FROM filehandler_append_file |
118 | - WHERE intranet_id = " . $this->kernel->intranet->get('id') . " |
|
118 | + WHERE intranet_id = " . $this->kernel->intranet->get('id')." |
|
119 | 119 | AND belong_to_key = ".$this->belong_to_key." |
120 | 120 | AND belong_to_id = ".$this->belong_to_id." |
121 | 121 | AND file_handler_id = ".$file_id." |
@@ -288,7 +288,7 @@ |
||
288 | 288 | continue; |
289 | 289 | } |
290 | 290 | |
291 | - $ext = substr($file, strrpos($file, ".")+1); |
|
291 | + $ext = substr($file, strrpos($file, ".") + 1); |
|
292 | 292 | |
293 | 293 | if (strlen($ext) < 3 || strlen($ext) > 4) { |
294 | 294 | $this->file_handler->error->set("Filen \"".$file."\" har ikke en gyldig endelse, f.eks. .pdf"); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $this->image_library = IMAGE_LIBRARY; |
55 | 55 | |
56 | 56 | if ($this->file_handler->get('is_image') != 1) { |
57 | - throw new Exception("Filtypen " . $file_handler->get('mime_type') . " er ikke et billede, og kan derfor ikke manipuleres i ImageHandler"); |
|
57 | + throw new Exception("Filtypen ".$file_handler->get('mime_type')." er ikke et billede, og kan derfor ikke manipuleres i ImageHandler"); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $this->tempdir_path = $this->file_handler->getTemporaryDirectory(); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | $image = Image_Transform::factory($this->image_library); |
82 | 82 | if (PEAR::isError($image)) { |
83 | - throw new Exception($image->getMessage() . $image->getUserInfo()); |
|
83 | + throw new Exception($image->getMessage().$image->getUserInfo()); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | if ($this->tmp_file_name != null && file_exists($this->tmp_file_name)) { |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | { |
151 | 151 | $image = Image_Transform::factory($this->image_library); |
152 | 152 | if (PEAR::isError($image)) { |
153 | - throw new Exception($image->getMessage() . $image->getUserInfo()); |
|
153 | + throw new Exception($image->getMessage().$image->getUserInfo()); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | if ($this->tmp_file_name != null && file_exists($this->tmp_file_name)) { |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $result = $image->crop($width, $height, $offset_x, $offset_y); |
169 | 169 | |
170 | 170 | if (PEAR::isError($result)) { |
171 | - throw new Exception("Der opstod en fejl under formatering (crop) af billedet i ImageHandler->crop: " . $result->getMessage()); |
|
171 | + throw new Exception("Der opstod en fejl under formatering (crop) af billedet i ImageHandler->crop: ".$result->getMessage()); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | $file_type = $this->file_handler->get('file_type'); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | type_key = ".$type['type_key'].", |
124 | 124 | file_size = ".(int)$file_size.", |
125 | 125 | width = ".(int)$width.", |
126 | - height = ".(int)$height.", " . |
|
126 | + height = ".(int)$height.", ". |
|
127 | 127 | "crop_parameter = \"".safeToDb($crop_param_string)."\""); |
128 | 128 | |
129 | 129 | $id = $db->insertedId(); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | //$this->value['predefined_size'] = $db->f('predefined_size'); |
188 | 188 | $this->value['server_file_name'] = $db->f('server_file_name'); |
189 | 189 | $this->value['file_size'] = $db->f('file_size'); |
190 | - $this->value['file_path'] = $this->instance_path . $db->f('server_file_name'); |
|
190 | + $this->value['file_path'] = $this->instance_path.$db->f('server_file_name'); |
|
191 | 191 | |
192 | 192 | $this->value['last_modified'] = filemtime($this->get('file_path')); |
193 | 193 | // $this->value['file_uri'] = FILE_VIEWER.'?id='.$this->get('id').'&type='.$this->get('type').'&name=/'.urlencode($this->file_handler->get('file_name')); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | echo '<label for="'.$upload_field_name.'">'.t($options['field_description'], 'filehandler').'</label>'; |
134 | 134 | echo '<input name="'.$upload_field_name.'" type="file" id="'.$upload_field_name.'" />'; |
135 | 135 | if ($options['include_submit_button_name'] != '') { |
136 | - echo ' <input type="submit" name="'.$options['include_submit_button_name'].'" value="'.t('upload', 'filehandler') . '" /> <br />'; |
|
136 | + echo ' <input type="submit" name="'.$options['include_submit_button_name'].'" value="'.t('upload', 'filehandler').'" /> <br />'; |
|
137 | 137 | } |
138 | 138 | if ($this->file_handler->kernel->user->hasModuleAccess('filemanager') and $options['filemanager'] === true) { |
139 | 139 | echo ' '.t('or').' <input type="submit" name="'.$submit_name.'" value="'.t('choose from filemanager', 'filehandler').'" />'; |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $this->file_handler->createInstance('small'); |
156 | 156 | |
157 | 157 | if ($options['div_style'] == '') { |
158 | - $options['div_style'] = 'height: '.($this->file_handler->instance->get('height')+10).'px;'; |
|
158 | + $options['div_style'] = 'height: '.($this->file_handler->instance->get('height') + 10).'px;'; |
|
159 | 159 | } |
160 | 160 | echo '<div class="show_file" style="'.$options['div_style'].'"><img src="'.$this->file_handler->instance->get('file_uri').'" style="width: '.$this->file_handler->instance->get('width').'px; height: '.$this->file_handler->instance->get('height').'px" /> '.$this->file_handler->get('file_name'); |
161 | 161 | if ($delete_link != '') { |
@@ -19,19 +19,19 @@ |
||
19 | 19 | { |
20 | 20 | // @todo should add the template for intranet |
21 | 21 | //$this->actAs('Intraface_Doctrine_Template_Intranet'); |
22 | - $options = array('created' => array('name' => 'date_created', // Name of created column |
|
23 | - 'type' => 'timestamp', // Doctrine column data type |
|
24 | - 'options' => array(), // Array of options for column |
|
25 | - 'format' => 'Y-m-d H:i:s', // Format of date used with PHP date() function(default) |
|
26 | - 'disabled' => false, // Disable the created column(default) |
|
27 | - 'expression' => 'NOW()'), // Update column with database expression(default=false) |
|
28 | - 'updated' => array('name' => 'date_updated', // Name of updated column(default) |
|
29 | - 'type' => 'timestamp', // Doctrine column data type(default) |
|
30 | - 'options' => array(), // Array of options for column(default) |
|
31 | - 'format' => 'Y-m-d H:i:s', // Format of date used with PHP date() function(default) |
|
32 | - 'disabled' => false, // Disable the updated column(default) |
|
33 | - 'expression' => 'NOW()', // Use a database expression to set column(default=false) |
|
34 | - 'onInsert' => true)); // Whether or not to set column onInsert(default) |
|
22 | + $options = array('created' => array('name' => 'date_created', // Name of created column |
|
23 | + 'type' => 'timestamp', // Doctrine column data type |
|
24 | + 'options' => array(), // Array of options for column |
|
25 | + 'format' => 'Y-m-d H:i:s', // Format of date used with PHP date() function(default) |
|
26 | + 'disabled' => false, // Disable the created column(default) |
|
27 | + 'expression' => 'NOW()'), // Update column with database expression(default=false) |
|
28 | + 'updated' => array('name' => 'date_updated', // Name of updated column(default) |
|
29 | + 'type' => 'timestamp', // Doctrine column data type(default) |
|
30 | + 'options' => array(), // Array of options for column(default) |
|
31 | + 'format' => 'Y-m-d H:i:s', // Format of date used with PHP date() function(default) |
|
32 | + 'disabled' => false, // Disable the updated column(default) |
|
33 | + 'expression' => 'NOW()', // Use a database expression to set column(default=false) |
|
34 | + 'onInsert' => true)); // Whether or not to set column onInsert(default) |
|
35 | 35 | |
36 | 36 | $this->actAs('Timestampable', $options); |
37 | 37 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | </h2> |
30 | 30 | <ul> |
31 | 31 | <?php foreach ($files as $file) : ?> |
32 | - <li><a href="<?php e(url('../../../../' . $file['url'])); ?>"><?php e(t($file['title'])); ?></a></li> |
|
32 | + <li><a href="<?php e(url('../../../../'.$file['url'])); ?>"><?php e(t($file['title'])); ?></a></li> |
|
33 | 33 | <?php endforeach; ?> |
34 | 34 | </ul> |
35 | 35 | </div> |
@@ -36,13 +36,13 @@ |
||
36 | 36 | |
37 | 37 | function renderHtml() |
38 | 38 | { |
39 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/user'); |
|
39 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/user'); |
|
40 | 40 | return $smarty->render($this, $this->getValues()); |
41 | 41 | } |
42 | 42 | |
43 | 43 | function renderHtmlEdit() |
44 | 44 | { |
45 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/useredit'); |
|
45 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/useredit'); |
|
46 | 46 | return $smarty->render($this, $this->getValues()); |
47 | 47 | } |
48 | 48 |