News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1186202570:v:use_geshi-1:v:type-php

Started by SleePy, Aug 04, 2007, 04:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SleePy

      if ($actionType == 'readme' || $actionType == 'code' || $actionType == 'modification' || $actionType == 'redirect')
      {
         // !!! TODO: Make sure the file actually exists?  Might not work when testing?
         if ($action->exists('@type') && $action->fetch('@type') == 'inline')
         {
            $filename = $temp_path . '$auto_' . $temp_auto++ . ($actionType == 'readme' || $actionType == 'redirect' ? '.txt' : ($actionType == 'code' ? '.php' : '.mod'));
            package_put_contents($filename, $action->fetch('.'));
            $filename = strtr($filename, array($temp_path => ''));
         }
         else
            $filename = $action->fetch('.');

         $return[] = array(
            'type' => $actionType,
            'filename' => $filename,
            'description' => '',
            'reverse' => $action->exists('@reverse') && $action->fetch('@reverse') == 'true',
            'boardmod' => $action->exists('@format') && $action->fetch('@format') == 'boardmod',
            'redirect_url' => $action->exists('@url') ? $action->fetch('@url') : '',
            'redirect_timeout' => $action->exists('@timeout') ? (int) $action->fetch('@timeout') : '',
            'parse_bbc' => $action->exists('@parsebbc') && $action->fetch('@parsebbc') == 'true',
         );

         continue;
      }
No siggy! :D