Changeset 69

Show
Ignore:
Timestamp:
01/27/06 08:11:50 (3 years ago)
Author:
fabien
Message:

upgrade to 0.6 (step 1)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/batch/load_data.php

    r58 r69  
    1111 
    1212$data = new sfPropelData(); 
    13 $data->loadData(SF_DATA_DIR.DIRECTORY_SEPARATOR.'fixtures'); 
     13$data->loadData(sfConfig::get('sf_data_dir').DIRECTORY_SEPARATOR.'fixtures'); 
    1414 
    1515?> 
  • trunk/frontend/config/config.php

    r2 r69  
    11<?php 
    2  
    3 // start timer 
    4 define('SF_TIMER_START', microtime(true)); 
    52 
    63// symfony directories 
     
    85{ 
    96  // 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@'; 
    1210} 
    1311else 
     
    2018} 
    2119 
     20require_once($sf_symfony_lib_dir.'/symfony/config/sfConfig.class.php'); 
     21 
     22sfConfig::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 
     34if (sfConfig::get('sf_debug')) 
     35{ 
     36  sfConfig::set('sf_timer_start', microtime(true)); 
     37} 
     38 
    2239// directory layout 
    23 require(SF_SYMFONY_DATA_DIR.'/symfony/config/constants.php'); 
     40include($sf_symfony_data_dir.'/symfony/config/constants.php'); 
    2441 
    2542// include path 
    2643set_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. 
    3148  get_include_path() 
    3249); 
     
    4461require_once(dirname(__FILE__).'/../../config/config.php'); 
    4562 
    46 // test mode 
    47 @define('SF_TEST', false); 
     63// recent symfony update? 
     64$version = @file_get_contents(sfConfig::get('sf_config_cache_dir').'/VERSION'); 
     65if ($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
    4876 
    4977// 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'; 
    5179if (is_readable($bootstrap)) 
    5280{ 
  • trunk/frontend/config/settings.yml

    r64 r69  
    2929    available:              on 
    3030 
    31     standard_helpers:       Partial,Cache,Form,I18N 
     31    standard_helpers:       [Partial, Cache, Form, I18N] 
    3232 
    33     is_i18n:                on 
     33    i18n:                   on 
    3434 
    3535;    default_module:         default 
     
    6969;    tidy:                   on 
    7070;     
    71 ;    default_culture:        en 
     71 
    7272;     
    7373;    timeout:                1800 
     
    7777;    module_default:         on 
    7878; 
    79 ;    standard_helpers:       Partial,Cache,Form 
     79;    standard_helpers:       [Partial, Cache, Form] 
    8080; 
    8181;    max_forwards:           20 
  • trunk/frontend/i18n/messages.fr.xml

    r64 r69  
    33  <file orginal="global" source-language="en_US" datatype="plaintext"> 
    44    <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> 
    1325       
    1336      <!-- global layout --> 
  • trunk/frontend/lib/myTagFilter.class.php

    r64 r69  
    2424 
    2525    // execute this filter only once 
    26     if (APP_UNIVERSE && !isset($loaded)) 
     26    if (sfConfig::get('app_universe') && !isset($loaded)) 
    2727    { 
    2828      // load the filter 
     
    3737 
    3838        // add a permanent tag constant 
    39         define('APP_PERMANENT_TAG', $tag); 
     39        sfConfig::set('app_permanent_tag', $tag); 
    4040 
    4141        // add a custom stylesheet 
     
    4343 
    4444        // 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')) 
    4646        { 
    4747          $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')): ?> 
    22<div class="options"> 
    33  <?php if ($subscriber->getDeletions()): ?> 
  • trunk/frontend/modules/administrator/templates/usersSuccess.php

    r55 r69  
    11<h1><?php echo $title ?></h1> 
    22 
    3 <?php foreach ($users as $subscriber): ?> 
     3<?php foreach ($sf_users as $subscriber): ?> 
    44  <h2><?php echo link_to($subscriber->getNickname(), '@user_profile?nickname='.$subscriber->getNickname()) ?></h2> 
    55 
  • trunk/frontend/modules/answer/templates/_answer.php

    r64 r69  
    99  <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> 
    1010  <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) ?> 
    1212    <?php echo include_partial('moderator/answer_options', array('answer' => $answer)) ?> 
    1313  </div> 
  • trunk/frontend/modules/answer/templates/_list.php

    r64 r69  
    2020      <label for="author"><?php echo __('author:') ?></label> 
    2121      <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() ?> 
    2424      <?php else: ?> 
    2525        <?php echo __('anonymous coward') ?>&nbsp; 
     
    3030 
    3131      <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') ?> 
    3333      <br class="clearleft" /> 
    3434      <?php echo include_partial('content/markdown_help') ?> 
  • trunk/frontend/modules/answer/templates/_vote_user.php

    r38 r69  
    11<?php use_helper('Answer') ?> 
    22 
    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> 
    55 
    66<br class="clearleft" /> 
  • trunk/frontend/modules/api/actions/actions.class.php

    r44 r69  
    1313  public function preExecute() 
    1414  { 
    15     $this->getRequest()->setAttribute('disable_web_debug', true, 'debug/web'); 
     15    sfConfig::set('sf_web_debug', false); 
    1616  } 
    1717 
  • trunk/frontend/modules/api/templates/questionSuccess.php

    r44 r69  
    44    <title><?php echo $question->getTitle() ?></title> 
    55    <tags> 
    6       <?php foreach ($user->getSubscriber()->getTagsFor($question) as $tag): ?> 
     6      <?php foreach ($sf_user->getSubscriber()->getTagsFor($question) as $tag): ?> 
    77      <tag><?php echo $tag ?></tag> 
    88      <?php endforeach ?> 
  • trunk/frontend/modules/content/actions/actions.class.php

    r64 r69  
    1515    require_once('markdown.php'); 
    1616 
    17     $file = SF_DATA_DIR.'/content/about_'.$this->getUser()->getCulture().'.txt'; 
     17    $file = sfConfig::get('sf_data_dir').'/content/about_'.$this->getUser()->getCulture().'.txt'; 
    1818    if (!is_readable($file)) 
    1919    { 
    20       $file = SF_DATA_DIR.'/content/about_en.txt'; 
     20      $file = sfConfig::get('sf_data_dir').'/content/about_en.txt'; 
    2121    } 
    2222 
     
    3030    require_once('markdown.php'); 
    3131 
    32     $file = SF_DATA_DIR.'/content/unavailable_'.$this->getUser()->getCulture().'.txt'; 
     32    $file = sfConfig::get('sf_data_dir').'/content/unavailable_'.$this->getUser()->getCulture().'.txt'; 
    3333    if (!is_readable($file)) 
    3434    { 
    35       $file = SF_DATA_DIR.'/content/unavailable_en.txt'; 
     35      $file = sfConfig::get('sf_data_dir').'/content/unavailable_en.txt'; 
    3636    } 
    3737 
  • trunk/frontend/modules/feed/actions/actions.class.php

    r40 r69  
    1313  public function preExecute() 
    1414  { 
    15     $this->getRequest()->setAttribute('disable_web_debug', true, 'debug/web'); 
     15    sfConfig::set('sf_web_debug', false); 
    1616  } 
    1717 
     
    1919  { 
    2020    // questions 
    21     $questions = QuestionPeer::getPopular(APP_FEED_MAX_QUESTIONS); 
     21    $questions = QuestionPeer::getPopular(sfConfig::get('app_feed_max_questions')); 
    2222 
    2323    $feed = sfFeed::newInstance('rss201rev2'); 
     
    3939  { 
    4040    // questions 
    41     $questions = QuestionPeer::getRecent(APP_FEED_MAX_QUESTIONS); 
     41    $questions = QuestionPeer::getRecent(sfConfig::get('app_feed_max_questions')); 
    4242 
    4343    $feed = sfFeed::newInstance('rss201rev2'); 
     
    5959  { 
    6060    // questions 
    61     $answers = AnswerPeer::getRecent(APP_FEED_MAX_QUESTIONS); 
     61    $answers = AnswerPeer::getRecent(sfConfig::get('app_feed_max_questions')); 
    6262 
    6363    $feed = sfFeed::newInstance('rss201rev2'); 
     
    8585    $c->add(AnswerPeer::QUESTION_ID, $question->getId()); 
    8686    $c->addDescendingOrderByColumn(AnswerPeer::CREATED_AT); 
    87     $c->setLimit(APP_FEED_MAX_QUESTIONS); 
     87    $c->setLimit(sfConfig::get('app_feed_max_questions')); 
    8888    $answers = AnswerPeer::doSelect($c); 
    8989 
  • trunk/frontend/modules/mail/actions/actions.class.php

    r29 r69  
    2020    $mail->setPriority(1); 
    2121 
    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'); 
    2323 
    2424    $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')): ?> 
    22  <?php if ($answer->getReports()): ?> 
    33    &nbsp;[<?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')): ?> 
    22  <?php if ($question->getReports()): ?> 
    33    &nbsp;[<?php echo __('%1% reports', array('%1%' => $question->getReports())) ?>] 
  • trunk/frontend/modules/question/actions/actions.class.php

    r58 r69  
    5858    if ($this->getRequestParameter('search')) 
    5959    { 
    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')); 
    6161    } 
    6262    else 
  • trunk/frontend/modules/question/templates/_interested_user.php

    r64 r69  
    1717</div> 
    1818 
    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  
    3636 
    3737    <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) ?> 
    3939      <?php include_partial('moderator/question_options', array('question' => $question)) ?> 
    4040    </div> 
  • trunk/frontend/modules/question/templates/_search.php

    r64 r69  
    33<fieldset> 
    44 
    5 <?php echo input_tag('search', htmlspecialchars($params->get('search')), array('style' => 'width: 150px')) ?>&nbsp; 
     5<?php echo input_tag('search', htmlspecialchars($sf_params->get('search')), array('style' => 'width: 150px')) ?>&nbsp; 
    66<?php echo submit_tag(__('search it'), 'class=small') ?> 
    7 <?php echo checkbox_tag('search_all', 1, $params->get('search_all')) ?>&nbsp;<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')) ?>&nbsp;<label for="search_all" class="small"><?php echo __('search with all words') ?></label> 
    88 
    99</fieldset> 
  • trunk/frontend/modules/question/templates/addSuccess.php

    r64 r69  
    1919  <?php echo form_error('title') ?> 
    2020  <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') ?> 
    2222  <br class="clearleft" /> 
    2323 
    2424  <?php echo form_error('body') ?> 
    2525  <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') ?> 
    2727  <br class="clearleft" /> 
    2828  <?php echo include_partial('content/markdown_help') ?> 
  • trunk/frontend/modules/question/templates/searchSuccess.php

    r64 r69  
    11<?php use_helpers('Global') ?> 
    22 
    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> 
    44 
    55<?php foreach($questions as $question): ?> 
     
    77<?php endforeach ?> 
    88 
    9 <?php if ($params->get('page') > 1 && !count($questions)): ?> 
     9<?php if ($sf_params->get('page') > 1 && !count($questions)): ?> 
    1010  <div><?php echo __('There is no more result to your search.') ?></div> 
    1111<?php elseif (!count($questions)): ?> 
     
    1313<?php endif ?> 
    1414 
    15 <?php if (count($questions) == APP_SEARCH_RESULTS_MAX): ?> 
     15<?php if (count($questions) == sfConfig::get('app_search_results_max')): ?> 
    1616  <div class="right"> 
    17     <?php echo link_to(__('more results').' &raquo;', '@search_question?search='.$params->get('search').'&page='.($params->get('page', 1) + 1)) ?> 
     17    <?php echo link_to(__('more results').' &raquo;', '@search_question?search='.$sf_params->get('search').'&page='.($sf_params->get('page', 1) + 1)) ?> 
    1818  </div> 
    1919<?php endif ?> 
  • trunk/frontend/modules/question/templates/showSuccess.php

    r64 r69  
    1717    <?php echo $question->getHtmlBody() ?> 
    1818    <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) ?> 
    2020      <?php include_partial('moderator/question_options', array('question' => $question)) ?> 
    2121    </div> 
  • trunk/frontend/modules/sidebar/templates/_administration.php

    r64 r69  
    1 <?php if ($user->hasCredential('administrator')): ?> 
     1<?php if ($sf_user->hasCredential('administrator')): ?> 
    22  <h2><?php echo __('administration') ?></h2> 
    33 
  • trunk/frontend/modules/sidebar/templates/_moderation.php

    r64 r69  
    1 <?php if ($user->hasCredential('moderator')): ?> 
     1<?php if ($sf_user->hasCredential('moderator')): ?> 
    22  <h2><?php echo __('moderation') ?></h2> 
    33 
  • trunk/frontend/modules/sidebar/templates/questionSuccess.php

    r64 r69  
    1717</ul> 
    1818 
    19 <?php if ($user->isAuthenticated()): ?> 
     19<?php if ($sf_user->isAuthenticated()): ?> 
    2020  <div><?php echo __('add your own:') ?> 
    2121  <?php echo form_remote_tag(array( 
  • trunk/frontend/modules/tag/actions/actions.class.php

    r55 r69  
    2121  { 
    2222    // disable web debug toolbar 
    23     $this->getRequest()->setAttribute('disable_web_debug', true, 'debug/web'); 
     23    sfConfig::set('sf_web_debug', false); 
    2424 
    2525    $this->tags = QuestionTagPeer::getForUserLike($this->getUser()->getSubscriberId(), $this->getRequestParameter('tag')); 
     
    2929  { 
    3030    // disable web debug toolbar 
    31     $this->getRequest()->setAttribute('disable_web_debug', true, 'debug/web'); 
     31    sfConfig::set('sf_web_debug', false); 
    3232 
    3333    $this->question = QuestionPeer::retrieveByPk($this->getRequestParameter('question_id')); 
     
    4141 
    4242    // clear the question tag list fragment in cache 
    43     if (SF_CACHE
     43    if (sfConfig::get('sf_cache')
    4444    { 
    4545      $this->getContext()->getViewCacheManager()->remove('@question?stripped_title='.$this->question->getStrippedTitle(), 'fragment_question_tags'); 
     
    5050  { 
    5151    // disable web debug toolbar 
    52     $this->getRequest()->setAttribute('disable_web_debug', true, 'debug/web'); 
     52    sfConfig::set('sf_web_debug', false); 
    5353 
    5454    $this->question = QuestionPeer::getQuestionFromTitle($this->getRequestParameter('stripped_title')); 
     
    6464 
    6565    // clear the question tag list fragment in cache 
    66     if (SF_CACHE
     66    if (sfConfig::get('sf_cache')
    6767    { 
    6868      $this->getContext()->getViewCacheManager()->remove('@question?stripped_title='.$this->question->getStrippedTitle(), 'fragment_question_tags'); 
  • trunk/frontend/modules/tag/templates/_question_tags.php

    r64 r69  
    11<?php use_helper('Javascript') ?> 
    22 
    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) ?> 
    55  <ul> 
    66  <?php foreach ($question->getPopularTags(20) as $tag => $count): ?> 
    77    <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') ?> 
    1010        &nbsp;<?php echo link_to_remote('[x]', array( 
    1111          'url'      => '@tag_remove?stripped_title='.$question->getStrippedTitle().'&tag='.$tag, 
     
    1818      <?php endif ?> 
    1919 
    20       <?php if ($user->hasCredential('moderator')): ?> 
     20      <?php if ($sf_user->hasCredential('moderator')): ?> 
    2121        &nbsp;<?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?')) ?> 
    2222      <?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> 
    22 
    33<?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  
    1212 
    1313<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')) ?> 
    1515</div> 
  • trunk/frontend/modules/user/templates/loginSuccess.php

    r64 r69  
    77</div> 
    88 
    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') ?> 
    1010 
    1111  <fieldset> 
     
    1313  <?php echo form_error('nickname') ?> 
    1414  <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')) ?> 
    1616  <br class="clearleft"/> 
    1717 
     
    2222 
    2323  <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()')) ?> 
    2525  &nbsp;<label for="new" style="display: inline; float: none"><?php echo __('click here to create a new account') ?></label> 
    2626  </div> 
    2727  <br class="clearleft"/> 
    2828 
    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"' ?>> 
    3030 
    3131    <label for="password_bis"><?php echo __('confirm your password:') ?></label> 
     
    3535    <?php echo form_error('email') ?> 
    3636    <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')) ?> 
    3838    <br class="clearleft"/> 
    3939    <div class="small in_form"><?php echo __('askeet will never disclose this address to a third party') ?></div> 
     
    4343  </fieldset> 
    4444 
    45   <?php echo input_hidden_tag('referer', $request->getAttribute('referer')) ?> 
     45  <?php echo input_hidden_tag('referer', $sf_request->getAttribute('referer')) ?> 
    4646  <div class="right"> 
    4747    <?php echo submit_tag(__('sign in')) ?> 
  • trunk/frontend/modules/user/templates/passwordRequestMailSent.php

    r64 r69  
    22 
    33<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> 
    55<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  
    99  <?php echo form_error('email') ?> 
    1010  <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') ?> 
    1212  <br class="clearleft" /> 
    1313 
  • trunk/frontend/modules/user/templates/reportAnswerSuccess.php

    r55 r69  
    11<?php use_helper('Answer') ?> 
    22 
    3 <?php echo link_to_report_answer($answer, $user) ?> 
     3<?php echo link_to_report_answer($answer, $sf_user) ?> 
    44<?php echo include_partial('moderator/answer_options', array('answer' => $answer)) ?> 
  • trunk/frontend/modules/user/templates/reportQuestionSuccess.php

    r55 r69  
    11<?php use_helper('Question') ?> 
    22