Skip to content
Snippets Groups Projects
Select Git revision
  • b0a1a7adf5203efa32661b96ecb023fef74c5d2d
  • main default protected
  • 5.5 protected
  • atlantis
  • 5.3 protected
  • 5.0 protected
  • issue-23
  • issue8-seat-logging-and-export
  • ticket-216
  • tickets-215-216-241-242
10 results

studip-4.0.php

Blame
  • Forked from Stud.IP / Stud.IP
    4228 commits behind the upstream repository.
    Marcus Eibrink-Lunzenauer's avatar
    Marcus Eibrink-Lunzenauer authored and Jan-Hendrik Willms committed
    b0a1a7ad
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    studip-4.0.php 13.85 KiB
    <?php
    // "Rules"/definitions for critical changes in 4.0
    return [
        'cssClassSwitcher' => 'Remove completely, use <fg=yellow><table class="default"></> instead.',
        '$csssw' => '[<fg=cyan>cssClassSwitcher</>] Remove completely, use <fg=yellow><table class="default"></> instead.',
    
        'DBMigration' => 'Use <fg=yellow>Migration</> instead',
    
        'Request::removeMagicQuotes()' => 'Remove completely since magic quotes are removed from php',
    
        'base_without_infobox' => 'Use <fg=yellow>layouts/base.php</> instead.',
        'deprecated_tabs_layout' => 'Don\'t use this. Use the global layout <fg=yellow>layouts/base.php</> and <fg=yellow>Navigation</> instead.',
        'setInfoBoxImage' => 'Replace with <fg=yellow>Sidebar</>',
        'addToInfobox'    => 'Replace with <fg=yellow>Sidebar</>',
        'InfoboxElement'  => 'Replace with appropriate <fg=yellow>Sidebar</> element',
        'InfoboxWidget'   => 'Replace with appropriate <fg=yellow>Sidebar</> widget',
    
        'details.php' => 'Link to <fg=yellow>dispatch.php/course/details</> instead',
        'institut_main.php' => 'Link to <fg=yellow>dispatch.php/institute/overview</> instead',
        'meine_seminare.php' => 'Link to <fg=yellow>dispatch.php/my_courses</> instead',
        'sms_box.php' => 'Link to <fg=yellow>dispatch.php/messages/overview</> or <fg=yellow>dispatch.php/messages/sent</>  instead',
        'sms_send.php' => 'Link to <fg=yellow>dispatch.php/messages/write</> instead',
    
        'get_global_perm' => 'Use <fg=yellow>$GLOBALS[\'perm\']->get_perm()</> instead',
        'log_event(' => 'Use <fg=yellow>StudipLog::log()</> instead',
        '->removeOutRangedSingleDates' => 'Use <fg=yellow>SeminarCycleDate::removeOutRangedSingleDates</> instead',
    
        'HolidayData' => 'Use class <fg=yellow>SemesterHoliday</> instead',
    
        'CourseTopic::createFolder' => 'Use <fg=yellow>CourseTopic::connectWithDocumentFolder()</> instead',
        'SimpleORMap::haveData' => 'Use <fg=yellow>SimpleORMap::isDirty()</> or <fg=yellow>SimpleORMap::isNew()</> instead',
        'Seminar::getMetaDateType' => 'Don\'t use this!',
        'UserConfig::setUserId' => 'Don\'t use this. <fg=yellow>Set the user via the constructor</>.',
    
        'StudIPTemplateEngine' => 'Time to refactor your plugin.',
        'AbstractStudIPAdministrationPlugin' => 'Time to refactor your plugin.',
        'AbstractStudIPCorePlugin' => 'Time to refactor your plugin.',
        'AbstractStudIPHomepagePlugin' => 'Time to refactor your plugin.',
        'AbstractStudIPLegacyPlugin' => 'Time to refactor your plugin.',
        'AbstractStudIPPortalPlugin' => 'Time to refactor your plugin.',
        'AbstractStudIPStandardPlugin' => 'Time to refactor your plugin.',
        'AbstractStudIPSystemPlugin' => 'Time to refactor your plugin.',
        'new Permission(' => 'Time to refactor your plugin.',
        'Permission::' => 'Time to refactor your plugin.',
        'PluginNavigation' => 'Time to refactor your plugin.',
        'new StudIPUser(' => 'Time to refactor your plugin.',
        'StudIPUser::' => 'Time to refactor your plugin.',
        'StudipPluginNavigation' => 'Time to refactor your plugin.',
        'getLinkToAdministrationPlugin' => 'Time to refactor your plugin.',
        'getCurrentPluginId' => 'Time to refactor your plugin.',
        'saveToSession' => 'Time to refactor your plugin.',
        'getValueFromSession' => 'Time to refactor your plugin.',
    
        'ContainerTable'   => false,
        'DbCrossTableView' => false,
        'DbPermissions'    => false,
    
        'pclzip' => 'Use <fg=yellow>Studip\\ZipArchive</> instead',
    
        'getSeminarRoomRequest' => 'Use <fg=yellow>RoomRequest</> model instead',
        'getDateRoomRequest' => 'Use <fg=yellow>RoomRequest</> model instead',
    
        'ldate' => 'Use PHP\'s <fg=yellow>date()</> or <fg=yellow>strftime()</> function instead',
        'day_diff' => 'Use PHP\'s <fg=yellow>DateTime::diff()</> method instead',
        'get_day_name' => 'Use PHP\'s <fg=yellow>strftime()</> function with <fg=yellow>parameter \'%A\'</> instead',
        'wday(' => 'Use <fg=yellow>strftime("%a")</> or <fg=yellow>strftime("%A")</> instead',
    
        'get_ampel_state' => false,
        'get_ampel_write' => false,
        'get_ampel_read' => false,
        'localePictureUrl' => false,
        'localeUrl' => false,
        'isDatesMultiSem' => false,
        'getMetadateCorrespondingDates' => false,
        'getCorrespondingMetadates' => false,
        'create_year_view' => false,
        'javascript_hover_year' => false,
        'js_hover' => false,
        'info_icons' => false,
    
        'get_message_attachments' => 'Use <fg=yellow>Message::attachments</> attribute instead',
        'view_turnus' => 'Use <fg=yellow>Seminar::getFormattedTurnus()</> instead',
    
        'AddNewStatusgruppe' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'CheckSelfAssign' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'CheckSelfAssignAll' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'CheckAssignRights' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'SetSelfAssignAll' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'SetSelfAssignExclusive' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'EditStatusgruppe' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'MovePersonPosition' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'SortPersonInAfter' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'SortStatusgruppe' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'SubSortStatusgruppe' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'resortStatusgruppeByRangeId' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'SwapStatusgruppe' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'CheckStatusgruppe' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'GetRangeOfStatusgruppe' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'GetGroupsByCourseAndUser' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'getOptionsOfStGroups' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'setOptionsOfStGroup' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'GetStatusgruppeLimit' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'CheckStatusgruppeFolder' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'CheckStatusgruppeMultipleAssigns' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'sortStatusgruppeByName' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'getPersons(' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'getSearchResults(' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
        'setExternDefaultForUser' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
    
        'GetStatusgruppeName' => 'Use <fg=yellow>Statusgruppen::find($id)->name</> instead',
        'GetStatusgruppenForUser' => 'Use class <fg=yellow>Statusgruppe</> or model <fg=yellow>Statusgruppen</> instead (yupp, this is still pretty fucked up).',
    
        'get_global_visibility_by_id' => 'Use <fg=yellow>User::find($id)->visible</> instead',
        'get_global_visibility_by_username' => 'Use <fg=yellow>User::findByUsername($username)->visible</> instead',
    
        'get_local_visibility_by_username' => false,
        'get_homepage_element_visibility' => false,
        'set_homepage_element_visibility' => false,
        'checkVisibility' => 'Use <fg=yellow>Visibility::verify($param, $this->current_user->user_id)</> instead',
    
        'InsertPersonStatusgruppe' => 'Use <fg=Statusgruppen>:addUser()</> instead',
        'RemovePersonStatusgruppe(' => 'Use <fg=yellow>Statusgruppen::find($group_id)->removeUser($user_id)</> instead',
        'RemovePersonStatusgruppeComplete' => 'Use <fg=yellow>Statusgruppen::find($group_id)->removeUser($user_id, true)</> instead. Maybe you will need to do this on a collection of groups for a course or institute.',
        'RemovePersonFromAllStatusgruppen' => 'Use <fg=yellow>StatusgruppeUser::deleteBySQL("user_id = ?", [$user_id])</> instead.',
        'DeleteAllStatusgruppen' => 'Use <fg=yellow>Statusgruppen::deleteBySQL("range_id = ?", [$id]);</> instead',
        'DeleteStatusgruppe' => 'Use <fg=yellow>Statusgruppen::delete()</> - or <fg=yellow>Statusgruppen::remove()</> if you want to keep the child groups.',
        'moveStatusgruppe' => false,
        'CheckUserStatusgruppe' => 'Use <fg=yellow>StatusgruppeUser::exists([$group_id, $user_id])</> instead.',
        'CountMembersStatusgruppen' => false,
        'CountMembersPerStatusgruppe' => false,
        'MakeDatafieldsDefault' => 'No longer neccessary.',
        'MakeUniqueStatusgruppeID' => 'No longer neccessary. SORM will create ids for you.',
        'GetAllSelected' => 'Use <fg=yellow>Statusgruppen::findAllByRangeId()</> instead.',
        'getStatusgruppenIDS' => 'Use <fg=yellow>Statusgruppen::findByRange_id()</> instead.',
        'getAllStatusgruppenIDS' => 'Use <fg=yellow>Statusgruppen::findAllByRangeId()</> instead.',
        'getPersonsForRole' => 'Use <fg=yellow>:Statusgruppen::members</> instead.',
        'isVatherDaughterRelation' => false,
        'SetSelfAssign(' => false,
        'getExternDefaultForUser' => 'Use <fg=yellow>InstituteMember::getDefaultInstituteIdForUser($user_id)</> instead.',
        'checkExternDefaultForUser' => 'Use <fg=yellow>InstituteMember::ensureDefaultInstituteIdForUser($user_id)</> instead.',
        'getAllChildIDs' => false,
        'getKingsInformations' => 'Use <fg=yellow>User</> model instead',
    
        'AutoInsert::existSeminars' => false,
        'new ZebraTable' => 'No longer neccessary. Use <fg=yellow>table.default</> instead.',
        'new Table' => 'No longer neccessary. Use <fg=yellow>table.default</> instead.',
    
        //old datei.inc.php and visual.inc.php functions:
        'createSelectedZip' => 'Removed. Use <fg=yellow>FileArchiveManager::createArchiveFromFileRefs</> instead.',
        'create_zip_from_directory' => 'Removed(?). Use <fg=yellow>FileArchiveManager::createArchiveFromPhysicalFolder</> instead.',
        'getFileExtension' => 'Removed. Use PHP\'s built-in <fg=yellow>pathinfo($filename, PATHINFO_EXTENSION)</> instead.',
        'get_icon_for_mimetype' => 'Removed. Use <fg=yellow>FileManager::getIconNameForMimeType</> instead.',
        'get_upload_file_path' => 'Removed. Use <fg=yellow>File->getPath()</> instead.',
        'GetDownloadLink' => 'Removed. Use one of the following alternatives instead: <fg=yellow>FileRef->getDownloadURL()</>, <fg=yellow>FileManager::getDownloadLinkForArchivedCourse</>, <fg=yellow>FileManager::getDownloadLinkForTemporaryFile</> or <fg=yellow>FileManager::getDownloadURLForTemporaryFile</>',
        'prepareFilename' => 'Removed. Use <fg=yellow>FileManager::cleanFileName</> instead.',
        'GetFileIcon' => 'Removed. Use <fg=yellow>FileManager::getIconNameForMimeType</> instead.',
        'parse_link' => 'Removed. Use <fg=yellow>FileManager::fetchURLMetadata</> instead.',
        'unzip_file' => 'Removed. Use <fg=yellow>Studip\ZipArchive::extractToPath</> or <fg=yellow>Studip\ZipArchive::test</> instead.',
        'datei.inc.php' => 'Removed. Use methods in functions.inc.php, FileManager, FileArchiveManager, FileRef, File or FolderType instead.',
        'TrackAccess' => 'Removed(?). Use <fg=yellow>:FileRef::incrementDownloadCounter</>',
        //StudipDocument and related classes:
        'StudipDocument(' => 'Removed(?). Use class <fg=yellow>FileRef</> instead.',
        'DocumentFolder(' => 'Removed(?). Use class <fg=yellow>Folder</> instead.',
        'StudipDocumentTree(' => 'Removed(?). Use class <fg=yellow>Folder</> or <fg=yellow>FolderType</> instead.',
        'WysiwygDocument' => 'Deprecated/To be removed. Use class <fg=yellow>FileRef</> in conjunction with a <fg=yellow>FolderType</> implementation instead.',
    
        'ZIP_USE_INTERNAL' => 'Removed. Please avoid querying the value of this configuration variable!',
        'ZIP_PATH' => 'Removed. Please avoid querying the value of this configuration variable!',
        'ZIP_OPTIONS' => 'Removed. Please avoid querying the value of this configuration variable!',
        'UNZIP_PATH' => 'Removed. Please avoid querying the value of this configuration variable!',
    
        'RuleAdministrationModel::getAdmissionRuleTypes' => 'Use <fg=yellow>AdmissionRule::getAvailableAdmissionRules(false)</> instead.',
        'SessSemName' => 'Use class <fg=yellow>Context</> instead',
        '_SESSION["SessionSeminar"]' => 'Use class <fg=yellow>Context</> instead',
        '_SESSION[\'SessionSeminar\']' => 'Use class <fg=yellow>Context</> instead',
    
        'Statusgruppe(' => 'Removed(?). Use class <fg=yellow>Statusgruppen</> instead.',
    ];