Hi, I am looking for some var, which indicates enabled clean urls.

I am using teamspeak module and had to modify

<?php
  // Format the output.
  $path = drupal_get_path('module', 'teamspeak');
  $chan_txt = ('<li class="ts_channel"><img class="ts_icon" src="'
//    . url($path) .'/icons/ts_chan.gif">&nbsp;%name</li>'."\n"
    .'modules/teamspeak/icons/ts_chan.gif">&nbsp;%name</li>'."\n"

  );
  $play_txt = ('<li class="ts_player"><img class="ts_icon" src="'
//    . url($path) .'/icons/@icon">&nbsp;%name</li>'."\n"
     .'modules/teamspeak/icons/@icon">&nbsp;%name</li>'."\n"

  );
?>

to get pictures shown. I were using drupal with disabled cleanurls.

I am now searching a way to use an if-statement to indicate if drupal is using cleanurls or not.
Is there some global predefined?

Comments

jaypan’s picture

I'm well late on this, but I just searched for and found the answer:

variable_get('clean_url', 0);

This returns 0 if they are disabled, 1 if they are enabled.

Contact me to contract me for D7 -> D10/11 migrations.