diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-07-17 16:36:15 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-07-17 17:41:47 +0200 |
commit | 4c0c5b64c2915e765ed4b5009eef2c283fc54024 (patch) | |
tree | c65d4fc157a6c7528df4cc9378c04a0a6e0bb505 /help | |
parent | f4121339afc887190291a14360ecb6765106efec (diff) | |
download | nextcloud-server-4c0c5b64c2915e765ed4b5009eef2c283fc54024.tar.gz nextcloud-server-4c0c5b64c2915e765ed4b5009eef2c283fc54024.zip |
show a proper error message in help when it can't get the data from apps.owncloud.com
Diffstat (limited to 'help')
-rw-r--r-- | help/templates/index.php | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/help/templates/index.php b/help/templates/index.php index ac7e12b757a..7105507f5eb 100644 --- a/help/templates/index.php +++ b/help/templates/index.php @@ -1,23 +1,27 @@ <h1><?php echo $l->t( 'Questions and Answers' ); ?></h1> -<table cellspacing="0" width="100%"> - <tbody> - <?php foreach($_["kbe"] as $kb): ?> - <tr> - <td width="1"><?php if($kb["preview1"] <> "") { echo('<img class="preview" border="0" src="'.$kb["preview1"].'" />'); } ?> </a></td> - <td class="name"><?php echo $kb["name"]; ?><br /><?php echo('<span class="type">'.$kb['description'].'</span>'); ?><br /> - <?php if($kb['answer']<>'') echo('<br /><span class="type"><b>Answer:</b></span><br /><span class="type">'.$kb['answer'].'</span>');?> - </td> - </tr> - <?php endforeach; ?> - </tbody> -</table> -<?php - $url=OC_HELPER::linkTo( "help", "index.php" ).'?page='; - $pageNavi=OC_UTIL::getPageNavi($_['pagecount'],$_['page'],$url); - $pageNavi->printPage(); -?> -<a target="_blank" class="prettybutton" href="http://apps.owncloud.com/knowledgebase/editquestion.php?action=new"><?php echo $l->t( 'ASK A QUESTION' ); ?></a> +<?php if(is_null($_["kbe"])):?> + Can't connect to Q&A database +<?php else:?> + <table cellspacing="0" width="100%"> + <tbody> + <?php foreach($_["kbe"] as $kb): ?> + <tr> + <td width="1"><?php if($kb["preview1"] <> "") { echo('<img class="preview" border="0" src="'.$kb["preview1"].'" />'); } ?> </a></td> + <td class="name"><?php echo $kb["name"]; ?><br /><?php echo('<span class="type">'.$kb['description'].'</span>'); ?><br /> + <?php if($kb['answer']<>'') echo('<br /><span class="type"><b>Answer:</b></span><br /><span class="type">'.$kb['answer'].'</span>');?> + </td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + <?php + $url=OC_HELPER::linkTo( "help", "index.php" ).'?page='; + $pageNavi=OC_UTIL::getPageNavi($_['pagecount'],$_['page'],$url); + $pageNavi->printPage(); + ?> + <a target="_blank" class="prettybutton" href="http://apps.owncloud.com/knowledgebase/editquestion.php?action=new"><?php echo $l->t( 'ASK A QUESTION' ); ?></a> +<?php endif;?> |