Changeset 69
- Timestamp:
- 01/27/06 08:11:50 (3 years ago)
- Files:
-
- trunk/apps (added)
- trunk/batch/load_data.php (modified) (1 diff)
- trunk/frontend/config/config.php (modified) (4 diffs)
- trunk/frontend/config/i18n.yml (added)
- trunk/frontend/config/settings.yml (modified) (3 diffs)
- trunk/frontend/i18n/global (deleted)
- trunk/frontend/i18n/messages.fr.xml (copied) (copied from trunk/frontend/i18n/global/messages.fr.xml) (1 diff)
- trunk/frontend/lib/myTagFilter.class.php (modified) (3 diffs)
- trunk/frontend/modules/administrator/templates/_user_options.php (modified) (1 diff)
- trunk/frontend/modules/administrator/templates/usersSuccess.php (modified) (1 diff)
- trunk/frontend/modules/answer/templates/_answer.php (modified) (1 diff)
- trunk/frontend/modules/answer/templates/_list.php (modified) (2 diffs)
- trunk/frontend/modules/answer/templates/_vote_user.php (modified) (1 diff)
- trunk/frontend/modules/api/actions/actions.class.php (modified) (1 diff)
- trunk/frontend/modules/api/templates/questionSuccess.php (modified) (1 diff)
- trunk/frontend/modules/content/actions/actions.class.php (modified) (2 diffs)
- trunk/frontend/modules/feed/actions/actions.class.php (modified) (5 diffs)
- trunk/frontend/modules/mail/actions/actions.class.php (modified) (1 diff)
- trunk/frontend/modules/moderator/templates/_answer_options.php (modified) (1 diff)
- trunk/frontend/modules/moderator/templates/_question_options.php (modified) (1 diff)
- trunk/frontend/modules/question/actions/actions.class.php (modified) (1 diff)
- trunk/frontend/modules/question/i18n (added)
- trunk/frontend/modules/question/i18n/messages.fr.xml (added)
- trunk/frontend/modules/question/templates/_interested_user.php (modified) (1 diff)
- trunk/frontend/modules/question/templates/_question_block.php (modified) (1 diff)
- trunk/frontend/modules/question/templates/_search.php (modified) (1 diff)
- trunk/frontend/modules/question/templates/addSuccess.php (modified) (1 diff)
- trunk/frontend/modules/question/templates/searchSuccess.php (modified) (3 diffs)
- trunk/frontend/modules/question/templates/showSuccess.php (modified) (1 diff)
- trunk/frontend/modules/sidebar/templates/_administration.php (modified) (1 diff)
- trunk/frontend/modules/sidebar/templates/_moderation.php (modified) (1 diff)
- trunk/frontend/modules/sidebar/templates/questionSuccess.php (modified) (1 diff)
- trunk/frontend/modules/tag/actions/actions.class.php (modified) (5 diffs)
- trunk/frontend/modules/tag/templates/_question_tags.php (modified) (2 diffs)
- trunk/frontend/modules/tag/templates/showSuccess.php (modified) (1 diff)
- trunk/frontend/modules/user/templates/listInterestedBySuccess.php (modified) (1 diff)
- trunk/frontend/modules/user/templates/loginSuccess.php (modified) (5 diffs)
- trunk/frontend/modules/user/templates/passwordRequestMailSent.php (modified) (1 diff)
- trunk/frontend/modules/user/templates/passwordRequestSuccess.php (modified) (1 diff)
- trunk/frontend/modules/user/templates/reportAnswerSuccess.php (modified) (1 diff)
- trunk/frontend/modules/user/templates/reportQuestionSuccess.php (modified) (1 diff)
- trunk/frontend/modules/user/templates/showSuccess.php (modified) (1 diff)
- trunk/frontend/templates/error.php (modified) (1 diff)
- trunk/frontend/templates/layout.php (modified) (2 diffs)
- trunk/lib/model/AnswerPeer.php (modified) (4 diffs)
- trunk/lib/model/Question.php (modified) (6 diffs)
- trunk/lib/model/QuestionPeer.php (modified) (7 diffs)
- trunk/lib/model/QuestionTagPeer.php (modified) (5 diffs)
- trunk/lib/model/User.php (modified) (2 diffs)
- trunk/test/frontend/contentActionsTest.php (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/batch/load_data.php
r58 r69 11 11 12 12 $data = new sfPropelData(); 13 $data->loadData( SF_DATA_DIR.DIRECTORY_SEPARATOR.'fixtures');13 $data->loadData(sfConfig::get('sf_data_dir').DIRECTORY_SEPARATOR.'fixtures'); 14 14 15 15 ?> trunk/frontend/config/config.php
r2 r69 1 1 <?php 2 3 // start timer4 define('SF_TIMER_START', microtime(true));5 2 6 3 // symfony directories … … 8 5 { 9 6 // symlink exists 10 define('SF_SYMFONY_LIB_DIR', SF_ROOT_DIR.'/lib/symfony'); 11 define('SF_SYMFONY_DATA_DIR', SF_ROOT_DIR.'/data/symfony'); 7 $sf_symfony_lib_dir = SF_ROOT_DIR.'/lib/symfony'; 8 $sf_symfony_data_dir = SF_ROOT_DIR.'/data/symfony'; 9 $sf_version = '@DEV@'; 12 10 } 13 11 else … … 20 18 } 21 19 20 require_once($sf_symfony_lib_dir.'/symfony/config/sfConfig.class.php'); 21 22 sfConfig::add(array( 23 'sf_root_dir' => SF_ROOT_DIR, 24 'sf_app' => SF_APP, 25 'sf_environment' => SF_ENVIRONMENT, 26 'sf_debug' => SF_DEBUG, 27 'sf_symfony_lib_dir' => $sf_symfony_lib_dir, 28 'sf_symfony_data_dir' => $sf_symfony_data_dir, 29 'sf_test' => false, 30 'sf_version' => $sf_version, 31 )); 32 33 // start timer 34 if (sfConfig::get('sf_debug')) 35 { 36 sfConfig::set('sf_timer_start', microtime(true)); 37 } 38 22 39 // directory layout 23 require(SF_SYMFONY_DATA_DIR.'/symfony/config/constants.php');40 include($sf_symfony_data_dir.'/symfony/config/constants.php'); 24 41 25 42 // include path 26 43 set_include_path( 27 SF_LIB_DIR.PATH_SEPARATOR.28 SF_SYMFONY_LIB_DIR.PATH_SEPARATOR.29 SF_APP_LIB_DIR.PATH_SEPARATOR.30 SF_MODEL_DIR.PATH_SEPARATOR.44 sfConfig::get('sf_lib_dir').PATH_SEPARATOR. 45 sfConfig::get('sf_symfony_lib_dir').PATH_SEPARATOR. 46 sfConfig::get('sf_app_lib_dir').PATH_SEPARATOR. 47 sfConfig::get('sf_model_dir').PATH_SEPARATOR. 31 48 get_include_path() 32 49 ); … … 44 61 require_once(dirname(__FILE__).'/../../config/config.php'); 45 62 46 // test mode 47 @define('SF_TEST', false); 63 // recent symfony update? 64 $version = @file_get_contents(sfConfig::get('sf_config_cache_dir').'/VERSION'); 65 if ($version != $sf_version) 66 { 67 // force cache regeneration 68 foreach (array(sfConfig::get('sf_config_cache_dir').'/config_bootstrap_compile.yml.php', sfConfig::get('sf_config_cache_dir').'/config_core_compile.yml.php') as $file) 69 { 70 if (is_readable($file)) 71 { 72 unlink($file); 73 } 74 } 75 } 48 76 49 77 // go 50 $bootstrap = SF_CONFIG_CACHE_DIR.'/config_bootstrap_compile.yml.php';78 $bootstrap = sfConfig::get('sf_config_cache_dir').'/config_bootstrap_compile.yml.php'; 51 79 if (is_readable($bootstrap)) 52 80 { trunk/frontend/config/settings.yml
r64 r69 29 29 available: on 30 30 31 standard_helpers: Partial,Cache,Form,I18N31 standard_helpers: [Partial, Cache, Form, I18N] 32 32 33 i s_i18n:on33 i18n: on 34 34 35 35 ; default_module: default … … 69 69 ; tidy: on 70 70 ; 71 ; default_culture: en 71 72 72 ; 73 73 ; timeout: 1800 … … 77 77 ; module_default: on 78 78 ; 79 ; standard_helpers: Partial,Cache,Form79 ; standard_helpers: [Partial, Cache, Form] 80 80 ; 81 81 ; max_forwards: 20 trunk/frontend/i18n/messages.fr.xml
r64 r69 3 3 <file orginal="global" source-language="en_US" datatype="plaintext"> 4 4 <body> 5 6 <!-- question module -->7 8 <trans-unit id="1001">9 <source>popular questions</source>10 <target>questions populaires</target>11 </trans-unit>12 13 <trans-unit id="1002">14 <source>asked by %1% on %2%</source>15 <target>posée par %1% le %2%</target>16 </trans-unit>17 18 <trans-unit id="1003">19 <source>%1% answers</source>20 <target>%1% réponses</target>21 </trans-unit>22 23 <trans-unit id="1004">24 <source>%1% answer</source>25 <target>%1% réponse</target>26 </trans-unit>27 28 <trans-unit id="1005">29 <source>answer it</source>30 <target>répondre</target>31 </trans-unit>32 33 <trans-unit id="1006">34 <source>tags:</source>35 <target>tags :</target>36 </trans-unit>37 38 <trans-unit id="1007">39 <source>search with all words</source>40 <target>rechercher avec tous les mots</target>41 </trans-unit>42 43 <trans-unit id="1008">44 <source>search it</source>45 <target>rechercher</target>46 </trans-unit>47 48 <trans-unit id="1009">49 <source>ask a question</source>50 <target>poser une question</target>51 </trans-unit>52 53 <trans-unit id="1010">54 <source>Have you looked for similar questions? Check if a related question already exists: The more interesting a question is, the more people will be willing to answer it.</source>55 <target>Avez-vous regardé si quelqu'un a déjà posé une question similaire ? Recherchez une question approchante à la vôte : Plus vous votez pour une question, plus vous avez de chance que quelqu'un y répondra.</target>56 </trans-unit>57 58 <trans-unit id="1011">59 <source>Be as accurate as you can when giving a title to your question. Keep it short and put the details in the question body.</source>60 <target>Soyez le plus précis possible sur le titre de votre question. Restez concis et mettez plus de détails dans la description de votre question.</target>61 </trans-unit>62 63 <trans-unit id="1012">64 <source>question:</source>65 <target>question :</target>66 </trans-unit>67 68 <trans-unit id="1013">69 <source>describe it:</source>70 <target>description :</target>71 </trans-unit>72 73 <trans-unit id="1015">74 <source>example: askeet "how to"</source>75 <target>exemple : askeet "how to"</target>76 </trans-unit>77 78 <trans-unit id="1016">79 <source>ask it</source>80 <target>poser la question</target>81 </trans-unit>82 83 <trans-unit id="1017">84 <source>recent questions</source>85 <target>questions récentes</target>86 </trans-unit>87 88 <trans-unit id="1018">89 <source>There is no more result to your search.</source>90 <target>Il n'y a plus d'autre réponse à votre recherche.</target>91 </trans-unit>92 93 <trans-unit id="1019">94 <source>Sorry, there is no question matching your search terms.</source>95 <target>Désolé, aucune réponse ne répond à vos critères de recherche.</target>96 </trans-unit>97 98 <trans-unit id="1020">99 <source>more results</source>100 <target>plus de résultats</target>101 </trans-unit>102 103 <trans-unit id="1021">104 <source>Answers</source>105 <target>Réponses</target>106 </trans-unit>107 108 <trans-unit id="1022">109 <source>you must give a title to your question</source>110 <target>vous devez donner un titre à votre question</target>111 </trans-unit>112 113 <trans-unit id="1023">114 <source>you must provide a brief context for your question</source>115 <target>vous devez décrire brièvement votre question</target>116 </trans-unit>117 118 <trans-unit id="1024">119 <source>you must provide some tags for your question</source>120 <target>vous devez ajouter un ou plusieurs tags à votre question</target>121 </trans-unit>122 123 <trans-unit id="1025">124 <source>please, give some more details</source>125 <target>veuillez mettre un peu plus de détails sur votre question</target>126 </trans-unit>127 128 <trans-unit id="1026">129 <source>Are you sure you want to delete this user and all his contributions?</source>130 <target>Etes-vous sûr de vouloir supprimer cet utilisateur et toutes ses contributions ?</target>131 </trans-unit>132 5 133 6 <!-- global layout --> trunk/frontend/lib/myTagFilter.class.php
r64 r69 24 24 25 25 // execute this filter only once 26 if ( APP_UNIVERSE&& !isset($loaded))26 if (sfConfig::get('app_universe') && !isset($loaded)) 27 27 { 28 28 // load the filter … … 37 37 38 38 // add a permanent tag constant 39 define('APP_PERMANENT_TAG', $tag);39 sfConfig::set('app_permanent_tag', $tag); 40 40 41 41 // add a custom stylesheet … … 43 43 44 44 // is the tag a culture? 45 if (is_readable( SF_APP_I18N_DIR.'/global/messages.'.strtolower($tag).'.xml'))45 if (is_readable(sfConfig::get('sf_app_i18n_dir').'/messages.'.strtolower($tag).'.xml')) 46 46 { 47 47 $this->getContext()->getUser()->setCulture(strtolower($tag)); trunk/frontend/modules/administrator/templates/_user_options.php
r64 r69 1 <?php if ($ user->hasCredential('administrator')): ?>1 <?php if ($sf_user->hasCredential('administrator')): ?> 2 2 <div class="options"> 3 3 <?php if ($subscriber->getDeletions()): ?> trunk/frontend/modules/administrator/templates/usersSuccess.php
r55 r69 1 1 <h1><?php echo $title ?></h1> 2 2 3 <?php foreach ($ users as $subscriber): ?>3 <?php foreach ($sf_users as $subscriber): ?> 4 4 <h2><?php echo link_to($subscriber->getNickname(), '@user_profile?nickname='.$subscriber->getNickname()) ?></h2> 5 5 trunk/frontend/modules/answer/templates/_answer.php
r64 r69 9 9 <div class="subtitle" style="margin-top: -8px"><?php echo __('answered by %1% on %2%', array('%1%' => link_to_profile($answer->getUser()), '%2%' => format_date($answer->getCreatedAt(), 'f'))) ?></div> 10 10 <div class="options" id="report_answer_<?php echo $answer->getId() ?>"> 11 <?php echo link_to_report_answer($answer, $ user) ?>11 <?php echo link_to_report_answer($answer, $sf_user) ?> 12 12 <?php echo include_partial('moderator/answer_options', array('answer' => $answer)) ?> 13 13 </div> trunk/frontend/modules/answer/templates/_list.php
r64 r69 20 20 <label for="author"><?php echo __('author:') ?></label> 21 21 <div style="display: inline; float: left"> 22 <?php if ($ user->isAuthenticated()): ?>23 <?php echo $ user->getNickname() ?>22 <?php if ($sf_user->isAuthenticated()): ?> 23 <?php echo $sf_user->getNickname() ?> 24 24 <?php else: ?> 25 25 <?php echo __('anonymous coward') ?> … … 30 30 31 31 <label for="body"><?php echo __('your answer:') ?></label> 32 <?php echo textarea_tag('body', $ params->get('body'), 'size=40x10') ?>32 <?php echo textarea_tag('body', $sf_params->get('body'), 'size=40x10') ?> 33 33 <br class="clearleft" /> 34 34 <?php echo include_partial('content/markdown_help') ?> trunk/frontend/modules/answer/templates/_vote_user.php
r38 r69 1 1 <?php use_helper('Answer') ?> 2 2 3 <div class="vote_up_mark"><?php echo link_to_user_relevancy_up($ user, $answer) ?></div>4 <div class="vote_down_mark"><?php echo link_to_user_relevancy_down($ user, $answer) ?></div>3 <div class="vote_up_mark"><?php echo link_to_user_relevancy_up($sf_user, $answer) ?></div> 4 <div class="vote_down_mark"><?php echo link_to_user_relevancy_down($sf_user, $answer) ?></div> 5 5 6 6 <br class="clearleft" /> trunk/frontend/modules/api/actions/actions.class.php
r44 r69 13 13 public function preExecute() 14 14 { 15 $this->getRequest()->setAttribute('disable_web_debug', true, 'debug/web');15 sfConfig::set('sf_web_debug', false); 16 16 } 17 17 trunk/frontend/modules/api/templates/questionSuccess.php
r44 r69 4 4 <title><?php echo $question->getTitle() ?></title> 5 5 <tags> 6 <?php foreach ($ user->getSubscriber()->getTagsFor($question) as $tag): ?>6 <?php foreach ($sf_user->getSubscriber()->getTagsFor($question) as $tag): ?> 7 7 <tag><?php echo $tag ?></tag> 8 8 <?php endforeach ?> trunk/frontend/modules/content/actions/actions.class.php
r64 r69 15 15 require_once('markdown.php'); 16 16 17 $file = SF_DATA_DIR.'/content/about_'.$this->getUser()->getCulture().'.txt';17 $file = sfConfig::get('sf_data_dir').'/content/about_'.$this->getUser()->getCulture().'.txt'; 18 18 if (!is_readable($file)) 19 19 { 20 $file = SF_DATA_DIR.'/content/about_en.txt';20 $file = sfConfig::get('sf_data_dir').'/content/about_en.txt'; 21 21 } 22 22 … … 30 30 require_once('markdown.php'); 31 31 32 $file = SF_DATA_DIR.'/content/unavailable_'.$this->getUser()->getCulture().'.txt';32 $file = sfConfig::get('sf_data_dir').'/content/unavailable_'.$this->getUser()->getCulture().'.txt'; 33 33 if (!is_readable($file)) 34 34 { 35 $file = SF_DATA_DIR.'/content/unavailable_en.txt';35 $file = sfConfig::get('sf_data_dir').'/content/unavailable_en.txt'; 36 36 } 37 37 trunk/frontend/modules/feed/actions/actions.class.php
r40 r69 13 13 public function preExecute() 14 14 { 15 $this->getRequest()->setAttribute('disable_web_debug', true, 'debug/web');15 sfConfig::set('sf_web_debug', false); 16 16 } 17 17 … … 19 19 { 20 20 // questions 21 $questions = QuestionPeer::getPopular( APP_FEED_MAX_QUESTIONS);21 $questions = QuestionPeer::getPopular(sfConfig::get('app_feed_max_questions')); 22 22 23 23 $feed = sfFeed::newInstance('rss201rev2'); … … 39 39 { 40 40 // questions 41 $questions = QuestionPeer::getRecent( APP_FEED_MAX_QUESTIONS);41 $questions = QuestionPeer::getRecent(sfConfig::get('app_feed_max_questions')); 42 42 43 43 $feed = sfFeed::newInstance('rss201rev2'); … … 59 59 { 60 60 // questions 61 $answers = AnswerPeer::getRecent( APP_FEED_MAX_QUESTIONS);61 $answers = AnswerPeer::getRecent(sfConfig::get('app_feed_max_questions')); 62 62 63 63 $feed = sfFeed::newInstance('rss201rev2'); … … 85 85 $c->add(AnswerPeer::QUESTION_ID, $question->getId()); 86 86 $c->addDescendingOrderByColumn(AnswerPeer::CREATED_AT); 87 $c->setLimit( APP_FEED_MAX_QUESTIONS);87 $c->setLimit(sfConfig::get('app_feed_max_questions')); 88 88 $answers = AnswerPeer::doSelect($c); 89 89 trunk/frontend/modules/mail/actions/actions.class.php
r29 r69 20 20 $mail->setPriority(1); 21 21 22 $mail->addEmbeddedImage( SF_WEB_DIR.'/images/askeet_logo.gif', 'CID1', 'Askeet Logo', 'base64', 'image/gif');22 $mail->addEmbeddedImage(sfConfig::get('sf_web_dir').'/images/askeet_logo.gif', 'CID1', 'Askeet Logo', 'base64', 'image/gif'); 23 23 24 24 $this->mail = $mail; trunk/frontend/modules/moderator/templates/_answer_options.php
r64 r69 1 <?php if ($ user->hasCredential('moderator')): ?>1 <?php if ($sf_user->hasCredential('moderator')): ?> 2 2 <?php if ($answer->getReports()): ?> 3 3 [<?php echo __('%1% reports', array('%1%' => $answer->getReports())) ?>] trunk/frontend/modules/moderator/templates/_question_options.php
r64 r69 1 <?php if ($ user->hasCredential('moderator')): ?>1 <?php if ($sf_user->hasCredential('moderator')): ?> 2 2 <?php if ($question->getReports()): ?> 3 3 [<?php echo __('%1% reports', array('%1%' => $question->getReports())) ?>] trunk/frontend/modules/question/actions/actions.class.php
r58 r69 58 58 if ($this->getRequestParameter('search')) 59 59 { 60 $this->questions = QuestionPeer::search($this->getRequestParameter('search'), $this->getRequestParameter('search_all', false), ($this->getRequestParameter('page', 1) - 1) * APP_SEARCH_RESULTS_MAX, APP_SEARCH_RESULTS_MAX);60 $this->questions = QuestionPeer::search($this->getRequestParameter('search'), $this->getRequestParameter('search_all', false), ($this->getRequestParameter('page', 1) - 1) * sfConfig::get('app_search_results_max'), sfConfig::get('app_search_results_max')); 61 61 } 62 62 else trunk/frontend/modules/question/templates/_interested_user.php
r64 r69 17 17 </div> 18 18 19 <div class="interested_link"><?php echo link_to_user_interested($ user, $question) ?></div>19 <div class="interested_link"><?php echo link_to_user_interested($sf_user, $question) ?></div> trunk/frontend/modules/question/templates/_question_block.php
r64 r69 36 36 37 37 <div class="options" id="report_question_<?php echo $question->getId() ?>"> 38 <?php echo link_to_report_question($question, $ user) ?>38 <?php echo link_to_report_question($question, $sf_user) ?> 39 39 <?php include_partial('moderator/question_options', array('question' => $question)) ?> 40 40 </div> trunk/frontend/modules/question/templates/_search.php
r64 r69 3 3 <fieldset> 4 4 5 <?php echo input_tag('search', htmlspecialchars($ params->get('search')), array('style' => 'width: 150px')) ?> 5 <?php echo input_tag('search', htmlspecialchars($sf_params->get('search')), array('style' => 'width: 150px')) ?> 6 6 <?php echo submit_tag(__('search it'), 'class=small') ?> 7 <?php echo checkbox_tag('search_all', 1, $ params->get('search_all')) ?> <label for="search_all" class="small"><?php echo __('search with all words') ?></label>7 <?php echo checkbox_tag('search_all', 1, $sf_params->get('search_all')) ?> <label for="search_all" class="small"><?php echo __('search with all words') ?></label> 8 8 9 9 </fieldset> trunk/frontend/modules/question/templates/addSuccess.php
r64 r69 19 19 <?php echo form_error('title') ?> 20 20 <label for="title"><?php echo __('question:') ?></label> 21 <?php echo input_tag('title', $ params->get('title'), 'size=40') ?>21 <?php echo input_tag('title', $sf_params->get('title'), 'size=40') ?> 22 22 <br class="clearleft" /> 23 23 24 24 <?php echo form_error('body') ?> 25 25 <label for="label"><?php echo __('describe it:') ?></label> 26 <?php echo textarea_tag('body', $ params->get('body'), 'size=40x10') ?>26 <?php echo textarea_tag('body', $sf_params->get('body'), 'size=40x10') ?> 27 27 <br class="clearleft" /> 28 28 <?php echo include_partial('content/markdown_help') ?> trunk/frontend/modules/question/templates/searchSuccess.php
r64 r69 1 1 <?php use_helpers('Global') ?> 2 2 3 <h1><?php echo __('questions matching "%1%"', array('%1%' => htmlspecialchars($ params->get('search')))) ?></h1>3 <h1><?php echo __('questions matching "%1%"', array('%1%' => htmlspecialchars($sf_params->get('search')))) ?></h1> 4 4 5 5 <?php foreach($questions as $question): ?> … … 7 7 <?php endforeach ?> 8 8 9 <?php if ($ params->get('page') > 1 && !count($questions)): ?>9 <?php if ($sf_params->get('page') > 1 && !count($questions)): ?> 10 10 <div><?php echo __('There is no more result to your search.') ?></div> 11 11 <?php elseif (!count($questions)): ?> … … 13 13 <?php endif ?> 14 14 15 <?php if (count($questions) == APP_SEARCH_RESULTS_MAX): ?>15 <?php if (count($questions) == sfConfig::get('app_search_results_max')): ?> 16 16 <div class="right"> 17 <?php echo link_to(__('more results').' »', '@search_question?search='.$ params->get('search').'&page='.($params->get('page', 1) + 1)) ?>17 <?php echo link_to(__('more results').' »', '@search_question?search='.$sf_params->get('search').'&page='.($sf_params->get('page', 1) + 1)) ?> 18 18 </div> 19 19 <?php endif ?> trunk/frontend/modules/question/templates/showSuccess.php
r64 r69 17 17 <?php echo $question->getHtmlBody() ?> 18 18 <div class="options" id="report_question_<?php echo $question->getId() ?>"> 19 <?php echo link_to_report_question($question, $ user) ?>19 <?php echo link_to_report_question($question, $sf_user) ?> 20 20 <?php include_partial('moderator/question_options', array('question' => $question)) ?> 21 21 </div> trunk/frontend/modules/sidebar/templates/_administration.php
r64 r69 1 <?php if ($ user->hasCredential('administrator')): ?>1 <?php if ($sf_user->hasCredential('administrator')): ?> 2 2 <h2><?php echo __('administration') ?></h2> 3 3 trunk/frontend/modules/sidebar/templates/_moderation.php
r64 r69 1 <?php if ($ user->hasCredential('moderator')): ?>1 <?php if ($sf_user->hasCredential('moderator')): ?> 2 2 <h2><?php echo __('moderation') ?></h2> 3 3 trunk/frontend/modules/sidebar/templates/questionSuccess.php
r64 r69 17 17 </ul> 18 18 19 <?php if ($ user->isAuthenticated()): ?>19 <?php if ($sf_user->isAuthenticated()): ?> 20 20 <div><?php echo __('add your own:') ?> 21 21 <?php echo form_remote_tag(array( trunk/frontend/modules/tag/actions/actions.class.php
r55 r69 21 21 { 22 22 // disable web debug toolbar 23 $this->getRequest()->setAttribute('disable_web_debug', true, 'debug/web');23 sfConfig::set('sf_web_debug', false); 24 24 25 25 $this->tags = QuestionTagPeer::getForUserLike($this->getUser()->getSubscriberId(), $this->getRequestParameter('tag')); … … 29 29 { 30 30 // disable web debug toolbar 31 $this->getRequest()->setAttribute('disable_web_debug', true, 'debug/web');31 sfConfig::set('sf_web_debug', false); 32 32 33 33 $this->question = QuestionPeer::retrieveByPk($this->getRequestParameter('question_id')); … … 41 41 42 42 // clear the question tag list fragment in cache 43 if ( SF_CACHE)43 if (sfConfig::get('sf_cache')) 44 44 { 45 45 $this->getContext()->getViewCacheManager()->remove('@question?stripped_title='.$this->question->getStrippedTitle(), 'fragment_question_tags'); … … 50 50 { 51 51 // disable web debug toolbar 52 $this->getRequest()->setAttribute('disable_web_debug', true, 'debug/web');52 sfConfig::set('sf_web_debug', false); 53 53 54 54 $this->question = QuestionPeer::getQuestionFromTitle($this->getRequestParameter('stripped_title')); … … 64 64 65 65 // clear the question tag list fragment in cache 66 if ( SF_CACHE)66 if (sfConfig::get('sf_cache')) 67 67 { 68 68 $this->getContext()->getViewCacheManager()->remove('@question?stripped_title='.$this->question->getStrippedTitle(), 'fragment_question_tags'); trunk/frontend/modules/tag/templates/_question_tags.php
r64 r69 1 1 <?php use_helper('Javascript') ?> 2 2 3 <?php if ($ user->isAuthenticated()): ?>4 <?php $ user_tags = $user->getSubscriber()->getTagsFor($question) ?>3 <?php if ($sf_user->isAuthenticated()): ?> 4 <?php $sf_user_tags = $sf_user->getSubscriber()->getTagsFor($question) ?> 5 5 <ul> 6 6 <?php foreach ($question->getPopularTags(20) as $tag => $count): ?> 7 7 <li> 8 <?php if (isset($ user_tags[$tag])): ?>9 <?php echo link_to($ user_tags[$tag], '@tag?tag='.$tag, 'rel=tag') ?>8 <?php if (isset($sf_user_tags[$tag])): ?> 9 <?php echo link_to($sf_user_tags[$tag], '@tag?tag='.$tag, 'rel=tag') ?> 10 10 <?php echo link_to_remote('[x]', array( 11 11 'url' => '@tag_remove?stripped_title='.$question->getStrippedTitle().'&tag='.$tag, … … 18 18 <?php endif ?> 19 19 20 <?php if ($ user->hasCredential('moderator')): ?>20 <?php if ($sf_user->hasCredential('moderator')): ?> 21 21 <?php echo link_to('['.__('delete tag').']', 'moderator/deleteTagForQuestion?tag='.$tag.'&question_id='.$question->getId(), 'confirm='.__('Are you sure you want to delete this tag for this question?')) ?> 22 22 <?php endif ?> trunk/frontend/modules/tag/templates/showSuccess.php
r64 r69 1 <h1><?php echo __('popular questions for tag "%1%"', array('%1%' => $ request->getParameter('tag'))) ?></h1>1 <h1><?php echo __('popular questions for tag "%1%"', array('%1%' => $sf_request->getParameter('tag'))) ?></h1> 2 2 3 3 <?php echo include_partial('question/question_list', array('question_pager' => $question_pager)) ?> 4 <?php echo pager_navigation($question_pager, '@tag?tag='.$ request->getParameter('tag')) ?>4 <?php echo pager_navigation($question_pager, '@tag?tag='.$sf_request->getParameter('tag')) ?> trunk/frontend/modules/user/templates/listInterestedBySuccess.php
r64 r69 12 12 13 13 <div id="users_pager"> 14 <?php echo pager_navigation($interested_users_pager, '@user_interests?stripped_title='.$ request->getParameter('stripped_title')) ?>14 <?php echo pager_navigation($interested_users_pager, '@user_interests?stripped_title='.$sf_request->getParameter('stripped_title')) ?> 15 15 </div> trunk/frontend/modules/user/templates/loginSuccess.php
r64 r69 7 7 </div> 8 8 9 <?php echo form_tag($ request->getAttribute('newaccount', false) ? '@add_account' : '@login', 'id=login_form class=form') ?>9 <?php echo form_tag($sf_request->getAttribute('newaccount', false) ? '@add_account' : '@login', 'id=login_form class=form') ?> 10 10 11 11 <fieldset> … … 13 13 <?php echo form_error('nickname') ?> 14 14 <label for="nickname"><?php echo __('nickname:') ?></label> 15 <?php echo input_tag('nickname', $ params->get('nickname')) ?>15 <?php echo input_tag('nickname', $sf_params->get('nickname')) ?> 16 16 <br class="clearleft"/> 17 17 … … 22 22 23 23 <div class="in_form"> 24 <?php echo checkbox_tag('new', 1, $ request->getAttribute('newaccount', false) ? 1 : 0, array('onclick' => 'toggleForm()')) ?>24 <?php echo checkbox_tag('new', 1, $sf_request->getAttribute('newaccount', false) ? 1 : 0, array('onclick' => 'toggleForm()')) ?> 25 25 <label for="new" style="display: inline; float: none"><?php echo __('click here to create a new account') ?></label> 26 26 </div> 27 27 <br class="clearleft"/> 28 28 29 <div id="new_account"<?php echo $ request->getAttribute('newaccount', false) ? '' : ' style="display: none"' ?>>29 <div id="new_account"<?php echo $sf_request->getAttribute('newaccount', false) ? '' : ' style="display: none"' ?>> 30 30 31 31 <label for="password_bis"><?php echo __('confirm your password:') ?></label> … … 35 35 <?php echo form_error('email') ?> 36 36 <label for="email"><?php echo __('your email:') ?></label> 37 <?php echo input_tag('email', $ params->get('email')) ?>37 <?php echo input_tag('email', $sf_params->get('email')) ?> 38 38 <br class="clearleft"/> 39 39 <div class="small in_form"><?php echo __('askeet will never disclose this address to a third party') ?></div> … … 43 43 </fieldset> 44 44 45 <?php echo input_hidden_tag('referer', $ request->getAttribute('referer')) ?>45 <?php echo input_hidden_tag('referer', $sf_request->getAttribute('referer')) ?> 46 46 <div class="right"> 47 47 <?php echo submit_tag(__('sign in')) ?> trunk/frontend/modules/user/templates/passwordRequestMailSent.php
r64 r69 2 2 3 3 <p><?php echo __('Your login information was sent to') ?></p> 4 <p><?php echo $ request->getParameter('email') ?></p>4 <p><?php echo $sf_request->getParameter('email') ?></p> 5 5 <p><?php echo __('You should receive it shortly, so you can proceed to the %1%.', array('%1%' => link_to(__('login page'),'@login'))) ?></p> trunk/frontend/modules/user/templates/passwordRequestSuccess.php
r64 r69 9 9 <?php echo form_error('email') ?> 10 10 <label for="email"><?php echo __('email:') ?></label> 11 <?php echo input_tag('email', $ params->get('email'), 'style=width:150px') ?>11 <?php echo input_tag('email', $sf_params->get('email'), 'style=width:150px') ?> 12 12 <br class="clearleft" /> 13 13 trunk/frontend/modules/user/templates/reportAnswerSuccess.php
r55 r69 1 1 <?php use_helper('Answer') ?> 2 2 3 <?php echo link_to_report_answer($answer, $ user) ?>3 <?php echo link_to_report_answer($answer, $sf_user) ?> 4 4 <?php echo include_partial('moderator/answer_options', array('answer' => $answer)) ?> trunk/frontend/modules/user/templates/reportQuestionSuccess.php
r55 r69 1 1 <?php use_helper('Question') ?> 2 2
