Changeset 443 for branches


Ignore:
Timestamp:
Dec 11, 2013 12:34:37 AM (10 years ago)
Author:
anonymous
Message:

A few additional removals of closing ?> tags

Location:
branches/eli_branch
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eli_branch/bin/file_importer.php

    r412 r443  
    123123// }
    124124//
    125 // ?>
  • branches/eli_branch/bin/module_maker/form_template.cli.php

    r412 r443  
    249249
    250250echo join("\n", $output);
    251 
    252 ?>
  • branches/eli_branch/bin/module_maker/list_template.cli.php

    r412 r443  
    213213
    214214E_O_F;
    215 
    216 ?>
  • branches/eli_branch/bin/module_maker/module.cli.php

    r413 r443  
    596596    }
    597597}
    598 
    599 ?>
  • branches/eli_branch/bin/module_maker/skel/admin.php

    r408 r443  
    44 * For details visit the project site: <http://trac.strangecode.com/codebase/>
    55 * Copyright 2001-2012 Strangecode, LLC
    6  * 
     6 *
    77 * This file is part of The Strangecode Codebase.
    88 *
     
    1111 * Free Software Foundation, either version 3 of the License, or (at your option)
    1212 * any later version.
    13  * 
     13 *
    1414 * The Strangecode Codebase is distributed in the hope that it will be useful, but
    1515 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1616 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    1717 * details.
    18  * 
     18 *
    1919 * You should have received a copy of the GNU General Public License along with
    2020 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>.
     
    236236    $db =& DB::getInstance();
    237237    $app =& App::getInstance();
    238    
     238
    239239    $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id);
    240240    if ($lock->isLocked() && !$lock->isMine()) {
     
    278278    $db =& DB::getInstance();
    279279    $app =& App::getInstance();
    280    
     280
    281281    $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id);
    282282    if ($lock->isLocked() && !$lock->isMine()) {
     
    314314    $db =& DB::getInstance();
    315315    $app =& App::getInstance();
    316    
     316
    317317    // Remove any stale cached list data.
    318318    $cache->delete('list');
     
    337337    $db =& DB::getInstance();
    338338    $app =& App::getInstance();
    339    
     339
    340340    $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%']);
    341341    if ($lock->isLocked() && !$lock->isMine()) {
     
    364364    global $tmp_prefs;
    365365    global $cache;
    366     $db =& DB::getInstance();   
    367     $app =& App::getInstance();
    368    
     366    $db =& DB::getInstance();
     367    $app =& App::getInstance();
     368
    369369    $where_clause = '';
    370370
     
    425425        return $list;
    426426    }
    427    
     427
    428428    // The list was not cached, so issue the real query.
    429429    $qid = $db->query($sql);
     
    445445    $db =& DB::getInstance();
    446446    $app =& App::getInstance();
    447    
     447
    448448    if (!is_array($ranks)) {
    449449        $app->logMsg('Saving rank failed, data posted is not an array: ' . $ranks, LOG_ERR, __FILE__, __LINE__);
     
    476476    }
    477477}
    478 
    479 ?>
  • branches/eli_branch/bin/module_maker/sql.cli.php

    r412 r443  
    218218
    219219echo isset($op) ? '' : "\n\n\n";
    220 ?>
  • branches/eli_branch/docs/codebase_v1-to-v2_upgrade_checklist.txt

    r334 r443  
    1 <?php
    2 
    31=====================================================================
    42In General
     
    86
    97    include SITE_BASE . '/_templates/header.ihtml';
    10    
     8
    119do this:
    1210
    1311    include 'header.ihtml';
    14    
     12
    1513
    16142. CODE_BASE is a defunct constant. The location of the codebase is no longer important as long as it can be found in the currently configured include_path. This will usually include the local site directory (where the codebase normally would be found) as well as the server-wide /usr/lib/php directory where the codebase might be included for the whole server. So now, instead of this:
    1715
    1816    require_once CODE_BASE . '/lib/Utilities.inc.php';
    19    
     17
    2018do this:
    2119
    2220    require_once 'codebase/lib/Utilities.inc.php';
    23    
    24    
     21
     22
    25233. $CFG-> variables are gone. Most of these should be converted into their $app and $auth equivalents. If a $CFG variable is NOT something used by the codebase but is still needed by the website application, I suggest converting these values to a $cfg array. For example, this:
    2624
    2725    $CFG->gallery_images_url = '/gallery_images';
    28    
     26
    2927should become:
    3028
    3129    $cfg['gallery_images_url'] = '/gallery_images';
    32    
     30
    3331And of course change the code where they are used to support the array instead of object-properties. If the array is inside of double-quotes it should be written like:
    3432
    35     "{$cfg['gallery_images_url']}/my/path". 
    36    
    37 If the value used is now to be retrieved from a $object->getParam(...) method call, you'll need to do this: 
     33    "{$cfg['gallery_images_url']}/my/path".
     34
     35If the value used is now to be retrieved from a $object->getParam(...) method call, you'll need to do this:
    3836
    3937    $object->getParam('gallery_images_url') . '/my/path'
     
    4341
    4442    <a href="<?php echo ohref("$CFG->site_url/my/file.php"); ?>">
    45    
     43
    4644to this:
    4745
    4846    <a href="<?php echo $app->ohref("/my/file.php"); ?>">
    49    
     47
    5048(In other words, the URL should be a not-fully-qualified URL starting with a slash.)
    5149
     
    6260        '\1' => '\2'
    6361    ));
    64    
    65    
     62
     63
    66646. Many classes now require object-method calls, and the object must be globally scoped. For example, to call the $cache->exists() method inside a function, be sure to add:
    6765
    6866    global $cache;
    69    
     67
    7068at the top of the function.
    7169
    72    
     70
    7371
    7472=====================================================================
     
    8078---------------------------------------------------------------------
    8179$CFG global variables are converted to object properties specific to their usage.
    82    
     80
    8381For example:
    8482
     
    9896Convert functions to methods.
    9997
    100 raiseMsg(...)                           $app->raiseMsg(...) 
    101 logMsg(...)                             $app->logMsg(...) 
     98raiseMsg(...)                           $app->raiseMsg(...)
     99logMsg(...)                             $app->logMsg(...)
    102100include 'message_header.ihtml';         $app->printRaisedMessages();
    103101$carry_queries = array(... , ...);      $app->carryQuery(...);  //call for each value in array
    104 ohref(...)                              $app->ohref(...) 
    105 printHiddenSession(...);                $app->printHiddenSession(...); 
    106 dieURL(...);                            $app->dieURL(...); 
    107 dieBoomerangURL(...);                   $app->dieBoomerangURL(...); 
    108 setBoomerangURL(...);                   $app->setBoomerangURL(...); 
    109 getBoomerangURL(...);                   $app->getBoomerangURL(...); 
    110 validBoomerangURL(...);                 $app->validBoomerangURL(...); 
    111 deleteBoomerangURL(...);                $app->deleteBoomerangURL(...); 
     102ohref(...)                              $app->ohref(...)
     103printHiddenSession(...);                $app->printHiddenSession(...);
     104dieURL(...);                            $app->dieURL(...);
     105dieBoomerangURL(...);                   $app->dieBoomerangURL(...);
     106setBoomerangURL(...);                   $app->setBoomerangURL(...);
     107getBoomerangURL(...);                   $app->getBoomerangURL(...);
     108validBoomerangURL(...);                 $app->validBoomerangURL(...);
     109deleteBoomerangURL(...);                $app->deleteBoomerangURL(...);
    112110sslOn();                                $app->sslOn();
    113111sslOff();                               $app->sslOff();
     
    121119=====================================================================
    122120DB
    123 ===================================================================== 
     121=====================================================================
    124122
    125123dbQuery(...)                            $db->query(...)
     
    209207
    210208    $lock = new RecordLock($GLOBALS['_admin']);
    211    
     209
    212210to:
    213211
     
    215213    global $auth;
    216214    $lock =& Lock::getInstance($auth);
    217      
     215
    218216And instantiate the original global $lock object in _config.inc.php as follows:
    219217
     
    236234
    237235    $version = new RecordVersion();
    238    
     236
    239237to:
    240238
     
    250248Changed all method calls to now require object calls rather than static calls. In other words, change this:
    251249
    252     if (SessionCache::isCached('mydata')) { 
     250    if (SessionCache::isCached('mydata')) {
    253251        $list = SessionCache::getCache('mydata');
    254252    }
     
    304302
    305303include_once 'form_error_header.ihtml';      $fv->printErrorMessages();
    306 
    307 
    308 ?>
Note: See TracChangeset for help on using the changeset viewer.