From: <var...@us...> - 2012-09-28 13:36:31
|
Revision: 8293 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8293&view=rev Author: vargenau Date: 2012-09-28 13:36:20 +0000 (Fri, 28 Sep 2012) Log Message: ----------- Fix error on undefined project var Modified Paths: -------------- trunk/view.php Modified: trunk/view.php =================================================================== --- trunk/view.php 2012-09-28 13:34:30 UTC (rev 8292) +++ trunk/view.php 2012-09-28 13:36:20 UTC (rev 8293) @@ -48,7 +48,15 @@ $sysdebug_enable = false; -if (!$group_id || !$project) { +if (isset($group_id) && $group_id) { + if (! isset($project) || ! $project) { + $project = group_get_object($group_id); + } +} elseif(isset($project) && is_object($project)) { + $group_id = $project->getID(); +} + +if (! isset($group_id) || ! isset($project)) { exit_no_group(); } elseif (!($project->usesPlugin("wiki"))) { exit_disabled('home'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2015-07-15 12:41:50
|
Revision: 9713 http://sourceforge.net/p/phpwiki/code/9713 Author: vargenau Date: 2015-07-15 12:41:47 +0000 (Wed, 15 Jul 2015) Log Message: ----------- Translate error message Modified Paths: -------------- trunk/view.php Modified: trunk/view.php =================================================================== --- trunk/view.php 2015-07-15 09:11:10 UTC (rev 9712) +++ trunk/view.php 2015-07-15 12:41:47 UTC (rev 9713) @@ -22,7 +22,7 @@ /* * Standard Alcatel-Lucent disclaimer for contributing to open source * - * "The Configuration File ("Contribution") has not been tested and/or + * "The File Viewer ("Contribution") has not been tested and/or * validated for release as or in products, combinations with products or * other commercial use. Any use of the Contribution is entirely made at * the user's own responsibility and the user can not rely on any features, @@ -81,7 +81,7 @@ if (strncmp($basepath, $filepath, strlen($basepath)) !== 0) { error_log("DEBUG: basepath=$basepath, filepath=$filepath"); - exit_error('Invalid path: No access'); + exit_error(_('Invalid path: No access')); } if ($filepath && is_file($filepath)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2016-09-29 16:44:01
|
Revision: 9935 http://sourceforge.net/p/phpwiki/code/9935 Author: vargenau Date: 2016-09-29 16:43:59 +0000 (Thu, 29 Sep 2016) Log Message: ----------- Remove Fusionforge-specific file (view.php) Removed Paths: ------------- trunk/view.php Deleted: trunk/view.php =================================================================== --- trunk/view.php 2016-09-01 12:22:32 UTC (rev 9934) +++ trunk/view.php 2016-09-29 16:43:59 UTC (rev 9935) @@ -1,108 +0,0 @@ -<?php -/* - * Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent - * - * This file is part of PhpWiki. - * - * PhpWiki is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpWiki 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with PhpWiki; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -/* - * Standard Alcatel-Lucent disclaimer for contributing to open source - * - * "The File Viewer ("Contribution") has not been tested and/or - * validated for release as or in products, combinations with products or - * other commercial use. Any use of the Contribution is entirely made at - * the user's own responsibility and the user can not rely on any features, - * functionalities or performances Alcatel-Lucent has attributed to the - * Contribution. - * - * THE CONTRIBUTION BY ALCATEL-LUCENT IS PROVIDED AS IS, WITHOUT WARRANTY - * OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPLIANCE, - * NON-INTERFERENCE AND/OR INTERWORKING WITH THE SOFTWARE TO WHICH THE - * CONTRIBUTION HAS BEEN MADE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * ALCATEL-LUCENT BE LIABLE FOR ANY DAMAGES OR OTHER LIABLITY, WHETHER IN - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * CONTRIBUTION OR THE USE OR OTHER DEALINGS IN THE CONTRIBUTION, WHETHER - * TOGETHER WITH THE SOFTWARE TO WHICH THE CONTRIBUTION RELATES OR ON A STAND - * ALONE BASIS." - */ - -$no_gz_buffer = true; - -require_once '../../env.inc.php'; -require_once $gfcommon . 'include/pre.php'; - -$sysdebug_enable = false; - -if (isset($group_id) && $group_id) { - if (!isset($project) || !$project) { - $project = group_get_object($group_id); - } -} elseif (isset($project) && is_object($project)) { - $group_id = $project->getID(); -} - -if (!isset($group_id) || !isset($project)) { - exit_no_group(); -} elseif (!($project->usesPlugin("wiki"))) { - exit_disabled('home'); -} - -// If project is private, check membership. -if (!$project->isPublic()) { - session_require_perm('project_read', $project->getID()); -} - -$arr = explode('/', urldecode(getStringFromServer('REQUEST_URI'))); -array_shift($arr); -array_shift($arr); -array_shift($arr); -array_shift($arr); -array_shift($arr); -$path = join('/', $arr); - -$basepath = realpath(forge_get_config('groupdir_prefix') .'/'. $project->getUnixName() . '/www/uploads/'); -$filepath = realpath($basepath . '/' . $path); -$filename = basename($filepath); - -if (strncmp($basepath, $filepath, strlen($basepath)) !== 0) { - error_log("DEBUG: basepath=$basepath, filepath=$filepath"); - exit_error(_('Invalid path: No access')); -} - -if ($filepath && is_file($filepath)) { - if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) { - # workaround for IE filename bug with multiple periods/ multiple dots in filename - # that adds square brackets to filename - eg. setup.abc.exe becomes setup[1].abc.exe - $filename = preg_replace('/\./', '%2e', $filename, substr_count($filename, '.') - 1); - } - $filename = str_replace('"', '', $filename); - header('Content-disposition: filename="' . $filename . '"'); - - $finfo = finfo_open(FILEINFO_MIME_TYPE); - $mimetype = finfo_file($finfo, $filepath); - header("Content-type: $mimetype"); - - $length = filesize($filepath); - header("Content-length: $length"); - - readfile_chunked($filepath); - -} else { - header("HTTP/1.0 404 Not Found"); - require_once $gfwww . '404.php'; -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |