Changeset 558


Ignore:
Timestamp:
Dec 30, 2015 5:11:44 AM (8 years ago)
Author:
anonymous
Message:

Minor fixes

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/module_maker/skel/admin.php

    r500 r558  
    233233function &editRecordForm($id)
    234234{
    235     global $lock;
     235    global $lock, $locally_carried_queries;
    236236    $db =& DB::getInstance();
    237237    $app =& App::getInstance();
     
    274274function deleteRecord($id)
    275275{
    276     global $lock;
    277     global $cache;
     276    global $lock, $cache, $locally_carried_queries;
    278277    $db =& DB::getInstance();
    279278    $app =& App::getInstance();
  • trunk/lib/App.inc.php

    r557 r558  
    14861486        }
    14871487
    1488         if (!isset($_SESSION['_app'][$this->_ns]['boomerang'])) {
    1489             $this->logMsg(sprintf('validBoomerangURL(%s) no boomerang URL set.', $id), LOG_DEBUG, __FILE__, __LINE__);
     1488        if (!isset($_SESSION['_app'][$this->_ns]['boomerang']) || !is_array($_SESSION['_app'][$this->_ns]['boomerang']) || empty($_SESSION['_app'][$this->_ns]['boomerang'])) {
     1489            $this->logMsg(sprintf('validBoomerangURL(%s) no boomerang URL set, not an array, or empty.', $id), LOG_DEBUG, __FILE__, __LINE__);
    14901490            return false;
    14911491        }
     
    14961496            $added_time = $_SESSION['_app'][$this->_ns]['boomerang'][$id]['added_time'];
    14971497        } else if (!isset($id) || $use_nonspecificboomerang) {
    1498             // Use non specific boomerang if available.
     1498            // Use most recent, non-specific boomerang if available.
    14991499            $url = end($_SESSION['_app'][$this->_ns]['boomerang'])['url'];
    15001500            $added_time = end($_SESSION['_app'][$this->_ns]['boomerang'])['added_time'];
  • trunk/lib/Cache.inc.php

    r537 r558  
    189189        $_SESSION['_cache'][$this->_ns][$key] =& $var;
    190190
     191        $app->logMsg(sprintf('Set cache item “%s”', $key), LOG_DEBUG, __FILE__, __LINE__);
     192
    191193        if ($var_len >= 1024000) {
    192194            $app->logMsg(sprintf('Successfully cached oversized variable (%s bytes).', $var_len), LOG_DEBUG, __FILE__, __LINE__);
     
    262264
    263265        if (isset($_SESSION['_cache'][$this->_ns]) && array_key_exists($key, $_SESSION['_cache'][$this->_ns])) {
     266            $app->logMsg(sprintf('Deleting cache item “%s”', $key), LOG_DEBUG, __FILE__, __LINE__);
    264267            unset($_SESSION['_cache'][$this->_ns][$key]);
    265268            return true;
  • trunk/lib/Upload.inc.php

    r530 r558  
    276276            // Check to be sure the file has a valid file name extension.
    277277            if (!in_array(mb_strtolower(self::getFilenameExtension($file_name)), $this->getParam('valid_file_extensions'))) {
    278                 // TODO: Add option to allow any extention to be uploaded.
     278                // TODO: Add option to allow any extension to be uploaded.
    279279                $this->_raiseMsg(sprintf(_("The file %s failed uploading: it is an unrecognized type. Files must have one of the following file name extensions: %s."), $file_name, join(', ', $this->getParam('valid_file_extensions'))), MSG_ERR, __FILE__, __LINE__);
    280280                $app->logMsg(sprintf('The uploaded file %s has an unrecognized file name extension.', $file_name), LOG_WARNING, __FILE__, __LINE__);
     
    293293            // If the file name has no extension, use the mime-type to choose one.
    294294            if (!preg_match('/\.[^.]{1,5}$/', $file_name) && function_exists('mime_content_type')) {
    295                 // TODO: will this run if an extention is filtered by 'valid_file_extensions'?
     295                // TODO: will this run if an extension is filtered by 'valid_file_extensions'?
    296296                if ($ext = array_search(mime_content_type($files['tmp_name'][$i]), $this->mime_extension_map)) {
    297297                    $file_name .= ".$ext";
Note: See TracChangeset for help on using the changeset viewer.