[Openfirst-cvscommit] SF.net SVN: openfirst: [221] trunk/src
Brought to you by:
xtimg
From: <ast...@us...> - 2007-04-06 21:53:46
|
Revision: 221 http://svn.sourceforge.net/openfirst/?rev=221&view=rev Author: astronouth7303 Date: 2007-04-06 14:53:42 -0700 (Fri, 06 Apr 2007) Log Message: ----------- -Fixed file headers -ofGetSlugURI() works with "/" -implemented a slug redirector Modified Paths: -------------- trunk/src/includes/slug.php trunk/src/login.php trunk/src/logout.php Added Paths: ----------- trunk/src/findslug.php Added: trunk/src/findslug.php =================================================================== --- trunk/src/findslug.php (rev 0) +++ trunk/src/findslug.php 2007-04-06 21:53:42 UTC (rev 221) @@ -0,0 +1,40 @@ +<?php +/* + * openFIRST.base - findslug.php + * + * Copyright (C) 2003, + * openFIRST Project + * Original Author: Jamie Bliss <ja...@op...> + * + * This program 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. + * + * This program 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. + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +// Purpose: Redirect from a slug + +include_once("includes/globals.php"); +include_once("slug.php"); + +$slug = $_SERVER['QUERY_STRING']; + +$uri = ofGetSlugURI($slug); + +header('Location: '.$ogServer.$ogBasePath.$uri); +#echo $ogServer.$ogBasePath.$uri + +?> Property changes on: trunk/src/findslug.php ___________________________________________________________________ Name: svn:mime-type + text/x-php Name: svn:eol-style + native Modified: trunk/src/includes/slug.php =================================================================== --- trunk/src/includes/slug.php 2007-04-06 21:23:22 UTC (rev 220) +++ trunk/src/includes/slug.php 2007-04-06 21:53:42 UTC (rev 221) @@ -33,6 +33,9 @@ if (strcasecmp(substr($slug, 1, strlen('slug:')), 'slug:') == 0) { $slug = substr($slug, strlen('slug:')); } + if (strcasecmp($slug[0], '/') == 0) { + $slug = substr($slug, 1); + } $parts = explode('/', $slug); if (!isset($parts[1])) { return '/'.$parts[0]; Modified: trunk/src/login.php =================================================================== --- trunk/src/login.php 2007-04-06 21:23:22 UTC (rev 220) +++ trunk/src/login.php 2007-04-06 21:53:42 UTC (rev 221) @@ -25,7 +25,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -// Purpose: configure OpenFIRST modules, including their position on menus +// Purpose: Log users in include_once("includes/globals.php"); include_once($ogHeader); @@ -38,4 +38,4 @@ ofShowLogin(); include_once($ogFooter); -?> \ No newline at end of file +?> Modified: trunk/src/logout.php =================================================================== --- trunk/src/logout.php 2007-04-06 21:23:22 UTC (rev 220) +++ trunk/src/logout.php 2007-04-06 21:53:42 UTC (rev 221) @@ -25,7 +25,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -// Purpose: configure OpenFIRST modules, including their position on menus +// Purpose: Log a user out. include_once("includes/globals.php"); include_once($ogHeader); @@ -38,4 +38,4 @@ <?php include_once($ogFooter); -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |