From: <vo...@us...> - 2012-05-15 04:45:21
|
Revision: 9507 http://xoops.svn.sourceforge.net/xoops/?rev=9507&view=rev Author: voltan1 Date: 2012-05-15 04:45:14 +0000 (Tue, 15 May 2012) Log Message: ----------- Fix some bugs Modified Paths: -------------- XoopsModules/fmcontent/branches/news/class/utils.php XoopsModules/fmcontent/branches/news/docs/backend.php XoopsModules/fmcontent/branches/news/docs/modules-unicode.htaccess XoopsModules/fmcontent/branches/news/docs/modules.htaccess XoopsModules/fmcontent/branches/news/docs/root-unicode.htaccess XoopsModules/fmcontent/branches/news/docs/root.htaccess XoopsModules/fmcontent/branches/news/index.php Modified: XoopsModules/fmcontent/branches/news/class/utils.php =================================================================== --- XoopsModules/fmcontent/branches/news/class/utils.php 2012-05-14 19:27:39 UTC (rev 9506) +++ XoopsModules/fmcontent/branches/news/class/utils.php 2012-05-15 04:45:14 UTC (rev 9507) @@ -24,7 +24,7 @@ * Uploadimg function * * For manage all upload parts for images - * Add topic , Edit topic , Add content , Edit content + * Add topic , Edit topic , Add article , Edit article */ function News_UploadImg($NewsModule, $type, $obj, $image) { include_once XOOPS_ROOT_PATH . "/class/uploader.php"; @@ -57,7 +57,7 @@ * Deleteimg function * * For Deleteing uploaded images - * Edit topic ,Edit content + * Edit topic ,Edit article */ function News_DeleteImg($NewsModule, $type, $obj) { if ($obj->getVar ( $type )) { @@ -684,7 +684,7 @@ $page = $array['story_alias']; $type = $type . '/'; $id = $id . '/'; - if ($type == 'content/') $type = ''; + if ($type == 'article/') $type = ''; if ($type == 'comment-edit/' || $type == 'comment-reply/' || $type == 'comment-delete/') { return XOOPS_URL . $rewrite_base . $module_name . $type . $id . '/'; @@ -705,7 +705,7 @@ } $page = $array['story_alias']; $type = $type . '/'; - if ($type == 'content/') $type = ''; + if ($type == 'article/') $type = ''; if ($type == 'comment-edit/' || $type == 'comment-reply/' || $type == 'comment-delete/') { return XOOPS_URL . $rewrite_base . $module_name . $type . $id . '/'; Modified: XoopsModules/fmcontent/branches/news/docs/backend.php =================================================================== --- XoopsModules/fmcontent/branches/news/docs/backend.php 2012-05-14 19:27:39 UTC (rev 9506) +++ XoopsModules/fmcontent/branches/news/docs/backend.php 2012-05-15 04:45:14 UTC (rev 9507) @@ -16,16 +16,6 @@ */ include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mainfile.php'; +include XOOPS_ROOT_PATH . '/modules/news/rss.php'; -require_once XOOPS_TRUST_PATH . '/modules/fmcontent/include/functions.php'; -include_once XOOPS_TRUST_PATH . '/modules/fmcontent/class/perm.php'; -// Load template class -require_once XOOPS_ROOT_PATH . '/class/template.php'; - -$modsDirname = basename(XOOPS_TRUST_PATH . '/modules/fmcontent'); - -$module_handler =& xoops_gethandler('module'); -$forMods =& $module_handler->getByDirname($modsDirname); -require_once XOOPS_TRUST_PATH . '/modules/fmcontent/rss.php'; - ?> \ No newline at end of file Modified: XoopsModules/fmcontent/branches/news/docs/modules-unicode.htaccess =================================================================== --- XoopsModules/fmcontent/branches/news/docs/modules-unicode.htaccess 2012-05-14 19:27:39 UTC (rev 9506) +++ XoopsModules/fmcontent/branches/news/docs/modules-unicode.htaccess 2012-05-15 04:45:14 UTC (rev 9507) @@ -1,7 +1,7 @@ Options +FollowSymlinks RewriteEngine on RewriteRule ^topic/([^./]+)/([^./]+)\.html$ index.php?topic=$1&page=$2 [L] -RewriteRule ^([^./]+)/([^./]+)/([^./]+)\.html$ content.php?id=$2&page=$3 [L] +RewriteRule ^([^./]+)/([^./]+)/([^./]+)\.html$ article.php?id=$2&page=$3 [L] RewriteRule ^print/([^./]+)/([^./]+)/([^./]+)\.html$ print.php?id=$2&page=$3 [L] RewriteRule ^pdf/([^./]+)/([^./]+)/([^./]+)\.html$ pdf.php?id=$2&page=$3 [L] RewriteRule ^comment-new/([^./]+)/([^./]+)/([^./]+)\.html$ comment-new.php?id=$2&page=$3 [L] Modified: XoopsModules/fmcontent/branches/news/docs/modules.htaccess =================================================================== --- XoopsModules/fmcontent/branches/news/docs/modules.htaccess 2012-05-14 19:27:39 UTC (rev 9506) +++ XoopsModules/fmcontent/branches/news/docs/modules.htaccess 2012-05-15 04:45:14 UTC (rev 9507) @@ -1,7 +1,7 @@ Options +FollowSymlinks RewriteEngine on RewriteRule ^topic/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ index.php?topic=$1&page=$2 [L] -RewriteRule ^([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ content.php?id=$2&page=$3 [L] +RewriteRule ^([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ article.php?id=$2&page=$3 [L] RewriteRule ^print/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ print.php?id=$2&page=$3 [L] RewriteRule ^pdf/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ pdf.php?id=$2&page=$3 [L] RewriteRule ^comment-new/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ comment-new.php?id=$2&page=$3 [L] Modified: XoopsModules/fmcontent/branches/news/docs/root-unicode.htaccess =================================================================== --- XoopsModules/fmcontent/branches/news/docs/root-unicode.htaccess 2012-05-14 19:27:39 UTC (rev 9506) +++ XoopsModules/fmcontent/branches/news/docs/root-unicode.htaccess 2012-05-15 04:45:14 UTC (rev 9507) @@ -1,10 +1,18 @@ Options +FollowSymlinks RewriteEngine on -RewriteRule ^fmcontent/topic/([^./]+)/([^./]+)\.html$ modules/fmcontent/index.php?topic=$1&page=$2 [L] -RewriteRule ^fmcontent/([^./]+)/([^./]+)/([^./]+)\.html$ modules/fmcontent/content.php?id=$2&page=$3 [L] -RewriteRule ^fmcontent/print/([^./]+)/([^./]+)/([^./]+)\.html$ modules/fmcontent/print.php?id=$2&page=$3 [L] -RewriteRule ^fmcontent/pdf/([^./]+)/([^./]+)/([^./]+)\.html$ modules/fmcontent/pdf.php?id=$2&page=$3 [L] -RewriteRule ^fmcontent/comment-new/([^./]+)/([^./]+)/([^./]+)\.html$ modules/fmcontent/comment-new.php?id=$2&page=$3 [L] -RewriteRule ^fmcontent/comment-edit/([^./]+)/([^./]+)/([^./]+)/([^./]+)\.html$ modules/fmcontent/comment-edit.php?id=$2&page=$3&com_id=$3 [L] -RewriteRule ^fmcontent/comment-reply/([^./]+)/([^./]+)/([^./]+)/([^./]+)\.html$ modules/fmcontent/comment-reply.php?id=$2&page=$3&com_id=$3 [L] -RewriteRule ^fmcontent/comment-delete/([^./]+)/([^./]+)/([^./]+)/([^./]+)\.html$ modules/fmcontent/comment-delete.php?id=$2&page=$3&com_id=$3 [L] \ No newline at end of file +RewriteRule ^news/topic/([^./]+)/([^./]+)\.html$ modules/news/index.php?topic=$1&page=$2 [L] +RewriteRule ^news/([^./]+)/([^./]+)/([^./]+)\.html$ modules/news/article.php?id=$2&page=$3 [L] +RewriteRule ^news/print/([^./]+)/([^./]+)/([^./]+)\.html$ modules/news/print.php?id=$2&page=$3 [L] +RewriteRule ^news/pdf/([^./]+)/([^./]+)/([^./]+)\.html$ modules/news/pdf.php?id=$2&page=$3 [L] +RewriteRule ^news/comment-new/([^./]+)/([^./]+)/([^./]+)\.html$ modules/news/comment-new.php?id=$2&page=$3 [L] +RewriteRule ^news/comment-edit/([^./]+)/([^./]+)/([^./]+)/([^./]+)\.html$ modules/news/comment-edit.php?id=$2&page=$3&com_id=$3 [L] +RewriteRule ^news/comment-reply/([^./]+)/([^./]+)/([^./]+)/([^./]+)\.html$ modules/news/comment-reply.php?id=$2&page=$3&com_id=$3 [L] +RewriteRule ^news/comment-delete/([^./]+)/([^./]+)/([^./]+)/([^./]+)\.html$ modules/news/comment-delete.php?id=$2&page=$3&com_id=$3 [L] + +OR + +RewriteRule ^topic/([a-zA-Z0-9_-]*)$ modules/news/index.php?topic=$1 [L] +RewriteRule ^([a-zA-Z0-9_-]*)$ modules/news/article.php?story=$1 [L] +RewriteRule ^([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)$ modules/news/article.php?story=$2 [L] +RewriteRule ^print/([a-zA-Z0-9_-]*)$ modules/news/print.php?story=$1 [L] +RewriteRule ^pdf/([a-zA-Z0-9_-]*)$ modules/news/pdf.php?story=$1 [L] \ No newline at end of file Modified: XoopsModules/fmcontent/branches/news/docs/root.htaccess =================================================================== --- XoopsModules/fmcontent/branches/news/docs/root.htaccess 2012-05-14 19:27:39 UTC (rev 9506) +++ XoopsModules/fmcontent/branches/news/docs/root.htaccess 2012-05-15 04:45:14 UTC (rev 9507) @@ -1,10 +1,18 @@ Options +FollowSymlinks RewriteEngine on -RewriteRule ^fmcontent/topic/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/fmcontent/index.php?topic=$1&page=$2 [L] -RewriteRule ^fmcontent/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/fmcontent/content.php?id=$2&page=$3 [L] -RewriteRule ^fmcontent/print/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/fmcontent/print.php?id=$2&page=$3 [L] -RewriteRule ^fmcontent/pdf/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/fmcontent/pdf.php?id=$2&page=$3 [L] -RewriteRule ^fmcontent/comment-new/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/fmcontent/comment-new.php?id=$2&page=$3 [L] -RewriteRule ^fmcontent/comment-edit/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/fmcontent/comment-edit.php?id=$2&page=$3&com_id=$3 [L] -RewriteRule ^fmcontent/comment-reply/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/fmcontent/comment-reply.php?id=$2&page=$3&com_id=$3 [L] -RewriteRule ^fmcontent/comment-delete/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/fmcontent/comment-delete.php?id=$2&page=$3&com_id=$3 [L] \ No newline at end of file +RewriteRule ^news/topic/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/news/index.php?topic=$1&page=$2 [L] +RewriteRule ^news/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/news/article.php?id=$2&page=$3 [L] +RewriteRule ^news/print/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/news/print.php?id=$2&page=$3 [L] +RewriteRule ^news/pdf/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/news/pdf.php?id=$2&page=$3 [L] +RewriteRule ^news/comment-new/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/news/comment-new.php?id=$2&page=$3 [L] +RewriteRule ^news/comment-edit/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/news/comment-edit.php?id=$2&page=$3&com_id=$3 [L] +RewriteRule ^news/comment-reply/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/news/comment-reply.php?id=$2&page=$3&com_id=$3 [L] +RewriteRule ^news/comment-delete/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)\.html$ modules/news/comment-delete.php?id=$2&page=$3&com_id=$3 [L] + +OR + +RewriteRule ^topic/([a-zA-Z0-9_-]*)$ modules/news/index.php?topic=$1 [L] +RewriteRule ^([a-zA-Z0-9_-]*)$ modules/news/article.php?story=$1 [L] +RewriteRule ^([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)$ modules/news/article.php?story=$2 [L] +RewriteRule ^print/([a-zA-Z0-9_-]*)$ modules/news/print.php?story=$1 [L] +RewriteRule ^pdf/([a-zA-Z0-9_-]*)$ modules/news/pdf.php?story=$1 [L] \ No newline at end of file Modified: XoopsModules/fmcontent/branches/news/index.php =================================================================== --- XoopsModules/fmcontent/branches/news/index.php 2012-05-14 19:27:39 UTC (rev 9506) +++ XoopsModules/fmcontent/branches/news/index.php 2012-05-15 04:45:14 UTC (rev 9507) @@ -41,8 +41,8 @@ if (isset ( $_REQUEST ["storytopic"] )) { $story_topic = NewsUtils::News_CleanVars ( $_REQUEST, 'storytopic', 0, 'int' ); -} elseif(isset ($_REQUEST ["page"])) { - $topic_alias = NewsUtils::News_CleanVars ( $_REQUEST, 'story', 0, 'string' ); +} elseif(isset ($_REQUEST ["topic"])) { + $topic_alias = NewsUtils::News_CleanVars ( $_REQUEST, 'topic', 0, 'string' ); $story_topic = $topic_handler->News_GetTopicId($topic_alias); } else { $story_topic = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |