diff options
-rw-r--r-- | apps/gallery/ajax/getCovers.php | 8 | ||||
-rw-r--r-- | apps/gallery/ajax/thumbnail.php | 17 | ||||
-rw-r--r-- | apps/gallery/lib_scanner.php | 4 | ||||
-rw-r--r-- | apps/media/css/player.css | 2 | ||||
-rw-r--r-- | files/index.php | 4 | ||||
-rw-r--r-- | files/js/filelist.js | 2 | ||||
-rw-r--r-- | files/templates/part.breadcrumb.php | 10 | ||||
-rw-r--r-- | lib/MDB2/Driver/Datatype/sqlite3.php | 65 | ||||
-rw-r--r-- | lib/MDB2/Driver/Function/sqlite3.php | 64 | ||||
-rw-r--r-- | lib/MDB2/Driver/Manager/sqlite3.php | 64 | ||||
-rw-r--r-- | lib/MDB2/Driver/Native/sqlite3.php | 64 | ||||
-rw-r--r-- | lib/MDB2/Driver/Reverse/sqlite3.php | 64 | ||||
-rw-r--r-- | lib/MDB2/Driver/sqlite3.php | 64 | ||||
-rw-r--r-- | lib/log.php | 2 |
14 files changed, 149 insertions, 285 deletions
diff --git a/apps/gallery/ajax/getCovers.php b/apps/gallery/ajax/getCovers.php index d84bf2a7903..b9c7558a53c 100644 --- a/apps/gallery/ajax/getCovers.php +++ b/apps/gallery/ajax/getCovers.php @@ -18,6 +18,7 @@ function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height, $tgtImg, $ default: exit(); } + if(!$myImage) exit(); $ratio_orig = $width_orig/$height_orig; if ($thumbnail_width/$thumbnail_height > $ratio_orig) { @@ -52,8 +53,11 @@ $targetImg = imagecreatetruecolor($numOfItems*$box_size, $box_size); $counter = 0; while (($i = $result->fetchRow()) && $counter < $numOfItems) { $imagePath = OC::$CONFIG_DATADIRECTORY . $i['file_path']; - CroppedThumbnail($imagePath, $box_size, $box_size, $targetImg, $counter*$box_size); - $counter++; + if(file_exists($imagePath)) + { + CroppedThumbnail($imagePath, $box_size, $box_size, $targetImg, $counter*$box_size); + $counter++; + } } header('Content-Type: image/png'); diff --git a/apps/gallery/ajax/thumbnail.php b/apps/gallery/ajax/thumbnail.php index f24782390f6..a1416452932 100644 --- a/apps/gallery/ajax/thumbnail.php +++ b/apps/gallery/ajax/thumbnail.php @@ -5,6 +5,9 @@ OC_JSON::checkAppEnabled('gallery'); function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height) { //$imgSrc is a FILE - Returns an image resource. //getting the image dimensions + if(! function_exists('imagecreatefromjpeg')) + OC_Log::write('gallery','GD module not installed',OC_Log::ERROR); + list($width_orig, $height_orig) = getimagesize($imgSrc); switch (strtolower(substr($imgSrc, strrpos($imgSrc, '.')+1))) { case "jpeg": @@ -18,6 +21,7 @@ function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height) { //$imgSr default: exit(); } + if(!$myImage) exit(); $ratio_orig = $width_orig/$height_orig; if ($thumbnail_width/$thumbnail_height > $ratio_orig) { @@ -47,9 +51,10 @@ $img = $_GET['img']; $tmp = OC::$CONFIG_DATADIRECTORY . $img; -header('Content-Type: image/png'); -$image = CroppedThumbnail($tmp, $box_size, $box_size); - -imagepng($image); -imagedestroy($image); -?> +if(file_exists($tmp)) +{ + header('Content-Type: image/png'); + $image = CroppedThumbnail($tmp, $box_size, $box_size); + imagepng($image); + imagedestroy($image); +}
\ No newline at end of file diff --git a/apps/gallery/lib_scanner.php b/apps/gallery/lib_scanner.php index 5490c4a55ad..1231de3f3c4 100644 --- a/apps/gallery/lib_scanner.php +++ b/apps/gallery/lib_scanner.php @@ -31,7 +31,7 @@ class OC_GALLERY_SCANNER { $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE `uid_owner` = ? AND `album_name` = ?'); $result = $stmt->execute(array(OC_User::getUser(), $current_album['name'])); if ($result->numRows() == 0 && count($current_album['images'])) { - $stmt = OC_DB::prepare('REPLACE INTO *PREFIX*gallery_albums (`uid_owner`, `album_name`) VALUES (?, ?)'); + $stmt = OC_DB::prepare('INSERT INTO *PREFIX*gallery_albums (`uid_owner`, `album_name`) VALUES (?, ?)'); $stmt->execute(array(OC_User::getUser(), $current_album['name'])); } $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_albums WHERE `uid_owner` = ? AND `album_name` = ?'); @@ -42,7 +42,7 @@ class OC_GALLERY_SCANNER { $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos WHERE `album_id` = ? AND `file_path` = ?'); $result = $stmt->execute(array($albumId, $img)); if ($result->numRows() == 0) { - $stmt = OC_DB::prepare('REPLACE INTO *PREFIX*gallery_photos (`album_id`, `file_path`) VALUES (?, ?)'); + $stmt = OC_DB::prepare('INSERT INTO *PREFIX*gallery_photos (`album_id`, `file_path`) VALUES (?, ?)'); $stmt->execute(array($albumId, $img)); } } diff --git a/apps/media/css/player.css b/apps/media/css/player.css index c4a098543d1..0f29748f351 100644 --- a/apps/media/css/player.css +++ b/apps/media/css/player.css @@ -1,7 +1,7 @@ #playercontrols{ display:inline; margin-left:1em; - width:7em; + width:4em; height:1em; position:fixed; top:auto; diff --git a/files/index.php b/files/index.php index bd37598289a..8bb5b618d87 100644 --- a/files/index.php +++ b/files/index.php @@ -42,6 +42,10 @@ if(!isset($_SESSION['timezone'])){ OC_App::setActiveNavigationEntry( "files_index" ); // Load the files $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; +// Redirect if directory does not exist +if(!OC_Filesystem::is_dir($dir)) { + header("Location: ".$_SERVER['PHP_SELF'].""); +} $files = array(); foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ diff --git a/files/js/filelist.js b/files/js/filelist.js index 3e85a35f6ef..863a3385d15 100644 --- a/files/js/filelist.js +++ b/files/js/filelist.js @@ -38,7 +38,7 @@ FileList={ }, addDir:function(name,size,lastModified){ var html='<tr data-file="'+name+'" data-type="dir" data-size="'+size+'">'; - html+='<td class="filename" style="background-image:url('+OC.imagePath('core', 'places/folder')+')"><input type="checkbox" /><a class="name" href="index.php?dir='+$('#dir').val()+'/'+name+'">'+name+'</a></td>'; + html+='<td class="filename" style="background-image:url('+OC.imagePath('core', 'filetypes/folder.png')+')"><input type="checkbox" /><a class="name" href="index.php?dir='+$('#dir').val()+'/'+name+'">'+name+'</a></td>'; if(size!='Pending'){ simpleSize=simpleFileSize(size); }else{ diff --git a/files/templates/part.breadcrumb.php b/files/templates/part.breadcrumb.php index b26f6097153..ab81cc5c039 100644 --- a/files/templates/part.breadcrumb.php +++ b/files/templates/part.breadcrumb.php @@ -1,10 +1,6 @@ - <?php for($i=0; $i<count($_["breadcrumb"])-1; $i++): + <?php for($i=0; $i<count($_["breadcrumb"]); $i++): $crumb = $_["breadcrumb"][$i]; ?> - <div class="crumb svg" data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo image_path('core','breadcrumb.png');?>")'> + <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo image_path('core','breadcrumb.png');?>")'> <a href="<?php echo $_['baseURL'].$crumb["dir"]; ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a> </div> - <?php endfor; - $crumb = $_["breadcrumb"][count($_["breadcrumb"])-1] ?> - <div class="crumb last svg" data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo image_path('core','breadcrumb.png');?>")'> - <a href="<?php echo $_['baseURL'].$crumb["dir"]; ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a> - </div>
\ No newline at end of file + <?php endfor;?>
\ No newline at end of file diff --git a/lib/MDB2/Driver/Datatype/sqlite3.php b/lib/MDB2/Driver/Datatype/sqlite3.php index 378d5540cbe..d74badbe4f1 100644 --- a/lib/MDB2/Driver/Datatype/sqlite3.php +++ b/lib/MDB2/Driver/Datatype/sqlite3.php @@ -1,49 +1,24 @@ <?php -// vim: set et ts=4 sw=4 fdm=marker: -// +----------------------------------------------------------------------+ -// | PHP version 5 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 2011 Robin Appelman | -// | All rights reserved. | -// +----------------------------------------------------------------------+ -// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB | -// | API as well as database abstraction for PHP applications. | -// | This LICENSE is in the BSD license style. | -// | | -// | Redistribution and use in source and binary forms, with or without | -// | modification, are permitted provided that the following conditions | -// | are met: | -// | | -// | Redistributions of source code must retain the above copyright | -// | notice, this list of conditions and the following disclaimer. | -// | | -// | Redistributions in binary form must reproduce the above copyright | -// | notice, this list of conditions and the following disclaimer in the | -// | documentation and/or other materials provided with the distribution. | -// | | -// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, | -// | Lukas Smith nor the names of his contributors may be used to endorse | -// | or promote products derived from this software without specific prior| -// | written permission. | -// | | -// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | -// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | -// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | -// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | -// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | -// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | -// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS| -// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | -// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | -// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY| -// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | -// | POSSIBILITY OF SUCH DAMAGE. | -// +----------------------------------------------------------------------+ -// | Author: Robin Appelman <icewind1991@gmail.com | -// +----------------------------------------------------------------------+ -// -// $Id: sqlite.php,v 1.67 2008/02/22 19:58:06 quipo Exp $ -// +/** + * ownCloud + * + * @author Robin Appelman + * @copyright 2011 Robin Appelman icewind1991@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ require_once('MDB2/Driver/Datatype/Common.php'); diff --git a/lib/MDB2/Driver/Function/sqlite3.php b/lib/MDB2/Driver/Function/sqlite3.php index 0d6b329f0ad..a013aea165a 100644 --- a/lib/MDB2/Driver/Function/sqlite3.php +++ b/lib/MDB2/Driver/Function/sqlite3.php @@ -1,48 +1,24 @@ <?php -// vim: set et ts=4 sw=4 fdm=marker: -// +----------------------------------------------------------------------+ -// | PHP versions 5 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 2011 Robin Appelman | -// | All rights reserved. | -// +----------------------------------------------------------------------+ -// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB | -// | API as well as database abstraction for PHP applications. | -// | This LICENSE is in the BSD license style. | -// | | -// | Redistribution and use in source and binary forms, with or without | -// | modification, are permitted provided that the following conditions | -// | are met: | -// | | -// | Redistributions of source code must retain the above copyright | -// | notice, this list of conditions and the following disclaimer. | -// | | -// | Redistributions in binary form must reproduce the above copyright | -// | notice, this list of conditions and the following disclaimer in the | -// | documentation and/or other materials provided with the distribution. | -// | | -// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, | -// | Lukas Smith nor the names of his contributors may be used to endorse | -// | or promote products derived from this software without specific prior| -// | written permission. | -// | | -// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | -// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | -// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | -// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | -// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | -// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | -// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS| -// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | -// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | -// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY| -// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | -// | POSSIBILITY OF SUCH DAMAGE. | -// +----------------------------------------------------------------------+ -// | Author: Robin Appelman <icewind1991@gmail.com> | -// +----------------------------------------------------------------------+ -// -// +/** + * ownCloud + * + * @author Robin Appelman + * @copyright 2011 Robin Appelman icewind1991@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ require_once('MDB2/Driver/Function/Common.php'); diff --git a/lib/MDB2/Driver/Manager/sqlite3.php b/lib/MDB2/Driver/Manager/sqlite3.php index eabbb72b3c2..c5c19a90fb5 100644 --- a/lib/MDB2/Driver/Manager/sqlite3.php +++ b/lib/MDB2/Driver/Manager/sqlite3.php @@ -1,48 +1,24 @@ <?php -// vim: set et ts=4 sw=4 fdm=marker: -// +----------------------------------------------------------------------+ -// | PHP versions 5 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 2011 Robin Appelman | -// | All rights reserved. | -// +----------------------------------------------------------------------+ -// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB | -// | API as well as database abstraction for PHP applications. | -// | This LICENSE is in the BSD license style. | -// | | -// | Redistribution and use in source and binary forms, with or without | -// | modification, are permitted provided that the following conditions | -// | are met: | -// | | -// | Redistributions of source code must retain the above copyright | -// | notice, this list of conditions and the following disclaimer. | -// | | -// | Redistributions in binary form must reproduce the above copyright | -// | notice, this list of conditions and the following disclaimer in the | -// | documentation and/or other materials provided with the distribution. | -// | | -// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, | -// | Lukas Smith nor the names of his contributors may be used to endorse | -// | or promote products derived from this software without specific prior| -// | written permission. | -// | | -// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | -// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | -// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | -// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | -// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | -// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | -// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS| -// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | -// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | -// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY| -// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | -// | POSSIBILITY OF SUCH DAMAGE. | -// +----------------------------------------------------------------------+ -// | Author: Robin Appelman <icewind1991@gmail.com> | -// +----------------------------------------------------------------------+ -// -// +/** + * ownCloud + * + * @author Robin Appelman + * @copyright 2011 Robin Appelman icewind1991@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ require_once('MDB2/Driver/Manager/Common.php'); diff --git a/lib/MDB2/Driver/Native/sqlite3.php b/lib/MDB2/Driver/Native/sqlite3.php index 81dc67dea65..de650107238 100644 --- a/lib/MDB2/Driver/Native/sqlite3.php +++ b/lib/MDB2/Driver/Native/sqlite3.php @@ -1,48 +1,24 @@ <?php -// vim: set et ts=4 sw=4 fdm=marker: -// +----------------------------------------------------------------------+ -// | PHP versions 5 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 2011 Robin Appelman | -// | All rights reserved. | -// +----------------------------------------------------------------------+ -// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB | -// | API as well as database abstraction for PHP applications. | -// | This LICENSE is in the BSD license style. | -// | | -// | Redistribution and use in source and binary forms, with or without | -// | modification, are permitted provided that the following conditions | -// | are met: | -// | | -// | Redistributions of source code must retain the above copyright | -// | notice, this list of conditions and the following disclaimer. | -// | | -// | Redistributions in binary form must reproduce the above copyright | -// | notice, this list of conditions and the following disclaimer in the | -// | documentation and/or other materials provided with the distribution. | -// | | -// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, | -// | Lukas Smith nor the names of his contributors may be used to endorse | -// | or promote products derived from this software without specific prior| -// | written permission. | -// | | -// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | -// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | -// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | -// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | -// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | -// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | -// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS| -// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | -// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | -// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY| -// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | -// | POSSIBILITY OF SUCH DAMAGE. | -// +----------------------------------------------------------------------+ -// | Author: Robin Appelman <icewind1991@gmail.com> | -// +----------------------------------------------------------------------+ -// -// +/** + * ownCloud + * + * @author Robin Appelman + * @copyright 2011 Robin Appelman icewind1991@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ require_once 'MDB2/Driver/Native/Common.php'; /** diff --git a/lib/MDB2/Driver/Reverse/sqlite3.php b/lib/MDB2/Driver/Reverse/sqlite3.php index d488977b158..d5595da84c5 100644 --- a/lib/MDB2/Driver/Reverse/sqlite3.php +++ b/lib/MDB2/Driver/Reverse/sqlite3.php @@ -1,48 +1,24 @@ <?php -// vim: set et ts=4 sw=4 fdm=marker: -// +----------------------------------------------------------------------+ -// | PHP versions 5 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 2011 Robin Appelman | -// | All rights reserved. | -// +----------------------------------------------------------------------+ -// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB | -// | API as well as database abstraction for PHP applications. | -// | This LICENSE is in the BSD license style. | -// | | -// | Redistribution and use in source and binary forms, with or without | -// | modification, are permitted provided that the following conditions | -// | are met: | -// | | -// | Redistributions of source code must retain the above copyright | -// | notice, this list of conditions and the following disclaimer. | -// | | -// | Redistributions in binary form must reproduce the above copyright | -// | notice, this list of conditions and the following disclaimer in the | -// | documentation and/or other materials provided with the distribution. | -// | | -// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, | -// | Lukas Smith nor the names of his contributors may be used to endorse | -// | or promote products derived from this software without specific prior| -// | written permission. | -// | | -// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | -// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | -// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | -// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | -// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | -// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | -// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS| -// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | -// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | -// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY| -// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | -// | POSSIBILITY OF SUCH DAMAGE. | -// +----------------------------------------------------------------------+ -// | Author: Robin Appelman <icewind1991@gmail.com> | -// +----------------------------------------------------------------------+ -// -// +/** + * ownCloud + * + * @author Robin Appelman + * @copyright 2011 Robin Appelman icewind1991@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ require_once('MDB2/Driver/Reverse/Common.php'); diff --git a/lib/MDB2/Driver/sqlite3.php b/lib/MDB2/Driver/sqlite3.php index a41aeed4850..e42d36176c4 100644 --- a/lib/MDB2/Driver/sqlite3.php +++ b/lib/MDB2/Driver/sqlite3.php @@ -1,48 +1,24 @@ <?php -// vim: set et ts=4 sw=4 fdm=marker: -// +----------------------------------------------------------------------+ -// | PHP versions 5 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 2011 Robin Appelman | -// | All rights reserved. | -// +----------------------------------------------------------------------+ -// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB | -// | API as well as database abstraction for PHP applications. | -// | This LICENSE is in the BSD license style. | -// | | -// | Redistribution and use in source and binary forms, with or without | -// | modification, are permitted provided that the following conditions | -// | are met: | -// | | -// | Redistributions of source code must retain the above copyright | -// | notice, this list of conditions and the following disclaimer. | -// | | -// | Redistributions in binary form must reproduce the above copyright | -// | notice, this list of conditions and the following disclaimer in the | -// | documentation and/or other materials provided with the distribution. | -// | | -// | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, | -// | Lukas Smith nor the names of his contributors may be used to endorse | -// | or promote products derived from this software without specific prior| -// | written permission. | -// | | -// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | -// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | -// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | -// | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | -// | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | -// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | -// | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS| -// | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | -// | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | -// | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY| -// | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | -// | POSSIBILITY OF SUCH DAMAGE. | -// +----------------------------------------------------------------------+ -// | Author: Robin Appelman <icewind1991@gmail.com> | -// +----------------------------------------------------------------------+ -// -// +/** + * ownCloud + * + * @author Robin Appelman + * @copyright 2011 Robin Appelman icewind1991@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ /** * MDB2 SQLite3 driver diff --git a/lib/log.php b/lib/log.php index a951b676037..98333be54fe 100644 --- a/lib/log.php +++ b/lib/log.php @@ -41,7 +41,7 @@ class OC_Log{ */ public static function write($app,$message,$level){ $minLevel=OC_Config::getValue( "loglevel", 2 ); - if($level>$minLevel){ + if($level>=$minLevel){ $datadir=OC_Config::getValue( "datadirectory", OC::$SERVERROOT.'/data' ); $logFile=OC_Config::getValue( "logfile", $datadir.'/owncloud.log' ); $entry=array('app'=>$app,'message'=>$message,'level'=>$level,'time'=>time()); |