Browse files

# [#20107] Merge changes from 1.5-xillibit-fixing

git-svn-id: file:///Users/oratzes/svn/kunena@2667 daf2aa89-cb5b-0410-b8ee-fe93ebc9b27d
  • Loading branch information...
1 parent c0d7b86 commit 6b34c2f8cd74a3b08407860d5b8cf0e9e49f5ba4 @mahagr mahagr committed Jun 7, 2010
View
44 administrator/components/com_kunena/admin.kunena.php
@@ -1725,20 +1725,27 @@ function editsmiley($option, $id)
function newsmiley($option)
{
$kunena_db = &JFactory::getDBO();
+ $app =& JFactory::getApplication();
$smileypath = smileypath();
$smileypathabs = $smileypath ['abs'];
$smileypath = $smileypath['live'];
- $smiley_images = collect_smilies_ranks ($smileypathabs);
+ if ( JFolder::exists($smileypathabs) ) {
- $filename_list = "";
- for( $i = 0; $i < count($smiley_images); $i++ )
- {
- $filename_list .= '<option value="' . $smiley_images[$i] . '">' . $smiley_images[$i] . '</option>'."\n";
- }
+ $smiley_images = collect_smilies_ranks ($smileypathabs);
+
+ $filename_list = "";
+ for( $i = 0; $i < count($smiley_images); $i++ )
+ {
+ $filename_list .= '<option value="' . $smiley_images[$i] . '">' . $smiley_images[$i] . '</option>'."\n";
+ }
- html_Kunena::newsmiley($option, $filename_list, $smileypath);
+ html_Kunena::newsmiley($option, $filename_list, $smileypath);
+ } else {
+ $app->enqueueMessage(_KUNENA_LANGUAGE_DIRECTORY_NOT_PRESENT, 'error');
+ $app->redirect( JURI::base() ."index.php?option=$option&task=showsmilies");
+ }
}
function savesmiley($option, $id = NULL)
@@ -1881,21 +1888,28 @@ function rankpath()
function newRank($option)
{
$kunena_db = &JFactory::getDBO();
+ $app =& JFactory::getApplication();
$rankpath = rankpath();
$rankpathabs = $rankpath ['abs'];
$rankpath = $rankpath['live'];
- $rank_images = collect_smilies_ranks($rankpathabs);
+ if ( JFolder::exists($rankpathabs) ) {
- $filename_list = "";
- $i = 0;
- foreach ($rank_images as $id=>$row)
- {
- $filename_list .= '<option value="' . $rank_images[$id] . '">' . $rank_images[$id] . '</option>'."\n";
- }
+ $rank_images = collect_smilies_ranks($rankpathabs);
- html_Kunena::newRank($option, $filename_list, $rankpath);
+ $filename_list = "";
+ $i = 0;
+ foreach ($rank_images as $id=>$row)
+ {
+ $filename_list .= '<option value="' . $rank_images[$id] . '">' . $rank_images[$id] . '</option>'."\n";
+ }
+
+ html_Kunena::newRank($option, $filename_list, $rankpath);
+ } else {
+ $app->enqueueMessage(_KUNENA_LANGUAGE_DIRECTORY_NOT_PRESENT, 'error');
+ $app->redirect( JURI::base() ."index.php?option=$option&task=ranks");
+ }
}
function deleteRank($option, $cid = null)
View
1 administrator/components/com_kunena/language/kunena.english.php
@@ -62,6 +62,7 @@
define('_KUNENA_BBCODE_HIDEFILE', 'This attachment is hidden for guests. Please login or register to see it.');
DEFINE('_COM_A_HIDE', 'Hide');
DEFINE('_COM_A_SHOW', 'Show');
+DEFINE('_KUNENA_LANGUAGE_DIRECTORY_NOT_PRESENT', 'Please check that you have a directory in your template nammed like the default language in your system');
// 1.5.10
DEFINE('_KUNENA_PARENTDESC', 'Note: To create a category, choose <em>Top Level Category</em> as the parent. A category serves as a container for forums.<br />A forum can only be created within a category by selecting an existing category as the parent for the forum.<br /> Messages can only be posted to forums, not categories.');
View
3 components/com_kunena/CHANGELOG.php
@@ -33,6 +33,9 @@
Kunena 1.5.12-RC1
+04-Jun-2010 Xillibit
+# [#20838] Alert the user on new ranks and new smilies when the directory : 'french, spanish' isn't here
+
02-Jun-2010 Matias
# [#20107] Merge changes from 1.5-xillibit-fixing
# [#20797] Small improvement to the router

0 comments on commit 6b34c2f

Please sign in to comment.