Skip to content

Instantly share code, notes, and snippets.

@tpayen
Last active January 11, 2016 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tpayen/e5c33469a66caaefaf9c to your computer and use it in GitHub Desktop.
Save tpayen/e5c33469a66caaefaf9c to your computer and use it in GitHub Desktop.
Fix bin scripts error ?
<?php
// Are we using the mobile skin or not ?
if ($this->api->output->type == 'html') {
if ($this->isMobile() && strpos($skin, '_mobile') === false) {
$skin = 'melanie2_larry_mobile';
$this->rc->config->set('skin', $skin);
$this->rc->output->set_env('skin', $skin);
$this->rc->output->set_skin($skin);
}
elseif (! $this->isMobile() && strpos($skin, '_mobile') !== false) {
$skin = str_replace('_mobile', '', $skin);
$this->rc->config->set('skin', $skin);
$this->rc->output->set_env('skin', $skin);
$this->rc->output->set_skin($skin);
}
// Set env ismobile
$this->rc->output->set_env('ismobile', $this->isMobile());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment