Changeset 2648


Ignore:
Timestamp:
Apr 2, 2012, 2:14:14 PM (9 years ago)
Author:
goya
Message:

kicke les desinscrits avec is_active négatif

Location:
cpc/trunk/project
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/apps/frontend/modules/citoyen/actions/actions.class.php

    r2344 r2648  
    366366    $this->slug = $request->getParameter('slug');
    367367    $this->activation_id = $request->getParameter('activation_id');
    368    
     368    if (Doctrine::getTable('Citoyen')->findOneBySlug($this->slug)->is_active < 0) {
     369      $this->getUser()->setFlash('error', 'Ce compte a été désactivé');
     370      return;
     371    }
    369372    if ($this->getUser()->isAuthenticated())
    370373    {
  • cpc/trunk/project/apps/frontend/templates/layout.php

    r2493 r2648  
    3838    <link rel="search" href="<?php echo $sf_request->getRelativeUrlRoot(); ?>/nosdeputesfr.xml" title="Rechercher sur NosDéputés.fr" type="application/opensearchdescription+xml" />
    3939    <?php echo stylesheet_tag($style.'/jquery-ui-1.8.5.custom.css'); ?>
    40     <?php echo stylesheet_tag($style.'/style.css'); ?>
     40    <?php echo stylesheet_tag($style.'/style.v.2584.css'); ?>
    4141    <?php echo stylesheet_tag($style.'/print', array('media' => 'print')); ?>
    4242    <!--[if lte IE 6]>
     
    122122        </div>
    123123        </div>
    124              <div style="text-align: center; margin-top: 27px;"><h2><a href="/simplifions-la-loi">Participez aux débats « Simplifions la loi 2.0 » !</a></h2></div>
     124             <div style="text-align: center; margin-top: 27px;"><h2><a href="/confiseurs/2011/">Consultez notre étude 2010 &mdash; 2011 sur les sanctions relatives à la présence des députés !</a></h2></div>
    125125      </div>
    126126      <div id="corps_page">
     
    144144      </div>
    145145    </div>
     146<script type="text/javascript">
     147// Google
     148  var _gaq = _gaq || [];
     149  _gaq.push(['_setAccount', 'UA-10423931-2']);
     150  _gaq.push(['_trackPageview']);
     151  (function() {
     152    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
     153    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     154    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
     155  })();
     156</script>
    146157  </body>
    147158</html>
  • cpc/trunk/project/batch/amendements/compute_latest_loi.sh

    r1180 r2648  
    77perl download_amendements_loi.pl $loi > /tmp/download_amendements.log
    88
    9 for file in html/*; do
     9
     10for file in html/*; do
     11
     12        if grep "$(md5sum $file | sed 's/ .*//')" disabled.list > /dev/null 2>&1;
     13        then
     14                rm $file;
     15                continue;
     16        fi
     17
    1018        fileout=$(echo $file | sed 's/html/json/' | sed 's/\.asp/\.xml/')
    1119        perl cut_amdmt.pl $file > $fileout
  • cpc/trunk/project/batch/amendements/cut_amdmt.pl

    r2641 r2648  
    3939$string =~ s/(\<p class="presente".*)\s*\<br[\/]?\>\s*[\n]?\s*(.*)/\1, \2/g;
    4040$string =~ s/\<br\>.*\n//g;
    41 $string =~ s/&#8217;/'/g;
     41$string =~ s/(&#8217;|’)/'/g;
    4242$string =~ s/&#339;/oe/g;
    4343$string =~ s/&#8211;/-/g;
     
    107107           $output = 'expose';
    108108        }
     109        $line2 =~ s/"\s*([^"]*)\s*"/« \1 »/g;
    109110        if (!$amdmt{$output}) { $amdmt{$output} = "<p>".$line2."</p>"; }
    110111        else { $amdmt{$output} = $amdmt{$output}."<p>".$line2."</p>"; }
  • cpc/trunk/project/lib/model/solr/SolrCommands.class.php

    r2644 r2648  
    4646
    4747  private function protect() {
    48     if (! $this->semaphore) {
    49       $this->semaphore = sem_get(self::getSemId());
    50     }
    51     sem_acquire($this->semaphore, 1);
     48#    if (! $this->semaphore) {
     49      $this->semaphore = sem_get(self::getSemId(), 1, 0666, -1);
     50#    }
     51    sem_acquire($this->semaphore);
    5252  }
    5353
  • cpc/trunk/project/lib/task/reindexSolrObjectTask.class.php

    r2643 r2648  
    3030        $this->index($i);
    3131    } else {
    32       $obj = Doctrine::getTable($class)->find($id);
    33       $this->index($obj);
     32      $this->index($class, $id);
    3433    }
    3534  }
    3635
    37   protected static function index($obj) {
     36  protected static function index($class, $id) {
     37    $obj = Doctrine::getTable($class)->find($id);
    3838    if (!$obj) {
    3939      $json = new stdClass();
  • cpc/trunk/project/lib/task/setVacancesTask.class.php

    r1039 r2648  
    4444      else $sem++;
    4545    }
    46 
    4746    $option = Doctrine::getTable('VariableGlobale')->findOneByChamp('vacances');
    4847    if (!$option) {
  • cpc/trunk/project/lib/vendor/SolrServer/etc/jetty.xml

    r1157 r2648  
    5353      <Arg>
    5454          <New class="org.mortbay.jetty.nio.SelectChannelConnector">
    55             <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
     55            <Set name="port"><SystemProperty name="jetty.port" default="8383"/></Set>
    5656            <Set name="maxIdleTime">30000</Set>
    5757            <Set name="Acceptors">2</Set>
     
    7272          <New class="org.mortbay.jetty.bio.SocketConnector">
    7373            <Set name="host"><SystemProperty name="jetty.host" default="localhost"/></Set>
    74             <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
     74            <Set name="port"><SystemProperty name="jetty.port" default="8383"/></Set>
    7575            <Set name="maxIdleTime">50000</Set>
    7676            <Set name="lowResourceMaxIdleTime">1500</Set>
  • cpc/trunk/project/lib/vendor/SolrServer/solr/conf/solrconfig.xml

    r1157 r2648  
    6969       other than the default ./data under the Solr home.
    7070       If replication is in use, this should match the replication configuration. -->
    71   <dataDir>${solr.data.dir:./solr/data}</dataDir>
     71  <dataDir>/home/nosdeputes/prod/lib/vendor/SolrServer/solr/data/</dataDir>
    7272
    7373
     
    429429      concurrently.  An error is returned if this limit is exceeded. Recommend
    430430      1-2 for read-only slaves, higher for masters w/o cache warming. -->
    431     <maxWarmingSearchers>2</maxWarmingSearchers>
     431    <maxWarmingSearchers>4</maxWarmingSearchers>
    432432
    433433  </query>
  • cpc/trunk/project/web/.htaccess

    r1675 r2648  
    66  # uncomment the following line, if you are having trouble
    77  # getting no_script_name to work
    8   #RewriteBase /
     8  RewriteBase /
     9  RewriteRule ^(.*)\.v\.[0-9]+(\..*)$ $1$2 [QSA,L,E=VERSIONED_FILE:1]
    910
    1011  # we skip all files with .something
     
    1213  #RewriteCond %{REQUEST_URI} !\.html$
    1314  #RewriteRule .* - [L]
     15  RewriteRule ^simplifions-la-loi /dossiers/date [R,L]
     16  RewriteRule ^Simplifions-la-loi-2.0 /dossiers/date [R,L]
     17  RewriteRule ^simplifions-LOPPSI /loi/2271 [R,L]
     18  RewriteRule ^Simplifions-LOPPSI /loi/2271 [R,L]
     19  RewriteRule ^simplifions-loppsi /loi/2271 [R,L]
     20  RewriteRule ^loppsi /loi/2271 [R,L]
     21  RewriteRule ^lopsi /loi/2271 [R,L]
     22  RewriteRule ^LOPPSI /loi/2271 [R,L]
     23  RewriteRule ^LOPSI /loi/2271 [R,L]
     24  RewriteRule ^Grenelle2.0 /loi/2449 [R,L]
     25  RewriteRule ^Grenelle2 /loi/2449 [R,L]
     26  RewriteRule ^Grenelle /loi/2449 [R,L]
     27  RewriteRule ^grenelle2.0 /loi/2449 [R,L]
     28  RewriteRule ^grenelle2 /loi/2449 [R,L]
     29  RewriteRule ^grenelle /loi/2449 [R,L]
     30  RewriteRule ^GrenelleII /loi/2449 [R,L]
     31  RewriteRule ^grenelleII /loi/2449 [R,L]
     32  RewriteRule ^amnesty /loi/951 [R,L]
     33  RewriteRule ^cpi /loi/951 [R,L]
     34  RewriteRule ^retraite /loi/2760 [R,L]
     35  RewriteRule ^Retraite /loi/2760 [R,L]
     36  RewriteRule ^retraites /loi/2760 [R,L]
     37#  RewriteRule ^dossier/ / [R,L]
    1438
    1539  # we check if the .html version is here (caching)
    1640  RewriteRule ^$ index.html [QSA]
    1741  RewriteRule ^([^.]+)$ $1.html [QSA]
    18   RewriteCond %{REQUEST_FILENAME} !-f
     42  RewriteCond %{REQUEST_FILENAME} !-f 
    1943
    2044  # no, so we redirect to our front web controller
     
    2246</IfModule>
    2347
     48Redirect /confiseurs_1001 /confiseurs/2009
     49Redirect /confiseurs_1007 /confiseurs/2010
     50Redirect /confiseurs_temp_1107 /confiseurs/2011
  • cpc/trunk/project/web/backend_dev.php

    r1675 r2648  
    33// this check prevents access to debug front controllers that are deployed by accident to production servers.
    44// feel free to remove this, extend it or make something more sophisticated.
    5 if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1')))
     5if (!in_array(@$_SERVER['HTTP_CF_CONNECTING_IP'], array('127.0.0.1',
     6                '82.225.240.116', //Tangui (Paris)
     7                '88.168.238.200', //Benjamin (Paris))) || !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1','173.245.49.172',
     8                '82.225.240.116', //Tangui (Paris)
     9                '88.168.238.200', //Benjamin (Paris)
     10                '129.199.114.20', //Benjamin (Paris, ENS)
     11                '77.205.50.174', //Brice
     12                                              '::1', )))
    613{
    7   die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
     14  die('You ('.@$_SERVER['REMOTE_ADDR'].')are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
    815}
    916
  • cpc/trunk/project/web/frontend_dev.php

    r1675 r2648  
    11<?php
    2 
    32// this check prevents access to debug front controllers that are deployed by accident to production servers.
    43// feel free to remove this, extend it or make something more sophisticated.
    5 if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1')))
     4if ( !in_array(@$_SERVER['HTTP_CF_CONNECTING_IP'], array('127.0.0.1',
     5                '82.225.240.116', //Tangui (Paris)
     6                '88.168.238.200', //Benjamin (Paris))) || !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1',
     7                '82.225.240.116', //Tangui (Paris)
     8                '88.168.238.200', //Benjamin (Paris)
     9                '129.199.114.20', //Benjamin (Paris, ENS)
     10                '145.238.180.6' , // Benjamin Meudon
     11                '88.181.216.59', //Tangui (Nantes)
     12                '80.13.217.126', //Tangui (April)
     13                '88.191.92.80', //Serveur dédié
     14                '78.232.200.105', //Tangui Rennes
     15                '78.29.235.101', //Tangui Bx
     16                '::1')))
    617{
    7   die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
     18//  die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
    819}
    920
  • cpc/trunk/project/web/robots.txt

    r2547 r2648  
    55User-agent: *
    66Disallow: /recherche/
    7 
     7Disallow: /citoyen/photo/samia-lakhal
Note: See TracChangeset for help on using the changeset viewer.